From 9621add2918cc4943e6693b74ae85d51dd264fcf Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 21 Apr 2014 20:59:39 +1000 Subject: We don't need the testlua directory any more. --- .../nat-5.1.3/test/parser_log/sample_01.lua | 9 - .../nat-5.1.3/test/parser_log/sample_02.lua | 10 - .../nat-5.1.3/test/parser_log/sample_03.lua | 21 - .../nat-5.1.3/test/parser_log/sample_04.lua | 31 -- .../nat-5.1.3/test/parser_log/sample_05.lua | 129 ----- .../nat-5.1.3/test/parser_log/sample_06.lua | 132 ----- .../nat-5.1.3/test/parser_log/sample_07.lua | 147 ------ .../nat-5.1.3/test/parser_log/sample_08.lua | 66 --- .../nat-5.1.3/test/parser_log/sample_09.lua | 103 ---- .../nat-5.1.3/test/parser_log/sample_10.lua | 100 ---- .../nat-5.1.3/test/parser_log/sample_11.lua | 192 ------- .../nat-5.1.3/test/parser_log/sample_12.lua | 52 -- .../nat-5.1.3/test/parser_log/sample_13.lua | 108 ---- .../nat-5.1.3/test/parser_log/sample_14.lua | 112 ---- .../nat-5.1.3/test/parser_log/sample_15.lua | 140 ----- .../nat-5.1.3/test/parser_log/sample_16.lua | 128 ----- .../nat-5.1.3/test/parser_log/sample_17.lua | 110 ---- .../nat-5.1.3/test/parser_log/sample_18.lua | 26 - .../nat-5.1.3/test/parser_log/sample_19.lua | 35 -- .../nat-5.1.3/test/parser_log/sample_20.lua | 64 --- .../nat-5.1.3/test/parser_log/sample_21.lua | 77 --- .../nat-5.1.3/test/parser_log/sample_22.lua | 43 -- .../nat-5.1.3/test/parser_log/sample_23.lua | 70 --- .../nat-5.1.3/test/parser_log/sample_24.lua | 84 --- .../nat-5.1.3/test/parser_log/sample_25.lua | 159 ------ .../nat-5.1.3/test/parser_log/sample_26.lua | 53 -- .../nat-5.1.3/test/parser_log/sample_27.lua | 48 -- .../nat-5.1.3/test/parser_log/sample_28.lua | 79 --- .../nat-5.1.3/test/parser_log/sample_29.lua | 94 ---- .../nat-5.1.3/test/parser_log/sample_30.lua | 119 ----- .../nat-5.1.3/test/parser_log/sample_31.lua | 127 ----- .../nat-5.1.3/test/test_llex_mk2.lua | 566 --------------------- .../nat-5.1.3/test/test_lparser_mk2.lua | 329 ------------ .../nat-5.1.3/test/test_lparser_mk2_2.lua | 159 ------ 34 files changed, 3722 deletions(-) delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_01.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_02.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_03.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_04.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_05.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_06.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_07.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_08.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_10.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_11.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_12.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_13.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_14.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_15.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_16.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_17.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_18.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_19.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_20.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_21.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_22.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_23.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_24.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_25.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_26.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_27.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_28.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_29.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_30.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_31.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_llex_mk2.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2.lua delete mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2_2.lua (limited to 'LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test') diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_01.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_01.lua deleted file mode 100644 index 379cc9d..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_01.lua +++ /dev/null @@ -1,9 +0,0 @@ --- START OF SOURCE -- --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_02.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_02.lua deleted file mode 100644 index 13eb2e6..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_02.lua +++ /dev/null @@ -1,10 +0,0 @@ --- START OF SOURCE -- --- foobar --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_03.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_03.lua deleted file mode 100644 index 33df29c..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_03.lua +++ /dev/null @@ -1,21 +0,0 @@ --- START OF SOURCE -- -do -end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'do' line=1 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_04.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_04.lua deleted file mode 100644 index d0fefbc..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_04.lua +++ /dev/null @@ -1,31 +0,0 @@ --- START OF SOURCE -- -do end -do end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'do' line=1 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - -- STATEMENT: begin 'do' line=2 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_05.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_05.lua deleted file mode 100644 index 17a9231..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_05.lua +++ /dev/null @@ -1,129 +0,0 @@ --- START OF SOURCE -- -foo() -foo{} -foo"" -foo:bar() -foo=false -foo.bar=true -foo[true]=nil -foo,bar=1,"a" --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - primaryexp: { funcargs - funcargs: begin '{' - constructor: begin - constructor: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - primaryexp: funcargs - funcargs: begin - codestring: "" - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - primaryexp: : funcargs - checkname: - str_checkname: 'bar' - codestring: "bar" - funcargs: begin '(' - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: false - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=6 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - primaryexp: '.' field - field: operator=. - checkname: - str_checkname: 'bar' - codestring: "bar" - expr_stat: assignment k='VINDEXED' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: true - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=7 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - primaryexp: [ exp1 ] - index: begin '[' - expr: - simpleexp: true - index: end ']' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: nil - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=8 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: ',' -- next LHS element - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1 - explist1: ',' -- continuation - expr: - simpleexp: =a - codestring: "a" - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_06.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_06.lua deleted file mode 100644 index 29f1703..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_06.lua +++ /dev/null @@ -1,132 +0,0 @@ --- START OF SOURCE -- -foo=true -foo=false -foo=nil -foo=1.23e45 -foo=-1 -foo=(0) -foo=1+2 -foo=1+2*3-4/5 --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: true - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: false - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: nil - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1.23e+45 - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - subexpr: uop='-' - simpleexp: =1 - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=6 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: begin ( expr ) - expr: - simpleexp: =0 - prefixexp: end ( expr ) - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=7 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1 - subexpr: binop='+' - simpleexp: =2 - subexpr: -- evaluate - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=8 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1 - subexpr: binop='+' - simpleexp: =2 - subexpr: binop='*' - simpleexp: =3 - subexpr: -- evaluate - subexpr: -- evaluate - subexpr: binop='-' - simpleexp: =4 - subexpr: binop='/' - simpleexp: =5 - subexpr: -- evaluate - subexpr: -- evaluate - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_07.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_07.lua deleted file mode 100644 index c3a4600..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_07.lua +++ /dev/null @@ -1,147 +0,0 @@ --- START OF SOURCE -- -if foo then foo=1 end -if foo then foo=1 else foo=0 end -if foo then foo=1 elseif not foo then foo=0 end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'if' line=1 - if_stat: if...then - test_then_block: test condition - cond: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - cond: end - test_then_block: then block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - if_stat: end - -- STATEMENT: end 'if' - - -- STATEMENT: begin 'if' line=2 - if_stat: if...then - test_then_block: test condition - cond: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - cond: end - test_then_block: then block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - if_stat: else... - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =0 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - if_stat: end - -- STATEMENT: end 'if' - - -- STATEMENT: begin 'if' line=3 - if_stat: if...then - test_then_block: test condition - cond: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - cond: end - test_then_block: then block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =1 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - if_stat: elseif...then - test_then_block: test condition - cond: begin - expr: - subexpr: uop='not' - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - cond: end - test_then_block: then block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =0 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - if_stat: end - -- STATEMENT: end 'if' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_08.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_08.lua deleted file mode 100644 index d086c98..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_08.lua +++ /dev/null @@ -1,66 +0,0 @@ --- START OF SOURCE -- -do return end -do return 123 end -do return "foo","bar" end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'do' line=1 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'return' line=1 - return_stat: no return values - -- STATEMENT: end 'return' - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - -- STATEMENT: begin 'do' line=2 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'return' line=2 - return_stat: begin - explist1: begin - expr: - simpleexp: =123 - explist1: end - return_stat: end - -- STATEMENT: end 'return' - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - -- STATEMENT: begin 'do' line=3 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'return' line=3 - return_stat: begin - explist1: begin - expr: - simpleexp: =foo - codestring: "foo" - explist1: ',' -- continuation - expr: - simpleexp: =bar - codestring: "bar" - explist1: end - return_stat: end - -- STATEMENT: end 'return' - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua deleted file mode 100644 index 67c6cf3..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua +++ /dev/null @@ -1,103 +0,0 @@ --- START OF SOURCE -- -while true do foo=not foo end -while foo~=42 do foo=foo-1 end -while true do break end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'while' line=1 - while_stat: begin/condition - cond: begin - expr: - simpleexp: true - cond: end - enterblock(isbreakable=true) - while_stat: block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - subexpr: uop='not' - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - while_stat: end - -- STATEMENT: end 'while' - - -- STATEMENT: begin 'while' line=2 - while_stat: begin/condition - cond: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - subexpr: binop='~=' - simpleexp: =42 - subexpr: -- evaluate - cond: end - enterblock(isbreakable=true) - while_stat: block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - subexpr: binop='-' - simpleexp: =1 - subexpr: -- evaluate - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - while_stat: end - -- STATEMENT: end 'while' - - -- STATEMENT: begin 'while' line=3 - while_stat: begin/condition - cond: begin - expr: - simpleexp: true - cond: end - enterblock(isbreakable=true) - while_stat: block - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'break' line=3 - break_stat: -- break out of loop - -- STATEMENT: end 'break' - leaveblock - block: end - leaveblock - while_stat: end - -- STATEMENT: end 'while' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_10.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_10.lua deleted file mode 100644 index b8e7754..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_10.lua +++ /dev/null @@ -1,100 +0,0 @@ --- START OF SOURCE -- -repeat foo=foo.."bar" until false -repeat foo=foo/2 until foo<1 -repeat break until false --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'repeat' line=1 - repeat_stat: begin - enterblock(isbreakable=true) - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - subexpr: binop='..' - simpleexp: =bar - codestring: "bar" - subexpr: -- evaluate - explist1: end - -- STATEMENT: end 'expr' - - repeat_stat: condition - cond: begin - expr: - simpleexp: false - cond: end - leaveblock - leaveblock - repeat_stat: end - -- STATEMENT: end 'repeat' - - -- STATEMENT: begin 'repeat' line=2 - repeat_stat: begin - enterblock(isbreakable=true) - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - subexpr: binop='/' - simpleexp: =2 - subexpr: -- evaluate - explist1: end - -- STATEMENT: end 'expr' - - repeat_stat: condition - cond: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - subexpr: binop='<' - simpleexp: =1 - subexpr: -- evaluate - cond: end - leaveblock - leaveblock - repeat_stat: end - -- STATEMENT: end 'repeat' - - -- STATEMENT: begin 'repeat' line=3 - repeat_stat: begin - enterblock(isbreakable=true) - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'break' line=3 - break_stat: -- break out of loop - -- STATEMENT: end 'break' - repeat_stat: condition - cond: begin - expr: - simpleexp: false - cond: end - leaveblock - leaveblock - repeat_stat: end - -- STATEMENT: end 'repeat' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_11.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_11.lua deleted file mode 100644 index 461ea82..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_11.lua +++ /dev/null @@ -1,192 +0,0 @@ --- START OF SOURCE -- -for i=1,10 do foo=i end -for i=1,10,2 do break end -for i in foo do bar=0 end -for i,j in foo,bar do baz=0 end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'for' line=1 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'i' - for_stat: numerical loop - new_localvar: '(for index)' - new_localvar: '(for limit)' - new_localvar: '(for step)' - new_localvar: 'i' - fornum: begin - fornum: index start - exp1: begin - expr: - simpleexp: =1 - exp1: end - fornum: index stop - exp1: begin - expr: - simpleexp: =10 - exp1: end - fornum: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'i' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - fornum: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - -- STATEMENT: begin 'for' line=2 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'i' - for_stat: numerical loop - new_localvar: '(for index)' - new_localvar: '(for limit)' - new_localvar: '(for step)' - new_localvar: 'i' - fornum: begin - fornum: index start - exp1: begin - expr: - simpleexp: =1 - exp1: end - fornum: index stop - exp1: begin - expr: - simpleexp: =10 - exp1: end - fornum: index step - exp1: begin - expr: - simpleexp: =2 - exp1: end - fornum: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'break' line=2 - break_stat: -- break out of loop - -- STATEMENT: end 'break' - leaveblock - block: end - leaveblock - fornum: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - -- STATEMENT: begin 'for' line=3 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'i' - for_stat: list-based loop - forlist: begin - new_localvar: '(for generator)' - new_localvar: '(for state)' - new_localvar: '(for control)' - new_localvar: 'i' - forlist: explist1 - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - explist1: end - forlist: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =0 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - forlist: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - -- STATEMENT: begin 'for' line=4 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'i' - for_stat: list-based loop - forlist: begin - new_localvar: '(for generator)' - new_localvar: '(for state)' - new_localvar: '(for control)' - new_localvar: 'i' - str_checkname: 'j' - new_localvar: 'j' - forlist: explist1 - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VGLOBAL' - explist1: end - forlist: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: =0 - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - forlist: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_12.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_12.lua deleted file mode 100644 index c423d85..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_12.lua +++ /dev/null @@ -1,52 +0,0 @@ --- START OF SOURCE -- -local foo -local foo,bar,baz -local foo,bar="foo","bar" --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local statement - localstat: begin - str_checkname: 'foo' - new_localvar: 'foo' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=2 - local_stat: local statement - localstat: begin - str_checkname: 'foo' - new_localvar: 'foo' - str_checkname: 'bar' - new_localvar: 'bar' - str_checkname: 'baz' - new_localvar: 'baz' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=3 - local_stat: local statement - localstat: begin - str_checkname: 'foo' - new_localvar: 'foo' - str_checkname: 'bar' - new_localvar: 'bar' - localstat: -- assignment - explist1: begin - expr: - simpleexp: =foo - codestring: "foo" - explist1: ',' -- continuation - expr: - simpleexp: =bar - codestring: "bar" - explist1: end - localstat: end - -- STATEMENT: end 'local' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_13.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_13.lua deleted file mode 100644 index b5f598a..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_13.lua +++ /dev/null @@ -1,108 +0,0 @@ --- START OF SOURCE -- -local function foo() return end -local function foo(a) return end -local function foo(x,y,z) return end -local function foo(x,...) return end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local function - localfunc: begin - str_checkname: 'foo' - new_localvar: 'foo' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=1 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=2 - local_stat: local function - localfunc: begin - str_checkname: 'foo' - new_localvar: 'foo' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'a' - new_localvar: 'a' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=2 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=3 - local_stat: local function - localfunc: begin - str_checkname: 'foo' - new_localvar: 'foo' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'x' - new_localvar: 'x' - str_checkname: 'y' - new_localvar: 'y' - str_checkname: 'z' - new_localvar: 'z' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=3 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=4 - local_stat: local function - localfunc: begin - str_checkname: 'foo' - new_localvar: 'foo' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'x' - new_localvar: 'x' - parlist: ... (dots) - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=4 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_14.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_14.lua deleted file mode 100644 index a6b9ad0..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_14.lua +++ /dev/null @@ -1,112 +0,0 @@ --- START OF SOURCE -- -function foo() return end -function foo(a) return end -function foo(x,y,z) return end -function foo(x,...) return end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'function' line=1 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=1 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - -- STATEMENT: begin 'function' line=2 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'a' - new_localvar: 'a' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=2 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - -- STATEMENT: begin 'function' line=3 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'x' - new_localvar: 'x' - str_checkname: 'y' - new_localvar: 'y' - str_checkname: 'z' - new_localvar: 'z' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=3 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - -- STATEMENT: begin 'function' line=4 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'x' - new_localvar: 'x' - parlist: ... (dots) - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=4 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_15.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_15.lua deleted file mode 100644 index 497eeaf..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_15.lua +++ /dev/null @@ -1,140 +0,0 @@ --- START OF SOURCE -- -function foo.bar(p) return end -function foo.bar.baz(p) return end -function foo:bar(p) return end -function foo.bar.baz(p) return end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'function' line=1 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: -- '.' field - field: operator=. - checkname: - str_checkname: 'bar' - codestring: "bar" - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'p' - new_localvar: 'p' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=1 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - -- STATEMENT: begin 'function' line=2 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: -- '.' field - field: operator=. - checkname: - str_checkname: 'bar' - codestring: "bar" - funcname: -- '.' field - field: operator=. - checkname: - str_checkname: 'baz' - codestring: "baz" - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'p' - new_localvar: 'p' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=2 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - -- STATEMENT: begin 'function' line=3 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: -- ':' field - field: operator=: - checkname: - str_checkname: 'bar' - codestring: "bar" - funcname: end - function_stat: body needself='true' - open_func - body: begin - new_localvar: 'self' - body: parlist - parlist: begin - str_checkname: 'p' - new_localvar: 'p' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=3 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - -- STATEMENT: begin 'function' line=4 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: -- '.' field - field: operator=. - checkname: - str_checkname: 'bar' - codestring: "bar" - funcname: -- '.' field - field: operator=. - checkname: - str_checkname: 'baz' - codestring: "baz" - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'p' - new_localvar: 'p' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=4 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_16.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_16.lua deleted file mode 100644 index b7907b8..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_16.lua +++ /dev/null @@ -1,128 +0,0 @@ --- START OF SOURCE -- -foo = function() return end -foo = function(x,y) return end -foo = function(...) return end -foo = function(...) local bar = ... return end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: function - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=1 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: function - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'x' - new_localvar: 'x' - str_checkname: 'y' - new_localvar: 'y' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=2 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: function - open_func - body: begin - body: parlist - parlist: begin - parlist: ... (dots) - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'return' line=3 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: function - open_func - body: begin - body: parlist - parlist: begin - parlist: ... (dots) - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'local' line=4 - local_stat: local statement - localstat: begin - str_checkname: 'bar' - new_localvar: 'bar' - localstat: -- assignment - explist1: begin - expr: - simpleexp: ... - explist1: end - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'return' line=4 - return_stat: no return values - -- STATEMENT: end 'return' - body: end - close_func - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_17.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_17.lua deleted file mode 100644 index fadc7f9..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_17.lua +++ /dev/null @@ -1,110 +0,0 @@ --- START OF SOURCE -- -foo = {} -foo = { 1,2,3; "foo"; } -foo = { bar=77, baz=88, } -foo = { ["bar"]=77, ["baz"]=88, } --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: constructor - constructor: begin - constructor: end - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: constructor - constructor: begin - listfield: expr - expr: - simpleexp: =1 - listfield: expr - expr: - simpleexp: =2 - listfield: expr - expr: - simpleexp: =3 - listfield: expr - expr: - simpleexp: =foo - codestring: "foo" - constructor: end - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: constructor - constructor: begin - recfield: name - checkname: - str_checkname: 'bar' - codestring: "bar" - expr: - simpleexp: =77 - recfield: name - checkname: - str_checkname: 'baz' - codestring: "baz" - expr: - simpleexp: =88 - constructor: end - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: constructor - constructor: begin - recfield: [ exp1 ] - index: begin '[' - expr: - simpleexp: =bar - codestring: "bar" - index: end ']' - expr: - simpleexp: =77 - recfield: [ exp1 ] - index: begin '[' - expr: - simpleexp: =baz - codestring: "baz" - index: end ']' - expr: - simpleexp: =88 - constructor: end - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_18.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_18.lua deleted file mode 100644 index 732b4d6..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_18.lua +++ /dev/null @@ -1,26 +0,0 @@ --- START OF SOURCE -- - print(a) --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'expr' line=1 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'a' - singlevar(kind): 'VGLOBAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_19.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_19.lua deleted file mode 100644 index 9863b4a..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_19.lua +++ /dev/null @@ -1,35 +0,0 @@ --- START OF SOURCE -- - local a - print(a) --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local statement - localstat: begin - str_checkname: 'a' - new_localvar: 'a' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'a' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_20.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_20.lua deleted file mode 100644 index bc37280..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_20.lua +++ /dev/null @@ -1,64 +0,0 @@ --- START OF SOURCE -- - do - local a - print(a) - end - print(a) --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'do' line=1 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'local' line=2 - local_stat: local statement - localstat: begin - str_checkname: 'a' - new_localvar: 'a' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'a' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'a' - singlevar(kind): 'VGLOBAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_21.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_21.lua deleted file mode 100644 index b2bac4b..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_21.lua +++ /dev/null @@ -1,77 +0,0 @@ --- START OF SOURCE -- - local a,b,c - do - local b - print(b) - end - print(b) --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local statement - localstat: begin - str_checkname: 'a' - new_localvar: 'a' - str_checkname: 'b' - new_localvar: 'b' - str_checkname: 'c' - new_localvar: 'c' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'do' line=2 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'local' line=3 - local_stat: local statement - localstat: begin - str_checkname: 'b' - new_localvar: 'b' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'b' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - -- STATEMENT: begin 'expr' line=6 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'b' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_22.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_22.lua deleted file mode 100644 index 6885f01..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_22.lua +++ /dev/null @@ -1,43 +0,0 @@ --- START OF SOURCE -- - local function foo() end - bar = foo --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local function - localfunc: begin - str_checkname: 'foo' - new_localvar: 'foo' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_23.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_23.lua deleted file mode 100644 index eb658ed..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_23.lua +++ /dev/null @@ -1,70 +0,0 @@ --- START OF SOURCE -- - do - local function foo() end - bar = foo - end - baz = foo --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'do' line=1 - do_stat: begin - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'local' line=2 - local_stat: local function - localfunc: begin - str_checkname: 'foo' - new_localvar: 'foo' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - leaveblock - block: end - do_stat: end - -- STATEMENT: end 'do' - - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_24.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_24.lua deleted file mode 100644 index 6403234..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_24.lua +++ /dev/null @@ -1,84 +0,0 @@ --- START OF SOURCE -- - local foo - local function bar() - baz = nil - foo = bar() - end - foo = bar --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local statement - localstat: begin - str_checkname: 'foo' - new_localvar: 'foo' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=2 - local_stat: local function - localfunc: begin - str_checkname: 'bar' - new_localvar: 'bar' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VGLOBAL' - expr_stat: assignment k='VGLOBAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - simpleexp: nil - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=4 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VUPVAL' - expr_stat: assignment k='VUPVAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VUPVAL' - primaryexp: ( funcargs - funcargs: begin '(' - funcargs: end -- expr is a VCALL - explist1: end - -- STATEMENT: end 'expr' - - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=6 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - expr_stat: assignment k='VLOCAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_25.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_25.lua deleted file mode 100644 index 594e267..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_25.lua +++ /dev/null @@ -1,159 +0,0 @@ --- START OF SOURCE -- - local foo - local function bar() - local function baz() - local foo, bar - foo = bar - foo = baz - end - foo = bar - foo = baz - end - foo = bar - foo = baz --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local statement - localstat: begin - str_checkname: 'foo' - new_localvar: 'foo' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'local' line=2 - local_stat: local function - localfunc: begin - str_checkname: 'bar' - new_localvar: 'bar' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'local' line=3 - local_stat: local function - localfunc: begin - str_checkname: 'baz' - new_localvar: 'baz' - localfunc: body - open_func - body: begin - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'local' line=4 - local_stat: local statement - localstat: begin - str_checkname: 'foo' - new_localvar: 'foo' - str_checkname: 'bar' - new_localvar: 'bar' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - expr_stat: assignment k='VLOCAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=6 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - expr_stat: assignment k='VLOCAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VUPVAL' - explist1: end - -- STATEMENT: end 'expr' - - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=8 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VUPVAL' - expr_stat: assignment k='VUPVAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VUPVAL' - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=9 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VUPVAL' - expr_stat: assignment k='VUPVAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - body: end - close_func - localfunc: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'expr' line=11 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - expr_stat: assignment k='VLOCAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VLOCAL' - explist1: end - -- STATEMENT: end 'expr' - - -- STATEMENT: begin 'expr' line=12 - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - expr_stat: assignment k='VLOCAL' - assignment: '=' -- RHS elements follows - explist1: begin - expr: - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VGLOBAL' - explist1: end - -- STATEMENT: end 'expr' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_26.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_26.lua deleted file mode 100644 index bfa3920..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_26.lua +++ /dev/null @@ -1,53 +0,0 @@ --- START OF SOURCE -- - function foo:bar() - print(self) - end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'function' line=1 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: -- ':' field - field: operator=: - checkname: - str_checkname: 'bar' - codestring: "bar" - funcname: end - function_stat: body needself='true' - open_func - body: begin - new_localvar: 'self' - body: parlist - parlist: begin - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'self' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_27.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_27.lua deleted file mode 100644 index 77db3ef..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_27.lua +++ /dev/null @@ -1,48 +0,0 @@ --- START OF SOURCE -- - function foo(...) - print(arg) - end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'function' line=1 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - parlist: ... (dots) - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'arg' - singlevar(kind): 'VGLOBAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_28.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_28.lua deleted file mode 100644 index e4c9e21..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_28.lua +++ /dev/null @@ -1,79 +0,0 @@ --- START OF SOURCE -- - local c,d - function foo(a,b,c) - print(a,c,d,e) - end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'local' line=1 - local_stat: local statement - localstat: begin - str_checkname: 'c' - new_localvar: 'c' - str_checkname: 'd' - new_localvar: 'd' - localstat: end - -- STATEMENT: end 'local' - - -- STATEMENT: begin 'function' line=2 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'a' - new_localvar: 'a' - str_checkname: 'b' - new_localvar: 'b' - str_checkname: 'c' - new_localvar: 'c' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'a' - singlevar(kind): 'VLOCAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'c' - singlevar(kind): 'VLOCAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'd' - singlevar(kind): 'VUPVAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'e' - singlevar(kind): 'VGLOBAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_29.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_29.lua deleted file mode 100644 index b278ba2..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_29.lua +++ /dev/null @@ -1,94 +0,0 @@ --- START OF SOURCE -- - function foo(a,b) - local bar = function(c,d) - print(a,b,c,d) - end - end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'function' line=1 - function_stat: begin - funcname: begin - str_checkname: 'foo' - singlevar(kind): 'VGLOBAL' - funcname: end - function_stat: body needself='false' - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'a' - new_localvar: 'a' - str_checkname: 'b' - new_localvar: 'b' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'local' line=2 - local_stat: local statement - localstat: begin - str_checkname: 'bar' - new_localvar: 'bar' - localstat: -- assignment - explist1: begin - expr: - simpleexp: function - open_func - body: begin - body: parlist - parlist: begin - str_checkname: 'c' - new_localvar: 'c' - str_checkname: 'd' - new_localvar: 'd' - parlist: end - body: chunk - chunk: - -- STATEMENT: begin 'expr' line=3 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'a' - singlevar(kind): 'VUPVAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'b' - singlevar(kind): 'VUPVAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'c' - singlevar(kind): 'VLOCAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'd' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - body: end - close_func - explist1: end - localstat: end - -- STATEMENT: end 'local' - - body: end - close_func - function_stat: end - -- STATEMENT: end 'function' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_30.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_30.lua deleted file mode 100644 index 3807d14..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_30.lua +++ /dev/null @@ -1,119 +0,0 @@ --- START OF SOURCE -- - for i = 1,10 do - print(i) - end - for i = 1,10,-2 do - print(i) - end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'for' line=1 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'i' - for_stat: numerical loop - new_localvar: '(for index)' - new_localvar: '(for limit)' - new_localvar: '(for step)' - new_localvar: 'i' - fornum: begin - fornum: index start - exp1: begin - expr: - simpleexp: =1 - exp1: end - fornum: index stop - exp1: begin - expr: - simpleexp: =10 - exp1: end - fornum: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'i' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - fornum: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - -- STATEMENT: begin 'for' line=4 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'i' - for_stat: numerical loop - new_localvar: '(for index)' - new_localvar: '(for limit)' - new_localvar: '(for step)' - new_localvar: 'i' - fornum: begin - fornum: index start - exp1: begin - expr: - simpleexp: =1 - exp1: end - fornum: index stop - exp1: begin - expr: - simpleexp: =10 - exp1: end - fornum: index step - exp1: begin - expr: - subexpr: uop='-' - simpleexp: =2 - exp1: end - fornum: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'i' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - fornum: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_31.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_31.lua deleted file mode 100644 index 0d0a602..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_31.lua +++ /dev/null @@ -1,127 +0,0 @@ --- START OF SOURCE -- - for foo in bar() do - print(foo) - end - for foo,bar,baz in spring() do - print(foo,bar,baz) - end --- END OF SOURCE -- - --- TOP: begin - open_func - - chunk: - -- STATEMENT: begin 'for' line=1 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'foo' - for_stat: list-based loop - forlist: begin - new_localvar: '(for generator)' - new_localvar: '(for state)' - new_localvar: '(for control)' - new_localvar: 'foo' - forlist: explist1 - explist1: begin - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - funcargs: end -- expr is a VCALL - explist1: end - forlist: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=2 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - forlist: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - -- STATEMENT: begin 'for' line=4 - for_stat: begin - enterblock(isbreakable=true) - str_checkname: 'foo' - for_stat: list-based loop - forlist: begin - new_localvar: '(for generator)' - new_localvar: '(for state)' - new_localvar: '(for control)' - new_localvar: 'foo' - str_checkname: 'bar' - new_localvar: 'bar' - str_checkname: 'baz' - new_localvar: 'baz' - forlist: explist1 - explist1: begin - expr: - prefixexp: - str_checkname: 'spring' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - funcargs: end -- expr is a VCALL - explist1: end - forlist: body - enterblock(isbreakable=false) - block: begin - enterblock(isbreakable=false) - chunk: - -- STATEMENT: begin 'expr' line=5 - prefixexp: - str_checkname: 'print' - singlevar(kind): 'VGLOBAL' - primaryexp: ( funcargs - funcargs: begin '(' - explist1: begin - expr: - prefixexp: - str_checkname: 'foo' - singlevar(kind): 'VLOCAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'bar' - singlevar(kind): 'VLOCAL' - explist1: ',' -- continuation - expr: - prefixexp: - str_checkname: 'baz' - singlevar(kind): 'VLOCAL' - explist1: end - funcargs: end -- expr is a VCALL - expr_stat: function call k='VCALL' - -- STATEMENT: end 'expr' - - leaveblock - block: end - leaveblock - forlist: end - leaveblock - for_stat: end - -- STATEMENT: end 'for' - - close_func --- TOP: end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_llex_mk2.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_llex_mk2.lua deleted file mode 100644 index e9ad45f..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_llex_mk2.lua +++ /dev/null @@ -1,566 +0,0 @@ ---[[-------------------------------------------------------------------- - - test_llex_mk2.lua - Test for llex_mk2.lua - This file is part of Yueliang. - - Copyright (c) 2008 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- if BRIEF is not set to false, auto-test will silently succeed ------------------------------------------------------------------------- -BRIEF = true -- if set to true, messages are less verbose - -package.path = "../?.lua;"..package.path -local llex = require "llex_mk2" - ------------------------------------------------------------------------- --- simple manual tests ------------------------------------------------------------------------- - ---[[ -local function dump(z) - llex.init(z) - while true do - local token, seminfo = llex.llex() - if token == "" then - seminfo = " "..seminfo - elseif token == "" then - seminfo = " "..seminfo - elseif token == "" then - seminfo = " '"..seminfo.."'" - else - seminfo = "" - end - io.stdout:write(token..seminfo.."\n") - if token == "" then break end - end -end - -dump("local c = luaZ:zgetc(z)") -os.exit() ---]] - ------------------------------------------------------------------------- --- auto-testing of simple test cases to validate lexer behaviour: --- * NOTE coverage has not been checked; not comprehensive --- * only test cases with non-empty comments are processed --- * if no result, then the output is displayed for manual decision --- (output may be used to set expected success or fail text) --- * cases expected to be successful may be a partial match --- * cases expected to fail may also be a partial match ------------------------------------------------------------------------- - --- [=====[ -local function auto_test() - local PASS, FAIL = true, false - ------------------------------------------------------------------ - -- table of test cases - ------------------------------------------------------------------ - local test_cases = - { - ------------------------------------------------------------- - --{ "comment", -- comment about the test - -- "chunk", -- chunk to test - -- PASS, -- PASS or FAIL outcome - -- "output", -- output to compare against - --}, - ------------------------------------------------------------- - { "empty chunk string, test EOS", - "", - PASS, "1 ", - }, - ------------------------------------------------------------- - { "line number counting", - "\n\n\r\n", - PASS, "4 ", - }, - ------------------------------------------------------------- - { "various whitespaces", - " \n\t\t\n \t \t \n\n", - PASS, "5 ", - }, - ------------------------------------------------------------- - { "short comment ending in EOS", - "-- moo moo", - PASS, "1 ", - }, - ------------------------------------------------------------- - { "short comment ending in newline", - "-- moo moo\n", - PASS, "2 ", - }, - ------------------------------------------------------------- - { "several lines of short comments", - "--moo\n-- moo moo\n\n--\tmoo\n", - PASS, "5 ", - }, - ------------------------------------------------------------- - { "basic block comment 1", - "--[[bovine]]", - PASS, "1 ", - }, - ------------------------------------------------------------- - { "basic block comment 2", - "--[=[bovine]=]", - PASS, "1 ", - }, - ------------------------------------------------------------- - { "basic block comment 3", - "--[====[-[[bovine]]-]====]", - PASS, "1 ", - }, - ------------------------------------------------------------- - { "unterminated block comment 1", - "--[[bovine", - FAIL, ":1: unfinished long comment", - }, - ------------------------------------------------------------- - { "unterminated block comment 2", - "--[==[bovine", - FAIL, ":1: unfinished long comment", - }, - ------------------------------------------------------------- - { "unterminated block comment 3", - "--[[bovine]", - FAIL, ":1: unfinished long comment", - }, - ------------------------------------------------------------- - { "unterminated block comment 4", - "--[[bovine\nmoo moo\nwoof", - FAIL, ":3: unfinished long comment", - }, - ------------------------------------------------------------- - { "basic long string 1", - "\n[[bovine]]\n", - PASS, "2 = bovine\n3 ", - }, - ------------------------------------------------------------- - { "basic long string 2", - "\n[=[bovine]=]\n", - PASS, "2 = bovine\n3 ", - }, - ------------------------------------------------------------- - { "first newline consumed in long string", - "[[\nmoo]]", - PASS, "2 = moo\n2 ", - }, - ------------------------------------------------------------- - { "multiline long string 1", - "[[moo\nmoo moo\n]]", - PASS, "3 = moo\nmoo moo\n\n3 ", - }, - ------------------------------------------------------------- - { "multiline long string 2", - "[===[moo\n[=[moo moo]=]\n]===]", - PASS, "3 = moo\n[=[moo moo]=]\n\n3 ", - }, - ------------------------------------------------------------- - { "unterminated long string 1", - "\n[[\nbovine", - FAIL, ":3: unfinished long string", - }, - ------------------------------------------------------------- - { "unterminated long string 2", - "[[bovine]", - FAIL, ":1: unfinished long string", - }, - ------------------------------------------------------------- - { "unterminated long string 2", - "[==[bovine]==", - FAIL, ":1: unfinished long string", - }, - ------------------------------------------------------------- - { "complex long string 1", - "[=[moo[[moo]]moo]=]", - PASS, "moo[[moo]]moo", - }, - ------------------------------------------------------------- - { "complex long string 2", - "[=[moo[[moo[[[[]]]]moo]]moo]=]", - PASS, "moo[[moo[[[[]]]]moo]]moo", - }, - ------------------------------------------------------------- - { "complex long string 3", - "[=[[[[[]]]][[[[]]]]]=]", - PASS, "[[[[]]]][[[[]]]]", - }, - ------------------------------------------------------------- - -- NOTE: this native lexer does not support compatible long - -- strings (LUA_COMPAT_LSTR) - ------------------------------------------------------------- - --{ "deprecated long string 1", - -- "[[moo[[moo]]moo]]", - -- FAIL, ":1: nesting of [[...]] is deprecated near '['", - --}, - --------------------------------------------------------------- - --{ "deprecated long string 2", - -- "[[[[ \n", - -- FAIL, ":1: nesting of [[...]] is deprecated near '['", - --}, - --------------------------------------------------------------- - --{ "deprecated long string 3", - -- "[[moo[[moo[[[[]]]]moo]]moo]]", - -- FAIL, ":1: nesting of [[...]] is deprecated near '['", - --}, - --------------------------------------------------------------- - --{ "deprecated long string 4", - -- "[[[[[[]]]][[[[]]]]]]", - -- FAIL, ":1: nesting of [[...]] is deprecated near '['", - --}, - ------------------------------------------------------------- - { "brackets in long strings 1", - "[[moo[moo]]", - PASS, "moo[moo", - }, - ------------------------------------------------------------- - { "brackets in long strings 2", - "[=[moo[[moo]moo]]moo]=]", - PASS, "moo[[moo]moo]]moo", - }, - ------------------------------------------------------------- - { "unprocessed escapes in long strings", - [[ [=[\a\b\f\n\r\t\v\123]=] ]], - PASS, [[\a\b\f\n\r\t\v\123]], - }, - ------------------------------------------------------------- - { "unbalanced long string", - "[[moo]]moo]]", - PASS, "1 = moo\n1 = moo\n1 CHAR = ']'\n1 CHAR = ']'\n1 ", - }, - ------------------------------------------------------------- - { "keywords 1", - "and break do else", - PASS, "1 and\n1 break\n1 do\n1 else\n1 ", - }, - ------------------------------------------------------------- - { "keywords 2", - "elseif end false for", - PASS, "1 elseif\n1 end\n1 false\n1 for\n1 ", - }, - ------------------------------------------------------------- - { "keywords 3", - "function if in local nil", - PASS, "1 function\n1 if\n1 in\n1 local\n1 nil\n1 ", - }, - ------------------------------------------------------------- - { "keywords 4", - "not or repeat return", - PASS, "1 not\n1 or\n1 repeat\n1 return\n1 ", - }, - ------------------------------------------------------------- - { "keywords 5", - "then true until while", - PASS, "1 then\n1 true\n1 until\n1 while\n1 ", - }, - ------------------------------------------------------------- - { "concat and dots", - ".. ...", - PASS, "1 ..\n1 ...\n1 ", - }, - ------------------------------------------------------------- - -- NOTE: in Lua 5.1.x, shbang handling is no longer performed - -- in the lexer; it is now done in lauxlib.c (luaL_loadfile) - -- so the following cannot be performed by the lexer... - ------------------------------------------------------------- - --{ "shbang handling 1", - -- "#blahblah", - -- PASS, "1 ", - --}, - ------------------------------------------------------------- - --{ "shbang handling 2", - -- "#blahblah\nmoo moo\n", - -- PASS, "2 = moo\n2 = moo\n3 ", - --}, - ------------------------------------------------------------- - { "empty string", - [['']], - PASS, "1 = \n1 ", - }, - ------------------------------------------------------------- - { "single-quoted string", - [['bovine']], - PASS, "1 = bovine\n1 ", - }, - ------------------------------------------------------------- - { "double-quoted string", - [["bovine"]], - PASS, "1 = bovine\n1 ", - }, - ------------------------------------------------------------- - { "unterminated string 1", - [['moo ]], - FAIL, ":1: unfinished string", - }, - ------------------------------------------------------------- - { "unterminated string 2", - [["moo \n]], - FAIL, ":1: unfinished string", - }, - ------------------------------------------------------------- - { "escaped newline in string, line number counted", - "\"moo\\\nmoo\\\nmoo\"", - PASS, "3 = moo\nmoo\nmoo\n3 ", - }, - ------------------------------------------------------------- - { "escaped characters in string 1", - [["moo\amoo"]], - PASS, "1 = moo\amoo", - }, - ------------------------------------------------------------- - { "escaped characters in string 2", - [["moo\bmoo"]], - PASS, "1 = moo\bmoo", - }, - ------------------------------------------------------------- - { "escaped characters in string 3", - [["moo\f\n\r\t\vmoo"]], - PASS, "1 = moo\f\n\r\t\vmoo", - }, - ------------------------------------------------------------- - { "escaped characters in string 4", - [["\\ \" \' \? \[ \]"]], - PASS, "1 = \\ \" \' \? \[ \]", - }, - ------------------------------------------------------------- - { "escaped characters in string 5", - [["\z \k \: \;"]], - PASS, "1 = z k : ;", - }, - ------------------------------------------------------------- - { "escaped characters in string 6", - [["\8 \65 \160 \180K \097097"]], - PASS, "1 = \8 \65 \160 \180K \097097\n", - }, - ------------------------------------------------------------- - { "escaped characters in string 7", - [["\666"]], - FAIL, ":1: escape sequence too large", - }, - ------------------------------------------------------------- - { "simple numbers", - "123 123+", - PASS, "1 = 123\n1 = 123\n1 CHAR = '+'\n1 ", - }, - ------------------------------------------------------------- - { "longer numbers", - "1234567890 12345678901234567890", - PASS, "1 = 1234567890\n1 = 1.2345678901235e+19\n", - }, - ------------------------------------------------------------- - { "fractional numbers", - ".123 .12345678901234567890", - PASS, "1 = 0.123\n1 = 0.12345678901235\n", - }, - ------------------------------------------------------------- - { "more numbers with decimal points", - "12345.67890", - PASS, "1 = 12345.6789\n", - }, - ------------------------------------------------------------- - { "malformed number with decimal points", - "1.1.", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "double decimal points", - ".1.1", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "double dots within numbers", - "1..1", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "incomplete exponential numbers", - "123e", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "exponential numbers 1", - "1234e5 1234e5.", - PASS, "1 = 123400000\n1 = 123400000\n1 CHAR = '.'", - }, - ------------------------------------------------------------- - { "exponential numbers 2", - "1234e56 1.23e123", - PASS, "1 = 1.234e+59\n1 = 1.23e+123\n", - }, - ------------------------------------------------------------- - { "exponential numbers 3", - "12.34e+", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "exponential numbers 4", - "12.34e+5 123.4e-5 1234.E+5", - PASS, "1 = 1234000\n1 = 0.001234\n1 = 123400000\n", - }, - ------------------------------------------------------------- - { "hexadecimal numbers", - "0x00FF 0X1234 0xDEADBEEF", - PASS, "1 = 255\n1 = 4660\n1 = 3735928559\n", - }, - ------------------------------------------------------------- - { "invalid hexadecimal numbers 1", - "0xFOO", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "invalid hexadecimal numbers 2", - "0.BAR", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "invalid hexadecimal numbers 3", - "0BAZ", - FAIL, ":1: malformed number", - }, - ------------------------------------------------------------- - { "single character symbols 1", - "= > < ~ #", - PASS, "1 CHAR = '='\n1 CHAR = '>'\n1 CHAR = '<'\n1 CHAR = '~'\n1 CHAR = '#'\n", - }, - ------------------------------------------------------------- - { "double character symbols", - "== >= <= ~=", - PASS, "1 ==\n1 >=\n1 <=\n1 ~=\n", - }, - ------------------------------------------------------------- - { "simple identifiers", - "abc ABC", - PASS, "1 = abc\n1 = ABC\n1 ", - }, - ------------------------------------------------------------- - { "more identifiers", - "_abc _ABC", - PASS, "1 = _abc\n1 = _ABC\n1 ", - }, - ------------------------------------------------------------- - { "still more identifiers", - "_aB_ _123", - PASS, "1 = _aB_\n1 = _123\n1 ", - }, - ------------------------------------------------------------- - -- NOTE: in Lua 5.1.x, this test is no longer performed - ------------------------------------------------------------- - --{ "invalid control character", - -- "\4", - -- FAIL, ":1: invalid control char near 'char(4)'", - --}, - ------------------------------------------------------------- - { "single character symbols 2", - "` ! @ $ %", - PASS, "1 CHAR = '`'\n1 CHAR = '!'\n1 CHAR = '@'\n1 CHAR = '$'\n1 CHAR = '%'\n", - }, - ------------------------------------------------------------- - { "single character symbols 3", - "^ & * ( )", - PASS, "1 CHAR = '^'\n1 CHAR = '&'\n1 CHAR = '*'\n1 CHAR = '('\n1 CHAR = ')'\n", - }, - ------------------------------------------------------------- - { "single character symbols 4", - "_ - + \\ |", - PASS, "1 = _\n1 CHAR = '-'\n1 CHAR = '+'\n1 CHAR = '\\'\n1 CHAR = '|'\n", - }, - ------------------------------------------------------------- - { "single character symbols 5", - "{ } [ ] :", - PASS, "1 CHAR = '{'\n1 CHAR = '}'\n1 CHAR = '['\n1 CHAR = ']'\n1 CHAR = ':'\n", - }, - ------------------------------------------------------------- - { "single character symbols 6", - "; , . / ?", - PASS, "1 CHAR = ';'\n1 CHAR = ','\n1 CHAR = '.'\n1 CHAR = '/'\n1 CHAR = '?'\n", - }, - ------------------------------------------------------------- - } - ------------------------------------------------------------------ - -- perform a test case - ------------------------------------------------------------------ - function do_test_case(count, test_case) - if comment == "" then return end -- skip empty entries - local comment, chunk, outcome, matcher = unpack(test_case) - local result = PASS - local output = "" - -- initialize lexer - llex.init(chunk, "=test") - -- lexer test loop - repeat - -- protected call - local status, token, seminfo = pcall(llex.llex) - output = output..llex.ln.." " - if status then - -- successful call - if #token > 1 then - if token == "" - or token == "" - or token == "" then - token = token.." = "..seminfo - end - elseif string.byte(token) >= 32 then -- displayable chars - token = "CHAR = '"..token.."'" - else -- control characters - token = "CHAR = (".. string.byte(token)..")" - end - output = output..token.."\n" - else - -- failed call - output = output..token -- token is the error message - result = FAIL - break - end - until token == "" - -- decision making and reporting - local head = "Test "..count..": "..comment - if matcher == "" then - -- nothing to check against, display for manual check - print(head.."\nMANUAL please check manually".. - "\n--chunk---------------------------------\n"..chunk.. - "\n--actual--------------------------------\n"..output.. - "\n\n") - return - else - if outcome == PASS then - -- success expected, may be a partial match - if string.find(output, matcher, 1, 1) and result == PASS then - if not BRIEF then print(head.."\nOK expected success\n") end - return - end - else - -- failure expected, may be a partial match - if string.find(output, matcher, 1, 1) and result == FAIL then - if not BRIEF then print(head.."\nOK expected failure\n") end - return - end - end - -- failed because of unmatched string or boolean result - local function passfail(status) - if status == PASS then return "PASS" else return "FAIL" end - end - print(head.." *FAILED*".. - "\noutcome="..passfail(outcome).. - "\nactual= "..passfail(result).. - "\n--chunk---------------------------------\n"..chunk.. - "\n--expected------------------------------\n"..matcher.. - "\n--actual--------------------------------\n"..output.. - "\n\n") - end - end - ------------------------------------------------------------------ - -- perform auto testing - ------------------------------------------------------------------ - for i,test_case in ipairs(test_cases) do - do_test_case(i, test_case) - end -end - -auto_test() ---]=====] diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2.lua deleted file mode 100644 index 11f2827..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2.lua +++ /dev/null @@ -1,329 +0,0 @@ ---[[-------------------------------------------------------------------- - - test_lparser_mk2.lua - Test for lparser_mk2.lua - This file is part of Yueliang. - - Copyright (c) 2008 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- test the whole kaboodle ------------------------------------------------------------------------- - -package.path = "../?.lua;"..package.path -local llex = require "llex_mk2" -local lparser = require "lparser_mk2" - ------------------------------------------------------------------------- --- dump contents of log table ------------------------------------------------------------------------- - -local function dump_log(fs) - local log = fs.log - for i = 1, #log do - print(log[i]) - end -end - ------------------------------------------------------------------------- --- try 1 ------------------------------------------------------------------------- - ---[=[ -llex.init("local a = 1", "=string") -lparser.init(llex) --- nothing is returned, so hope there is an error if problem occurs -local fs = lparser.parser() -dump_log(fs) ---]=] - ------------------------------------------------------------------------- --- try 2 ------------------------------------------------------------------------- - --- a slightly larger sample ---[=[ -llex.init([[ -local a = 47 -local b = "hello, world!" -print(a, b) -]], "@sample.lua") -lparser.init(llex) --- nothing is returned, so hope there is an error if problem occurs -local fs = lparser.parser() -dump_log(fs) ---]=] - ------------------------------------------------------------------------- --- automatic dumper of output log data ------------------------------------------------------------------------- - -local test_case = { --- 1 attempts to exercise most parts, extent of coverage not known -[[ -]], --- 2 -[[ --- foobar -]], --- 3 -[[ -do -end -]], --- 4 -[[ -do end -do end -]], --- 5 -[[ -foo() -foo{} -foo"" -foo:bar() -foo=false -foo.bar=true -foo[true]=nil -foo,bar=1,"a" -]], --- 6 -[[ -foo=true -foo=false -foo=nil -foo=1.23e45 -foo=-1 -foo=(0) -foo=1+2 -foo=1+2*3-4/5 -]], --- 7 -[[ -if foo then foo=1 end -if foo then foo=1 else foo=0 end -if foo then foo=1 elseif not foo then foo=0 end -]], --- 8 -[[ -do return end -do return 123 end -do return "foo","bar" end -]], --- 9 -[[ -while true do foo=not foo end -while foo~=42 do foo=foo-1 end -while true do break end -]], --- 10 -[[ -repeat foo=foo.."bar" until false -repeat foo=foo/2 until foo<1 -repeat break until false -]], --- 11 -[[ -for i=1,10 do foo=i end -for i=1,10,2 do break end -for i in foo do bar=0 end -for i,j in foo,bar do baz=0 end -]], --- 12 -[[ -local foo -local foo,bar,baz -local foo,bar="foo","bar" -]], --- 13 -[[ -local function foo() return end -local function foo(a) return end -local function foo(x,y,z) return end -local function foo(x,...) return end -]], --- 14 -[[ -function foo() return end -function foo(a) return end -function foo(x,y,z) return end -function foo(x,...) return end -]], --- 15 -[[ -function foo.bar(p) return end -function foo.bar.baz(p) return end -function foo:bar(p) return end -function foo.bar.baz(p) return end -]], --- 16 -[[ -foo = function() return end -foo = function(x,y) return end -foo = function(...) return end -foo = function(...) local bar = ... return end -]], --- 17 -[[ -foo = {} -foo = { 1,2,3; "foo"; } -foo = { bar=77, baz=88, } -foo = { ["bar"]=77, ["baz"]=88, } -]], --- 18 simple tests for variable management follows -[[ - print(a) -]], --- 19 -[[ - local a - print(a) -]], --- 20 -[[ - do - local a - print(a) - end - print(a) -]], --- 21 -[[ - local a,b,c - do - local b - print(b) - end - print(b) -]], --- 22 -[[ - local function foo() end - bar = foo -]], --- 23 -[[ - do - local function foo() end - bar = foo - end - baz = foo -]], --- 24 -[[ - local foo - local function bar() - baz = nil - foo = bar() - end - foo = bar -]], --- 25 -[[ - local foo - local function bar() - local function baz() - local foo, bar - foo = bar - foo = baz - end - foo = bar - foo = baz - end - foo = bar - foo = baz -]], --- 26 -[[ - function foo:bar() - print(self) - end -]], --- 27 -[[ - function foo(...) - print(arg) - end -]], --- 28 -[[ - local c,d - function foo(a,b,c) - print(a,c,d,e) - end -]], --- 29 -[[ - function foo(a,b) - local bar = function(c,d) - print(a,b,c,d) - end - end -]], --- 30 -[[ - for i = 1,10 do - print(i) - end - for i = 1,10,-2 do - print(i) - end -]], --- 31 -[[ - for foo in bar() do - print(foo) - end - for foo,bar,baz in spring() do - print(foo,bar,baz) - end -]], -} - --- helps to skip old stuff during development of snippets -local do_beg, do_end = 1, #test_case - --- loop for all example snippets -for i = do_beg, do_end do - local fname = "parser_log/sample_"..string.format("%02d", i)..".lua" - local src = test_case[i] - local OUTF = io.open(fname, "wb") - if not OUTF then error("failed to write to file '"..fname.."'") end - -- write out actual source for comparison - OUTF:write( - "-- START OF SOURCE --\n".. - src.. - "-- END OF SOURCE --\n".. - "\n" - ) - -- attempt to parse - llex.init(src, "=string") - lparser.init(llex) - local fs = lparser.parser() - -- grab logged messages and write - local log = fs.log - local indent = 0 - for i = 1, #log do - local ln = log[i] - -- handle indentation - local tag = string.sub(ln, 1, 2) - if tag == ">>" or tag == "<<" then - ln = string.sub(ln, 4) - end - if tag == ">>" then - indent = indent + 1 - end - OUTF:write(string.rep(" ", indent)..ln.."\n") - if tag == "<<" then - indent = indent - 1 - end - end - -- we're done - OUTF:close() -end diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2_2.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2_2.lua deleted file mode 100644 index c135a8c..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/test_lparser_mk2_2.lua +++ /dev/null @@ -1,159 +0,0 @@ ---[[-------------------------------------------------------------------- - - test_lparser_mk2_2.lua - Test for lparser_mk2.lua, using the test case file - This file is part of Yueliang. - - Copyright (c) 2006-2008 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * unlike the equivalent in the orig-5.1.3/ directory, this version --- tests only parsing, lparser_mk3 cannot generate binary chunks --- * the test cases are in the test_lua directory (test_parser-5.1.lua) -----------------------------------------------------------------------]] - --- * true if you want an output of all failure cases in native Lua, --- for checking whether test cases fail where you intend them to -local DEBUG_FAILS = false - ------------------------------------------------------------------------- --- test the whole kaboodle ------------------------------------------------------------------------- - -package.path = "../?.lua;"..package.path -local llex = require "llex_mk2" -local lparser = require "lparser_mk2" - ------------------------------------------------------------------------- --- load test cases ------------------------------------------------------------------------- - -dofile("../../test_lua/test_parser-5.1.lua") - -local test, expect, heading = {}, {}, {} -local total, total_pass, total_fail = 0, 0, 0 - -for ln in string.gfind(tests_source, "([^\n]*)\n") do - if string.find(ln, "^%s*%-%-") then - -- comment, ignore - else - local m, _, head = string.find(ln, "^%s*(TESTS:%s*.*)$") - if m then - heading[total + 1] = head -- informational heading - else - total = total + 1 - local n, _, flag = string.find(ln, "%s*%-%-%s*FAIL%s*$") - if n then -- FAIL test case - ln = string.sub(ln, 1, n - 1) -- remove comment - expect[total] = "FAIL" - total_fail = total_fail + 1 - else -- PASS test case - expect[total] = "PASS" - total_pass = total_pass + 1 - end--n - test[total] = ln - end--m - end--ln -end--for - -print("Tests loaded: "..total.." (total), " - ..total_pass.." (passes), " - ..total_fail.." (fails)") - ------------------------------------------------------------------------- --- verify test cases using native Lua ------------------------------------------------------------------------- - -local last_head = "TESTS: no heading yet" -for i = 1, total do - local test_case, expected, head = test[i], expect[i], heading[i] - -- show progress - if head then - last_head = head - if DEBUG_FAILS then print("\n"..head.."\n") end - end - ------------------------------------------------------------------ - -- perform test - local f, err = loadstring(test_case) - -- look at outcome - ------------------------------------------------------------------ - if f then-- actual PASS - if expected == "FAIL" then - print("\nVerified as PASS but expected to FAIL".. - "\n-------------------------------------") - print("Lastest heading: "..last_head) - print("TEST: "..test_case) - os.exit() - end - ------------------------------------------------------------------ - else-- actual FAIL - if expected == "PASS" then - print("\nVerified as FAIL but expected to PASS".. - "\n-------------------------------------") - print("Lastest heading: "..last_head) - print("TEST: "..test_case) - print("ERROR: "..err) - os.exit() - end - if DEBUG_FAILS then - print("TEST: "..test_case) - print("ERROR: "..err.."\n") - end - ------------------------------------------------------------------ - end--f -end--for - -print("Test cases verified using native Lua, no anomalies.") - ------------------------------------------------------------------------- --- test using Yueliang front end ------------------------------------------------------------------------- - -local last_head = "TESTS: no heading yet" -for i = 1, total do - local test_case, expected, head = test[i], expect[i], heading[i] - -- show progress - if head then last_head = head end - ------------------------------------------------------------------ - -- perform test - llex.init(test_case, "=test_sample") - lparser.init(llex) - - local status, func = pcall(lparser.parser) - -- look at outcome - ------------------------------------------------------------------ - if status then-- actual PASS - if expected == "FAIL" then - print("\nTested as PASS but expected to FAIL".. - "\n-----------------------------------") - print("Lastest heading: "..last_head) - print("TEST: "..test_case) - os.exit() - end - ------------------------------------------------------------------ - else-- actual FAIL - if expected == "PASS" then - print("\nTested as FAIL but expected to PASS".. - "\n-----------------------------------") - print("Lastest heading: "..last_head) - print("TEST: "..test_case) - os.exit() - else - io.stdout:write("-") - end - ------------------------------------------------------------------ - end--status - io.stdout:write("\rTesting ["..i.."]...") -end--for -print(" done.") - -print("Test cases run on Yueliang, no anomalies.") - --- end -- cgit v1.1