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.1.3/test/parser_log/sample_09.lua | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua (limited to 'LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua') 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 new file mode 100644 index 0000000..67c6cf3 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua @@ -0,0 +1,103 @@ +-- 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 -- cgit v1.1