aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/testLua/yueliang-0.4.1/README
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/testLua/yueliang-0.4.1/README')
-rw-r--r--LuaSL/testLua/yueliang-0.4.1/README156
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
14INTRODUCTION
15
16The goal of Yueliang is to implement Lua 5 in Lua 5. Such a codebase, if
17well documented, can be a useful prototyping and educational tool.
18Initially, the focus is on the front side of Lua, i.e. the lexical
19analyzer, the parser and the code generator, in order to generate binary
20chunks. Yueliang currently produces the exact binary chunk as the
21original Lua 5 itself for Lua 5.0.3 and Lua 5.1.3. Yueliang is moon in
22Mandarin.
23
24A port of the back side (the VM) is being considered, but note that
25there is a recent project on LuaForge called LuLu that does just this.
26
27Note: the codebase is currently a no-brainer port of Lua's front side C
28source code to Lua code, and the C heritage is retained as much as
29possible to allow for easy comparison. Due to certain implementation
30methods, processing might be slow (especially if the source file causes
31a lot of string processing.) The initial version is not meant to be
32fast. Even unused arguments are retained. Asserts are currently enabled.
33While the Lua code itself is portable, portions of the code is
34hard-coded to generate output for an x86-type platform (32-bit ints,
35doubles, little-endian.)
36
37See the test_lua directory for an automatic tester, test_scripts*.lua.
38Only the lexer currently has a basic test suite. Performance for the
39no-brainer port of the Lua 5.0.2 front end in Yueliang 0.1.0 is 28
40seconds on an Athlon 2500+, or about 29.5KB/sec. (Native C is virtually
41instantaneous, so a comparison is pointless, really.) I think a test
42suite for the parser will be better than running it on random files. See
43below for a list of todos.
44
45For versions of Yueliang corresponding to older minor releases of Lua,
46for example Lua 5.0.2 or Lua 5.1.1, please look at the README files in
47each of the orig-5.* directory for information on the last version of
48Yueliang corresponding to the particular Lua release.
49
50--
51
52NOTES
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
63WHAT'S NEW
64
65Major 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
69Major 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
74Major changes for version 0.3.2 (details in the ChangeLog):
75* A working native lexer for Lua 5.1.x
76
77Major 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
82Major 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
86Older items can be found in OlderNews
87
88--
89
90SOME SIZE STATS
91
92Here are some 0.1.0 size statistics (note that embedding the sources is
93redundant or pretty useless, as you will need an already present front
94end to process the source code!) for the 6 files main in orig-5.0.3
95minus luac.lua:
96
97 Size Zipped
98Original sources* 130162 29546
99with LuaSrcDiet* 48308 13841
100luac 108174 32238
101luac -s 64930 21867
102
103*note: embedding these would be a little pointless
104
105There are some more size stats in the README file in the nat-5.0.3
106directory, for native lexers.
107
108--
109
110IMPLEMENTATION PLAN
111
112Here are some ideas, in no particular order or priority, with no
113particular 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
132ACKNOWLEDGEMENTS
133
134Yueliang is a straight port of Lua 5 code, so I have included the Lua
1355.0.x copyright as well the Lua 5.1.x copyright files.
136
137Thanks to the LuaForge people for hosting this.
138Developed on SciTE http://www.scintilla.org/. Two thumbs up.
139
140--
141
142FEEDBACK
143
144Feedback and contributions are welcome. Your name will be acknowledged,
145as long as you are willing to comply with COPYRIGHT. If your material is
146self-contained, you can retain a copyright notice for those material in
147your own name, as long as you use the same Lua 5/MIT-style copyright.
148
149I am on dial-up, so I might not be able to reply immediately. My
150alternative e-mail address is: keinhong AT gmail DOT com
151
152Enjoy!!
153
154Kein-Hong Man (esq.)
155Kuala Lumpur
156Malaysia 20080531