You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,8 +85,7 @@ This means that LuaJIT's C implementation perform the three operations:
85
85
in one single pass.
86
86
This approach is remarkable on itself and very efficient but it makes difficult to modify or extend the programming language.
87
87
88
-
Parsing Rule example
89
-
~~~~~
88
+
### Parsing Rule example ###
90
89
91
90
To illustrate how the parsing work in the language toolkit let us make an example.
92
91
The grammar rule for the "return" statement is:
@@ -206,8 +205,7 @@ Otherwise the program `luajit-x` works exactly as luajit itself and accept the s
206
205
207
206
This means that you can experiment with the language by modifying the Lua implementation of the language and test the changes immediately without recompiling anything by using `luajit-x` as a REPL.
208
207
209
-
Generated Bytecode
210
-
~~~~~~~~~~~~
208
+
### Generated Bytecode ###
211
209
212
210
You can inspect the bytecode generated by the language toolkit by using the "-b" options.
213
211
They can be invoked either with standard luajit by using "run.lua" or directly using the customized program `luajit-x`.
@@ -261,8 +259,7 @@ In the example above the generated bytecode will be *identical* to those generat
261
259
This is not an hazard since the Language Toolkit's bytecode generator is designed to produce the same bytecode that LuaJIT itself would generate.
262
260
Yet in some cases the generated code will differ but this is not considered a problem as long as the generated code is still correct.
263
261
264
-
Bytecode Annotated Dump
265
-
~~~~~~~~~~~~~~
262
+
### Bytecode Annotated Dump ###
266
263
267
264
In addition to the standard LuaJIT bytecode functions the language toolkit support also a special debug mode where the bytecode in printed byte-by-byte in hex format with some annotations on the right side of the screen.
268
265
The annotations will explain the meaning of each chunk of bytes and decode them as appropriate.
0 commit comments