diff options
Diffstat (limited to 'LuaSL/testLua/yueliang-0.4.1/README')
-rw-r--r-- | LuaSL/testLua/yueliang-0.4.1/README | 156 |
1 files changed, 0 insertions, 156 deletions
diff --git a/LuaSL/testLua/yueliang-0.4.1/README b/LuaSL/testLua/yueliang-0.4.1/README deleted file mode 100644 index 9ee1437..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/README +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | |||
2 | Yueliang | ||
3 | Lua implemented in Lua | ||
4 | |||
5 | Copyright (c) 2005-2008 Kein-Hong Man <khman@users.sf.net> | ||
6 | The COPYRIGHT file describes the conditions under which this | ||
7 | software may be distributed (basically a Lua 5-style license.) | ||
8 | |||
9 | Website: http://yueliang.luaforge.net/ | ||
10 | Project page: http://luaforge.net/projects/yueliang/ | ||
11 | |||
12 | -- | ||
13 | |||
14 | INTRODUCTION | ||
15 | |||
16 | The goal of Yueliang is to implement Lua 5 in Lua 5. Such a codebase, if | ||
17 | well documented, can be a useful prototyping and educational tool. | ||
18 | Initially, the focus is on the front side of Lua, i.e. the lexical | ||
19 | analyzer, the parser and the code generator, in order to generate binary | ||
20 | chunks. Yueliang currently produces the exact binary chunk as the | ||
21 | original Lua 5 itself for Lua 5.0.3 and Lua 5.1.3. Yueliang is moon in | ||
22 | Mandarin. | ||
23 | |||
24 | A port of the back side (the VM) is being considered, but note that | ||
25 | there is a recent project on LuaForge called LuLu that does just this. | ||
26 | |||
27 | Note: the codebase is currently a no-brainer port of Lua's front side C | ||
28 | source code to Lua code, and the C heritage is retained as much as | ||
29 | possible to allow for easy comparison. Due to certain implementation | ||
30 | methods, processing might be slow (especially if the source file causes | ||
31 | a lot of string processing.) The initial version is not meant to be | ||
32 | fast. Even unused arguments are retained. Asserts are currently enabled. | ||
33 | While the Lua code itself is portable, portions of the code is | ||
34 | hard-coded to generate output for an x86-type platform (32-bit ints, | ||
35 | doubles, little-endian.) | ||
36 | |||
37 | See the test_lua directory for an automatic tester, test_scripts*.lua. | ||
38 | Only the lexer currently has a basic test suite. Performance for the | ||
39 | no-brainer port of the Lua 5.0.2 front end in Yueliang 0.1.0 is 28 | ||
40 | seconds on an Athlon 2500+, or about 29.5KB/sec. (Native C is virtually | ||
41 | instantaneous, so a comparison is pointless, really.) I think a test | ||
42 | suite for the parser will be better than running it on random files. See | ||
43 | below for a list of todos. | ||
44 | |||
45 | For versions of Yueliang corresponding to older minor releases of Lua, | ||
46 | for example Lua 5.0.2 or Lua 5.1.1, please look at the README files in | ||
47 | each of the orig-5.* directory for information on the last version of | ||
48 | Yueliang corresponding to the particular Lua release. | ||
49 | |||
50 | -- | ||
51 | |||
52 | NOTES | ||
53 | |||
54 | * there is a failed assert in luaK:addk for both versions of lcode.lua, | ||
55 | the assert is currently incorrectly written | ||
56 | * luaG_checkcode() in both versions of lparser.lua has currently not | ||
57 | been implemented (better put in the runtime backend?) | ||
58 | * need to check compliance of lexers with recognizing characters beyond | ||
59 | normal ASCII (accented characters) when used in identifiers | ||
60 | |||
61 | -- | ||
62 | |||
63 | WHAT'S NEW | ||
64 | |||
65 | Major changes for version 0.4.1 (details in the ChangeLog): | ||
66 | * Tested native 5.0.x and 5.1.x parsers with lots of test cases | ||
67 | * Fixed two bugs in native 5.1.x parser, # and % operator handling | ||
68 | |||
69 | Major changes for version 0.4.0 (details in the ChangeLog): | ||
70 | * A working native parser skeleton for Lua 5.1.x, plus code | ||
71 | to deal with variable classification | ||
72 | * Sample parser log files covering all of the grammar | ||
73 | |||
74 | Major changes for version 0.3.2 (details in the ChangeLog): | ||
75 | * A working native lexer for Lua 5.1.x | ||
76 | |||
77 | Major changes for version 0.3.1 (details in the ChangeLog): | ||
78 | * Mark 2 of the native parser skeleton for 5.0.3 which does | ||
79 | variable classification into locals, upvalues or globals | ||
80 | * Sample parser log files exercising variable classification | ||
81 | |||
82 | Major changes for version 0.3.0 (details in the ChangeLog): | ||
83 | * Native parser skeleton for 5.0.3 mostly works | ||
84 | * Sample parser log files covering all of the grammar | ||
85 | |||
86 | Older items can be found in OlderNews | ||
87 | |||
88 | -- | ||
89 | |||
90 | SOME SIZE STATS | ||
91 | |||
92 | Here are some 0.1.0 size statistics (note that embedding the sources is | ||
93 | redundant or pretty useless, as you will need an already present front | ||
94 | end to process the source code!) for the 6 files main in orig-5.0.3 | ||
95 | minus luac.lua: | ||
96 | |||
97 | Size Zipped | ||
98 | Original sources* 130162 29546 | ||
99 | with LuaSrcDiet* 48308 13841 | ||
100 | luac 108174 32238 | ||
101 | luac -s 64930 21867 | ||
102 | |||
103 | *note: embedding these would be a little pointless | ||
104 | |||
105 | There are some more size stats in the README file in the nat-5.0.3 | ||
106 | directory, for native lexers. | ||
107 | |||
108 | -- | ||
109 | |||
110 | IMPLEMENTATION PLAN | ||
111 | |||
112 | Here are some ideas, in no particular order or priority, with no | ||
113 | particular implementation time frame: | ||
114 | |||
115 | (a) A straight no-brainer port of Lua's front side C source code to | ||
116 | Lua code, no optimization or heavy rewriting is done (MOSTLY DONE) | ||
117 | (b) A test suite for the lexer (MOSTLY DONE) | ||
118 | (c) A test suite for the: | ||
119 | (i) parser (MOSTLY DONE) | ||
120 | (ii) code generator (CAN ADAPT LUA'S TEST SUITE) | ||
121 | (d) Documentation for Lua code generation (STUDYING) | ||
122 | (e) A straight no-brainer port of Lua's back side C source code to | ||
123 | Lua code, no optimization or heavy rewriting is done (ON HIATUS) | ||
124 | *** NOTE: there is a Lua-on-Lua project called LuLu on LuaForge | ||
125 | (f) A test suite for the VM (CAN ADAPT LUA'S TEST SUITE) | ||
126 | (g) Partial rewrites of Yueliang. (NATIVE LEXERS AND PARSERS DONE | ||
127 | FOR BOTH 5.0 AND 5.1) | ||
128 | (h) Addition of features to Yueliang. | ||
129 | |||
130 | -- | ||
131 | |||
132 | ACKNOWLEDGEMENTS | ||
133 | |||
134 | Yueliang is a straight port of Lua 5 code, so I have included the Lua | ||
135 | 5.0.x copyright as well the Lua 5.1.x copyright files. | ||
136 | |||
137 | Thanks to the LuaForge people for hosting this. | ||
138 | Developed on SciTE http://www.scintilla.org/. Two thumbs up. | ||
139 | |||
140 | -- | ||
141 | |||
142 | FEEDBACK | ||
143 | |||
144 | Feedback and contributions are welcome. Your name will be acknowledged, | ||
145 | as long as you are willing to comply with COPYRIGHT. If your material is | ||
146 | self-contained, you can retain a copyright notice for those material in | ||
147 | your own name, as long as you use the same Lua 5/MIT-style copyright. | ||
148 | |||
149 | I am on dial-up, so I might not be able to reply immediately. My | ||
150 | alternative e-mail address is: keinhong AT gmail DOT com | ||
151 | |||
152 | Enjoy!! | ||
153 | |||
154 | Kein-Hong Man (esq.) | ||
155 | Kuala Lumpur | ||
156 | Malaysia 20080531 | ||