aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-21 20:59:39 +1000
committerDavid Walter Seikel2014-04-21 20:59:39 +1000
commit9621add2918cc4943e6693b74ae85d51dd264fcf (patch)
treefff1edf2c69d7a08a0e12885eecc9b96ed847a6a /LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua
parentLuaSL_test's window doesn't need to be so huge. (diff)
downloadSledjHamr-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 'LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua')
-rw-r--r--LuaSL/testLua/yueliang-0.4.1/orig-5.1.3/test/test_lparser.lua59
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
19dofile("../lzio.lua")
20dofile("../llex.lua")
21dofile("../lopcodes.lua")
22dofile("../ldump.lua")
23dofile("../lcode.lua")
24dofile("../lparser.lua")
25
26function lua_assert(test)
27 if not test then error("assertion failed!") end
28end
29
30luaX:init()
31
32------------------------------------------------------------------------
33-- try 1
34------------------------------------------------------------------------
35local zio = luaZ:init(luaZ:make_getS("local a = 1"), nil)
36local LuaState = {}
37local Func = luaY:parser(LuaState, zio, nil, "=string")
38
39--[[
40for 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
46end
47--]]
48
49local Writer, Buff = luaU:make_setF("parse1.out")
50luaU:dump(LuaState, Func, Writer, Buff)
51
52------------------------------------------------------------------------
53-- try 2
54------------------------------------------------------------------------
55
56zio = luaZ:init(luaZ:make_getF("sample.lua"), nil)
57Func = luaY:parser(LuaState, zio, nil, "@sample.lua")
58Writer, Buff = luaU:make_setF("parse2.out")
59luaU:dump(LuaState, Func, Writer, Buff)