diff options
Diffstat (limited to 'LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/README')
-rw-r--r-- | LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/README | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/README b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/README new file mode 100644 index 0000000..215b555 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/README | |||
@@ -0,0 +1,55 @@ | |||
1 | nat-5.1.3 | ||
2 | |||
3 | This directory contains versions of front end files that are rewritten | ||
4 | to be more "native" to Lua. These files should be considered as | ||
5 | exercises in exploring ways to write the front end, for example, to | ||
6 | write a front end that is optimized for size, etc. See also file size | ||
7 | data further below. | ||
8 | |||
9 | The following are the different versions available (mk2 == "mark 2", | ||
10 | this is commonly used in the UK, e.g. for aeroplanes during WWII): | ||
11 | |||
12 | Lexers | ||
13 | ------ | ||
14 | |||
15 | NOTE: These lexers should behave mostly identically to the original C | ||
16 | lexer. Locale support for non-standard decimal points is missing. Also, | ||
17 | all strings and long strings have line endings normalized to LF. | ||
18 | |||
19 | llex_mk2 Rewritten from original ported code to become more | ||
20 | Lua-like. Needs input to be entered as a single string. | ||
21 | Unless an application's need is very unusual, this | ||
22 | should not be a problem. It will not work for per-line | ||
23 | interaction, though. This version is also somewhat | ||
24 | optimized for size; its stripped binary chunk size is | ||
25 | 3716 bytes. | ||
26 | |||
27 | Status: TESTED | ||
28 | |||
29 | Parsers | ||
30 | ------- | ||
31 | |||
32 | lparser_mk2 Written for the simplified lexer interface of llex_mk2. | ||
33 | This is a lexer skeleton, stripped of codegen code. Has | ||
34 | a minimum of variable management code added, and tracks | ||
35 | the is_vararg flag of a function. See the comments in | ||
36 | the source code for more information. Without logging | ||
37 | messages and comments, it should be under 600 LOC. A | ||
38 | binary chunk of lparser_mk2 (stripped) is 15783 bytes. | ||
39 | |||
40 | Sample output of the parser message logger can be found | ||
41 | in the test/parser_log subdirectory. | ||
42 | |||
43 | Tested with test_parser-5.1.lua, the Lua 5.1.x parser test | ||
44 | cases in the test_lua/ directory, appears to be fine. | ||
45 | |||
46 | Compared to the 5.0.x parser skeleton, the main changes | ||
47 | are: (a) 'arg' not implemented, so it appears as a global, | ||
48 | and (b) '...' recognized as the last function parameter. | ||
49 | |||
50 | Status: SNIPPETS APPEAR TO WORK | ||
51 | |||
52 | Other notes: | ||
53 | ------------ | ||
54 | |||
55 | None. | ||