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