From 2d1df4714e2736dbde7855ddcd76b4c1de822fa5 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 21:58:02 +1000 Subject: Added a big bunch of example lua scripts for testing the speed of lua compiling. --- .../nat-5.0.3/test/parser_log/sample_07.lua | 147 +++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_07.lua (limited to 'LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_07.lua') diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_07.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_07.lua new file mode 100644 index 0000000..8c0a738 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_07.lua @@ -0,0 +1,147 @@ +-- 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: name='foo' + cond: end + test_then_block: then block + block: begin + enterblock(isbreakable=false) + chunk: + -- STATEMENT: begin 'expr' line=1 + prefixexp: + str_checkname: 'foo' + singlevar: name='foo' + expr_stat: assignment k='VLOCAL' + 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: name='foo' + cond: end + test_then_block: then block + block: begin + enterblock(isbreakable=false) + chunk: + -- STATEMENT: begin 'expr' line=2 + prefixexp: + str_checkname: 'foo' + singlevar: name='foo' + expr_stat: assignment k='VLOCAL' + 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: name='foo' + expr_stat: assignment k='VLOCAL' + 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: name='foo' + cond: end + test_then_block: then block + block: begin + enterblock(isbreakable=false) + chunk: + -- STATEMENT: begin 'expr' line=3 + prefixexp: + str_checkname: 'foo' + singlevar: name='foo' + expr_stat: assignment k='VLOCAL' + 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: name='foo' + cond: end + test_then_block: then block + block: begin + enterblock(isbreakable=false) + chunk: + -- STATEMENT: begin 'expr' line=3 + prefixexp: + str_checkname: 'foo' + singlevar: name='foo' + expr_stat: assignment k='VLOCAL' + 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 -- cgit v1.1