diff options
author | David Walter Seikel | 2014-04-21 20:59:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-21 20:59:39 +1000 |
commit | 9621add2918cc4943e6693b74ae85d51dd264fcf (patch) | |
tree | fff1edf2c69d7a08a0e12885eecc9b96ed847a6a /LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua | |
parent | LuaSL_test's window doesn't need to be so huge. (diff) | |
download | SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.zip SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.gz SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.bz2 SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.xz |
We don't need the testlua directory any more.
Diffstat (limited to '')
-rw-r--r-- | LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua b/LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua deleted file mode 100644 index 8c7abf4..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | --[[-------------------------------------------------------------------- | ||
2 | |||
3 | test_lparser.lua | ||
4 | Test for lparser.lua | ||
5 | This file is part of Yueliang. | ||
6 | |||
7 | Copyright (c) 2005-2006 Kein-Hong Man <khman@users.sf.net> | ||
8 | The COPYRIGHT file describes the conditions | ||
9 | under which this software may be distributed. | ||
10 | |||
11 | See the ChangeLog for more information. | ||
12 | |||
13 | ----------------------------------------------------------------------]] | ||
14 | |||
15 | ------------------------------------------------------------------------ | ||
16 | -- test the whole kaboodle | ||
17 | ------------------------------------------------------------------------ | ||
18 | |||
19 | dofile("../lzio.lua") | ||
20 | dofile("../llex.lua") | ||
21 | dofile("../lopcodes.lua") | ||
22 | dofile("../ldump.lua") | ||
23 | dofile("../lcode.lua") | ||
24 | dofile("../lparser.lua") | ||
25 | |||
26 | function lua_assert(test) | ||
27 | if not test then error("assertion failed!") end | ||
28 | end | ||
29 | |||
30 | luaX:init() | ||
31 | |||
32 | ------------------------------------------------------------------------ | ||
33 | -- try 1 | ||
34 | ------------------------------------------------------------------------ | ||
35 | local zio = luaZ:init(luaZ:make_getS("local a = 1"), nil) | ||
36 | local LuaState = {} | ||
37 | local Func = luaY:parser(LuaState, zio, nil, "=string") | ||
38 | |||
39 | --[[ | ||
40 | for i, v in Func do | ||
41 | if type(v) == "string" or type(v) == "number" then | ||
42 | print(i, v) | ||
43 | elseif type(v) == "table" then | ||
44 | print(i, "TABLE") | ||
45 | end | ||
46 | end | ||
47 | --]] | ||
48 | |||
49 | local Writer, Buff = luaU:make_setF("parse1.out") | ||
50 | luaU:dump(LuaState, Func, Writer, Buff) | ||
51 | |||
52 | ------------------------------------------------------------------------ | ||
53 | -- try 2 | ||
54 | ------------------------------------------------------------------------ | ||
55 | |||
56 | zio = luaZ:init(luaZ:make_getF("sample.lua"), nil) | ||
57 | Func = luaY:parser(LuaState, zio, nil, "@sample.lua") | ||
58 | Writer, Buff = luaU:make_setF("parse2.out") | ||
59 | luaU:dump(LuaState, Func, Writer, Buff) | ||