diff options
Diffstat (limited to '')
31 files changed, 2582 insertions, 0 deletions
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_01.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_01.lua new file mode 100644 index 0000000..379cc9d --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_01.lua | |||
@@ -0,0 +1,9 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | -- END OF SOURCE -- | ||
3 | |||
4 | -- TOP: begin | ||
5 | open_func | ||
6 | |||
7 | chunk: | ||
8 | close_func | ||
9 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_02.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_02.lua new file mode 100644 index 0000000..13eb2e6 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_02.lua | |||
@@ -0,0 +1,10 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | -- foobar | ||
3 | -- END OF SOURCE -- | ||
4 | |||
5 | -- TOP: begin | ||
6 | open_func | ||
7 | |||
8 | chunk: | ||
9 | close_func | ||
10 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_03.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_03.lua new file mode 100644 index 0000000..33df29c --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_03.lua | |||
@@ -0,0 +1,21 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | do | ||
3 | end | ||
4 | -- END OF SOURCE -- | ||
5 | |||
6 | -- TOP: begin | ||
7 | open_func | ||
8 | |||
9 | chunk: | ||
10 | -- STATEMENT: begin 'do' line=1 | ||
11 | do_stat: begin | ||
12 | block: begin | ||
13 | enterblock(isbreakable=false) | ||
14 | chunk: | ||
15 | leaveblock | ||
16 | block: end | ||
17 | do_stat: end | ||
18 | -- STATEMENT: end 'do' | ||
19 | |||
20 | close_func | ||
21 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_04.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_04.lua new file mode 100644 index 0000000..d0fefbc --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_04.lua | |||
@@ -0,0 +1,31 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | do end | ||
3 | do end | ||
4 | -- END OF SOURCE -- | ||
5 | |||
6 | -- TOP: begin | ||
7 | open_func | ||
8 | |||
9 | chunk: | ||
10 | -- STATEMENT: begin 'do' line=1 | ||
11 | do_stat: begin | ||
12 | block: begin | ||
13 | enterblock(isbreakable=false) | ||
14 | chunk: | ||
15 | leaveblock | ||
16 | block: end | ||
17 | do_stat: end | ||
18 | -- STATEMENT: end 'do' | ||
19 | |||
20 | -- STATEMENT: begin 'do' line=2 | ||
21 | do_stat: begin | ||
22 | block: begin | ||
23 | enterblock(isbreakable=false) | ||
24 | chunk: | ||
25 | leaveblock | ||
26 | block: end | ||
27 | do_stat: end | ||
28 | -- STATEMENT: end 'do' | ||
29 | |||
30 | close_func | ||
31 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_05.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_05.lua new file mode 100644 index 0000000..8d6f962 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_05.lua | |||
@@ -0,0 +1,129 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | foo() | ||
3 | foo{} | ||
4 | foo"" | ||
5 | foo:bar() | ||
6 | foo=false | ||
7 | foo.bar=true | ||
8 | foo[true]=nil | ||
9 | foo,bar=1,"a" | ||
10 | -- END OF SOURCE -- | ||
11 | |||
12 | -- TOP: begin | ||
13 | open_func | ||
14 | |||
15 | chunk: | ||
16 | -- STATEMENT: begin 'expr' line=1 | ||
17 | prefixexp: <name> | ||
18 | str_checkname: 'foo' | ||
19 | singlevar: name='foo' | ||
20 | primaryexp: ( funcargs | ||
21 | funcargs: begin '(' | ||
22 | funcargs: end -- expr is a VCALL | ||
23 | expr_stat: function call k='VCALL' | ||
24 | -- STATEMENT: end 'expr' | ||
25 | |||
26 | -- STATEMENT: begin 'expr' line=2 | ||
27 | prefixexp: <name> | ||
28 | str_checkname: 'foo' | ||
29 | singlevar: name='foo' | ||
30 | primaryexp: { funcargs | ||
31 | funcargs: begin '{' | ||
32 | constructor: begin | ||
33 | constructor: end | ||
34 | funcargs: end -- expr is a VCALL | ||
35 | expr_stat: function call k='VCALL' | ||
36 | -- STATEMENT: end 'expr' | ||
37 | |||
38 | -- STATEMENT: begin 'expr' line=3 | ||
39 | prefixexp: <name> | ||
40 | str_checkname: 'foo' | ||
41 | singlevar: name='foo' | ||
42 | primaryexp: <string> funcargs | ||
43 | funcargs: begin <string> | ||
44 | codestring: "" | ||
45 | funcargs: end -- expr is a VCALL | ||
46 | expr_stat: function call k='VCALL' | ||
47 | -- STATEMENT: end 'expr' | ||
48 | |||
49 | -- STATEMENT: begin 'expr' line=4 | ||
50 | prefixexp: <name> | ||
51 | str_checkname: 'foo' | ||
52 | singlevar: name='foo' | ||
53 | primaryexp: :<name> funcargs | ||
54 | checkname: | ||
55 | str_checkname: 'bar' | ||
56 | codestring: "bar" | ||
57 | funcargs: begin '(' | ||
58 | funcargs: end -- expr is a VCALL | ||
59 | expr_stat: function call k='VCALL' | ||
60 | -- STATEMENT: end 'expr' | ||
61 | |||
62 | -- STATEMENT: begin 'expr' line=5 | ||
63 | prefixexp: <name> | ||
64 | str_checkname: 'foo' | ||
65 | singlevar: name='foo' | ||
66 | expr_stat: assignment k='VLOCAL' | ||
67 | assignment: '=' -- RHS elements follows | ||
68 | explist1: begin | ||
69 | expr: | ||
70 | simpleexp: false | ||
71 | explist1: end | ||
72 | -- STATEMENT: end 'expr' | ||
73 | |||
74 | -- STATEMENT: begin 'expr' line=6 | ||
75 | prefixexp: <name> | ||
76 | str_checkname: 'foo' | ||
77 | singlevar: name='foo' | ||
78 | primaryexp: '.' field | ||
79 | field: operator=. | ||
80 | checkname: | ||
81 | str_checkname: 'bar' | ||
82 | codestring: "bar" | ||
83 | expr_stat: assignment k='VINDEXED' | ||
84 | assignment: '=' -- RHS elements follows | ||
85 | explist1: begin | ||
86 | expr: | ||
87 | simpleexp: true | ||
88 | explist1: end | ||
89 | -- STATEMENT: end 'expr' | ||
90 | |||
91 | -- STATEMENT: begin 'expr' line=7 | ||
92 | prefixexp: <name> | ||
93 | str_checkname: 'foo' | ||
94 | singlevar: name='foo' | ||
95 | primaryexp: [ exp1 ] | ||
96 | index: begin '[' | ||
97 | expr: | ||
98 | simpleexp: true | ||
99 | index: end ']' | ||
100 | expr_stat: assignment k='VLOCAL' | ||
101 | assignment: '=' -- RHS elements follows | ||
102 | explist1: begin | ||
103 | expr: | ||
104 | simpleexp: nil | ||
105 | explist1: end | ||
106 | -- STATEMENT: end 'expr' | ||
107 | |||
108 | -- STATEMENT: begin 'expr' line=8 | ||
109 | prefixexp: <name> | ||
110 | str_checkname: 'foo' | ||
111 | singlevar: name='foo' | ||
112 | expr_stat: assignment k='VLOCAL' | ||
113 | assignment: ',' -- next LHS element | ||
114 | prefixexp: <name> | ||
115 | str_checkname: 'bar' | ||
116 | singlevar: name='bar' | ||
117 | assignment: '=' -- RHS elements follows | ||
118 | explist1: begin | ||
119 | expr: | ||
120 | simpleexp: <number>=1 | ||
121 | explist1: ',' -- continuation | ||
122 | expr: | ||
123 | simpleexp: <string>=a | ||
124 | codestring: "a" | ||
125 | explist1: end | ||
126 | -- STATEMENT: end 'expr' | ||
127 | |||
128 | close_func | ||
129 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_06.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_06.lua new file mode 100644 index 0000000..ca7776e --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_06.lua | |||
@@ -0,0 +1,132 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | foo=true | ||
3 | foo=false | ||
4 | foo=nil | ||
5 | foo=1.23e45 | ||
6 | foo=-1 | ||
7 | foo=(0) | ||
8 | foo=1+2 | ||
9 | foo=1+2*3-4/5 | ||
10 | -- END OF SOURCE -- | ||
11 | |||
12 | -- TOP: begin | ||
13 | open_func | ||
14 | |||
15 | chunk: | ||
16 | -- STATEMENT: begin 'expr' line=1 | ||
17 | prefixexp: <name> | ||
18 | str_checkname: 'foo' | ||
19 | singlevar: name='foo' | ||
20 | expr_stat: assignment k='VLOCAL' | ||
21 | assignment: '=' -- RHS elements follows | ||
22 | explist1: begin | ||
23 | expr: | ||
24 | simpleexp: true | ||
25 | explist1: end | ||
26 | -- STATEMENT: end 'expr' | ||
27 | |||
28 | -- STATEMENT: begin 'expr' line=2 | ||
29 | prefixexp: <name> | ||
30 | str_checkname: 'foo' | ||
31 | singlevar: name='foo' | ||
32 | expr_stat: assignment k='VLOCAL' | ||
33 | assignment: '=' -- RHS elements follows | ||
34 | explist1: begin | ||
35 | expr: | ||
36 | simpleexp: false | ||
37 | explist1: end | ||
38 | -- STATEMENT: end 'expr' | ||
39 | |||
40 | -- STATEMENT: begin 'expr' line=3 | ||
41 | prefixexp: <name> | ||
42 | str_checkname: 'foo' | ||
43 | singlevar: name='foo' | ||
44 | expr_stat: assignment k='VLOCAL' | ||
45 | assignment: '=' -- RHS elements follows | ||
46 | explist1: begin | ||
47 | expr: | ||
48 | simpleexp: nil | ||
49 | explist1: end | ||
50 | -- STATEMENT: end 'expr' | ||
51 | |||
52 | -- STATEMENT: begin 'expr' line=4 | ||
53 | prefixexp: <name> | ||
54 | str_checkname: 'foo' | ||
55 | singlevar: name='foo' | ||
56 | expr_stat: assignment k='VLOCAL' | ||
57 | assignment: '=' -- RHS elements follows | ||
58 | explist1: begin | ||
59 | expr: | ||
60 | simpleexp: <number>=1.23e+45 | ||
61 | explist1: end | ||
62 | -- STATEMENT: end 'expr' | ||
63 | |||
64 | -- STATEMENT: begin 'expr' line=5 | ||
65 | prefixexp: <name> | ||
66 | str_checkname: 'foo' | ||
67 | singlevar: name='foo' | ||
68 | expr_stat: assignment k='VLOCAL' | ||
69 | assignment: '=' -- RHS elements follows | ||
70 | explist1: begin | ||
71 | expr: | ||
72 | subexpr: uop='-' | ||
73 | simpleexp: <number>=1 | ||
74 | explist1: end | ||
75 | -- STATEMENT: end 'expr' | ||
76 | |||
77 | -- STATEMENT: begin 'expr' line=6 | ||
78 | prefixexp: <name> | ||
79 | str_checkname: 'foo' | ||
80 | singlevar: name='foo' | ||
81 | expr_stat: assignment k='VLOCAL' | ||
82 | assignment: '=' -- RHS elements follows | ||
83 | explist1: begin | ||
84 | expr: | ||
85 | prefixexp: begin ( expr ) | ||
86 | expr: | ||
87 | simpleexp: <number>=0 | ||
88 | prefixexp: end ( expr ) | ||
89 | explist1: end | ||
90 | -- STATEMENT: end 'expr' | ||
91 | |||
92 | -- STATEMENT: begin 'expr' line=7 | ||
93 | prefixexp: <name> | ||
94 | str_checkname: 'foo' | ||
95 | singlevar: name='foo' | ||
96 | expr_stat: assignment k='VLOCAL' | ||
97 | assignment: '=' -- RHS elements follows | ||
98 | explist1: begin | ||
99 | expr: | ||
100 | simpleexp: <number>=1 | ||
101 | subexpr: binop='+' | ||
102 | simpleexp: <number>=2 | ||
103 | subexpr: -- evaluate | ||
104 | explist1: end | ||
105 | -- STATEMENT: end 'expr' | ||
106 | |||
107 | -- STATEMENT: begin 'expr' line=8 | ||
108 | prefixexp: <name> | ||
109 | str_checkname: 'foo' | ||
110 | singlevar: name='foo' | ||
111 | expr_stat: assignment k='VLOCAL' | ||
112 | assignment: '=' -- RHS elements follows | ||
113 | explist1: begin | ||
114 | expr: | ||
115 | simpleexp: <number>=1 | ||
116 | subexpr: binop='+' | ||
117 | simpleexp: <number>=2 | ||
118 | subexpr: binop='*' | ||
119 | simpleexp: <number>=3 | ||
120 | subexpr: -- evaluate | ||
121 | subexpr: -- evaluate | ||
122 | subexpr: binop='-' | ||
123 | simpleexp: <number>=4 | ||
124 | subexpr: binop='/' | ||
125 | simpleexp: <number>=5 | ||
126 | subexpr: -- evaluate | ||
127 | subexpr: -- evaluate | ||
128 | explist1: end | ||
129 | -- STATEMENT: end 'expr' | ||
130 | |||
131 | close_func | ||
132 | -- TOP: end | ||
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 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | if foo then foo=1 end | ||
3 | if foo then foo=1 else foo=0 end | ||
4 | if foo then foo=1 elseif not foo then foo=0 end | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'if' line=1 | ||
12 | if_stat: if...then | ||
13 | test_then_block: test condition | ||
14 | cond: begin | ||
15 | expr: | ||
16 | prefixexp: <name> | ||
17 | str_checkname: 'foo' | ||
18 | singlevar: name='foo' | ||
19 | cond: end | ||
20 | test_then_block: then block | ||
21 | block: begin | ||
22 | enterblock(isbreakable=false) | ||
23 | chunk: | ||
24 | -- STATEMENT: begin 'expr' line=1 | ||
25 | prefixexp: <name> | ||
26 | str_checkname: 'foo' | ||
27 | singlevar: name='foo' | ||
28 | expr_stat: assignment k='VLOCAL' | ||
29 | assignment: '=' -- RHS elements follows | ||
30 | explist1: begin | ||
31 | expr: | ||
32 | simpleexp: <number>=1 | ||
33 | explist1: end | ||
34 | -- STATEMENT: end 'expr' | ||
35 | |||
36 | leaveblock | ||
37 | block: end | ||
38 | if_stat: end | ||
39 | -- STATEMENT: end 'if' | ||
40 | |||
41 | -- STATEMENT: begin 'if' line=2 | ||
42 | if_stat: if...then | ||
43 | test_then_block: test condition | ||
44 | cond: begin | ||
45 | expr: | ||
46 | prefixexp: <name> | ||
47 | str_checkname: 'foo' | ||
48 | singlevar: name='foo' | ||
49 | cond: end | ||
50 | test_then_block: then block | ||
51 | block: begin | ||
52 | enterblock(isbreakable=false) | ||
53 | chunk: | ||
54 | -- STATEMENT: begin 'expr' line=2 | ||
55 | prefixexp: <name> | ||
56 | str_checkname: 'foo' | ||
57 | singlevar: name='foo' | ||
58 | expr_stat: assignment k='VLOCAL' | ||
59 | assignment: '=' -- RHS elements follows | ||
60 | explist1: begin | ||
61 | expr: | ||
62 | simpleexp: <number>=1 | ||
63 | explist1: end | ||
64 | -- STATEMENT: end 'expr' | ||
65 | |||
66 | leaveblock | ||
67 | block: end | ||
68 | if_stat: else... | ||
69 | block: begin | ||
70 | enterblock(isbreakable=false) | ||
71 | chunk: | ||
72 | -- STATEMENT: begin 'expr' line=2 | ||
73 | prefixexp: <name> | ||
74 | str_checkname: 'foo' | ||
75 | singlevar: name='foo' | ||
76 | expr_stat: assignment k='VLOCAL' | ||
77 | assignment: '=' -- RHS elements follows | ||
78 | explist1: begin | ||
79 | expr: | ||
80 | simpleexp: <number>=0 | ||
81 | explist1: end | ||
82 | -- STATEMENT: end 'expr' | ||
83 | |||
84 | leaveblock | ||
85 | block: end | ||
86 | if_stat: end | ||
87 | -- STATEMENT: end 'if' | ||
88 | |||
89 | -- STATEMENT: begin 'if' line=3 | ||
90 | if_stat: if...then | ||
91 | test_then_block: test condition | ||
92 | cond: begin | ||
93 | expr: | ||
94 | prefixexp: <name> | ||
95 | str_checkname: 'foo' | ||
96 | singlevar: name='foo' | ||
97 | cond: end | ||
98 | test_then_block: then block | ||
99 | block: begin | ||
100 | enterblock(isbreakable=false) | ||
101 | chunk: | ||
102 | -- STATEMENT: begin 'expr' line=3 | ||
103 | prefixexp: <name> | ||
104 | str_checkname: 'foo' | ||
105 | singlevar: name='foo' | ||
106 | expr_stat: assignment k='VLOCAL' | ||
107 | assignment: '=' -- RHS elements follows | ||
108 | explist1: begin | ||
109 | expr: | ||
110 | simpleexp: <number>=1 | ||
111 | explist1: end | ||
112 | -- STATEMENT: end 'expr' | ||
113 | |||
114 | leaveblock | ||
115 | block: end | ||
116 | if_stat: elseif...then | ||
117 | test_then_block: test condition | ||
118 | cond: begin | ||
119 | expr: | ||
120 | subexpr: uop='not' | ||
121 | prefixexp: <name> | ||
122 | str_checkname: 'foo' | ||
123 | singlevar: name='foo' | ||
124 | cond: end | ||
125 | test_then_block: then block | ||
126 | block: begin | ||
127 | enterblock(isbreakable=false) | ||
128 | chunk: | ||
129 | -- STATEMENT: begin 'expr' line=3 | ||
130 | prefixexp: <name> | ||
131 | str_checkname: 'foo' | ||
132 | singlevar: name='foo' | ||
133 | expr_stat: assignment k='VLOCAL' | ||
134 | assignment: '=' -- RHS elements follows | ||
135 | explist1: begin | ||
136 | expr: | ||
137 | simpleexp: <number>=0 | ||
138 | explist1: end | ||
139 | -- STATEMENT: end 'expr' | ||
140 | |||
141 | leaveblock | ||
142 | block: end | ||
143 | if_stat: end | ||
144 | -- STATEMENT: end 'if' | ||
145 | |||
146 | close_func | ||
147 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_08.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_08.lua new file mode 100644 index 0000000..d086c98 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_08.lua | |||
@@ -0,0 +1,66 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | do return end | ||
3 | do return 123 end | ||
4 | do return "foo","bar" end | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'do' line=1 | ||
12 | do_stat: begin | ||
13 | block: begin | ||
14 | enterblock(isbreakable=false) | ||
15 | chunk: | ||
16 | -- STATEMENT: begin 'return' line=1 | ||
17 | return_stat: no return values | ||
18 | -- STATEMENT: end 'return' | ||
19 | leaveblock | ||
20 | block: end | ||
21 | do_stat: end | ||
22 | -- STATEMENT: end 'do' | ||
23 | |||
24 | -- STATEMENT: begin 'do' line=2 | ||
25 | do_stat: begin | ||
26 | block: begin | ||
27 | enterblock(isbreakable=false) | ||
28 | chunk: | ||
29 | -- STATEMENT: begin 'return' line=2 | ||
30 | return_stat: begin | ||
31 | explist1: begin | ||
32 | expr: | ||
33 | simpleexp: <number>=123 | ||
34 | explist1: end | ||
35 | return_stat: end | ||
36 | -- STATEMENT: end 'return' | ||
37 | leaveblock | ||
38 | block: end | ||
39 | do_stat: end | ||
40 | -- STATEMENT: end 'do' | ||
41 | |||
42 | -- STATEMENT: begin 'do' line=3 | ||
43 | do_stat: begin | ||
44 | block: begin | ||
45 | enterblock(isbreakable=false) | ||
46 | chunk: | ||
47 | -- STATEMENT: begin 'return' line=3 | ||
48 | return_stat: begin | ||
49 | explist1: begin | ||
50 | expr: | ||
51 | simpleexp: <string>=foo | ||
52 | codestring: "foo" | ||
53 | explist1: ',' -- continuation | ||
54 | expr: | ||
55 | simpleexp: <string>=bar | ||
56 | codestring: "bar" | ||
57 | explist1: end | ||
58 | return_stat: end | ||
59 | -- STATEMENT: end 'return' | ||
60 | leaveblock | ||
61 | block: end | ||
62 | do_stat: end | ||
63 | -- STATEMENT: end 'do' | ||
64 | |||
65 | close_func | ||
66 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_09.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_09.lua new file mode 100644 index 0000000..2236388 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_09.lua | |||
@@ -0,0 +1,97 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | while true do foo=not foo end | ||
3 | while foo~=42 do foo=foo-1 end | ||
4 | while true do break end | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'while' line=1 | ||
12 | while_stat: begin/condition | ||
13 | expr: | ||
14 | simpleexp: true | ||
15 | enterblock(isbreakable=true) | ||
16 | while_stat: block | ||
17 | block: begin | ||
18 | enterblock(isbreakable=false) | ||
19 | chunk: | ||
20 | -- STATEMENT: begin 'expr' line=1 | ||
21 | prefixexp: <name> | ||
22 | str_checkname: 'foo' | ||
23 | singlevar: name='foo' | ||
24 | expr_stat: assignment k='VLOCAL' | ||
25 | assignment: '=' -- RHS elements follows | ||
26 | explist1: begin | ||
27 | expr: | ||
28 | subexpr: uop='not' | ||
29 | prefixexp: <name> | ||
30 | str_checkname: 'foo' | ||
31 | singlevar: name='foo' | ||
32 | explist1: end | ||
33 | -- STATEMENT: end 'expr' | ||
34 | |||
35 | leaveblock | ||
36 | block: end | ||
37 | leaveblock | ||
38 | while_stat: end | ||
39 | -- STATEMENT: end 'while' | ||
40 | |||
41 | -- STATEMENT: begin 'while' line=2 | ||
42 | while_stat: begin/condition | ||
43 | expr: | ||
44 | prefixexp: <name> | ||
45 | str_checkname: 'foo' | ||
46 | singlevar: name='foo' | ||
47 | subexpr: binop='~=' | ||
48 | simpleexp: <number>=42 | ||
49 | subexpr: -- evaluate | ||
50 | enterblock(isbreakable=true) | ||
51 | while_stat: block | ||
52 | block: begin | ||
53 | enterblock(isbreakable=false) | ||
54 | chunk: | ||
55 | -- STATEMENT: begin 'expr' line=2 | ||
56 | prefixexp: <name> | ||
57 | str_checkname: 'foo' | ||
58 | singlevar: name='foo' | ||
59 | expr_stat: assignment k='VLOCAL' | ||
60 | assignment: '=' -- RHS elements follows | ||
61 | explist1: begin | ||
62 | expr: | ||
63 | prefixexp: <name> | ||
64 | str_checkname: 'foo' | ||
65 | singlevar: name='foo' | ||
66 | subexpr: binop='-' | ||
67 | simpleexp: <number>=1 | ||
68 | subexpr: -- evaluate | ||
69 | explist1: end | ||
70 | -- STATEMENT: end 'expr' | ||
71 | |||
72 | leaveblock | ||
73 | block: end | ||
74 | leaveblock | ||
75 | while_stat: end | ||
76 | -- STATEMENT: end 'while' | ||
77 | |||
78 | -- STATEMENT: begin 'while' line=3 | ||
79 | while_stat: begin/condition | ||
80 | expr: | ||
81 | simpleexp: true | ||
82 | enterblock(isbreakable=true) | ||
83 | while_stat: block | ||
84 | block: begin | ||
85 | enterblock(isbreakable=false) | ||
86 | chunk: | ||
87 | -- STATEMENT: begin 'break' line=3 | ||
88 | break_stat: -- break out of loop | ||
89 | -- STATEMENT: end 'break' | ||
90 | leaveblock | ||
91 | block: end | ||
92 | leaveblock | ||
93 | while_stat: end | ||
94 | -- STATEMENT: end 'while' | ||
95 | |||
96 | close_func | ||
97 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_10.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_10.lua new file mode 100644 index 0000000..72f7ae3 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_10.lua | |||
@@ -0,0 +1,106 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | repeat foo=foo.."bar" until false | ||
3 | repeat foo=foo/2 until foo<1 | ||
4 | repeat break until false | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'repeat' line=1 | ||
12 | repeat_stat: begin | ||
13 | enterblock(isbreakable=true) | ||
14 | block: begin | ||
15 | enterblock(isbreakable=false) | ||
16 | chunk: | ||
17 | -- STATEMENT: begin 'expr' line=1 | ||
18 | prefixexp: <name> | ||
19 | str_checkname: 'foo' | ||
20 | singlevar: name='foo' | ||
21 | expr_stat: assignment k='VLOCAL' | ||
22 | assignment: '=' -- RHS elements follows | ||
23 | explist1: begin | ||
24 | expr: | ||
25 | prefixexp: <name> | ||
26 | str_checkname: 'foo' | ||
27 | singlevar: name='foo' | ||
28 | subexpr: binop='..' | ||
29 | simpleexp: <string>=bar | ||
30 | codestring: "bar" | ||
31 | subexpr: -- evaluate | ||
32 | explist1: end | ||
33 | -- STATEMENT: end 'expr' | ||
34 | |||
35 | leaveblock | ||
36 | block: end | ||
37 | repeat_stat: condition | ||
38 | cond: begin | ||
39 | expr: | ||
40 | simpleexp: false | ||
41 | cond: end | ||
42 | leaveblock | ||
43 | repeat_stat: end | ||
44 | -- STATEMENT: end 'repeat' | ||
45 | |||
46 | -- STATEMENT: begin 'repeat' line=2 | ||
47 | repeat_stat: begin | ||
48 | enterblock(isbreakable=true) | ||
49 | block: begin | ||
50 | enterblock(isbreakable=false) | ||
51 | chunk: | ||
52 | -- STATEMENT: begin 'expr' line=2 | ||
53 | prefixexp: <name> | ||
54 | str_checkname: 'foo' | ||
55 | singlevar: name='foo' | ||
56 | expr_stat: assignment k='VLOCAL' | ||
57 | assignment: '=' -- RHS elements follows | ||
58 | explist1: begin | ||
59 | expr: | ||
60 | prefixexp: <name> | ||
61 | str_checkname: 'foo' | ||
62 | singlevar: name='foo' | ||
63 | subexpr: binop='/' | ||
64 | simpleexp: <number>=2 | ||
65 | subexpr: -- evaluate | ||
66 | explist1: end | ||
67 | -- STATEMENT: end 'expr' | ||
68 | |||
69 | leaveblock | ||
70 | block: end | ||
71 | repeat_stat: condition | ||
72 | cond: begin | ||
73 | expr: | ||
74 | prefixexp: <name> | ||
75 | str_checkname: 'foo' | ||
76 | singlevar: name='foo' | ||
77 | subexpr: binop='<' | ||
78 | simpleexp: <number>=1 | ||
79 | subexpr: -- evaluate | ||
80 | cond: end | ||
81 | leaveblock | ||
82 | repeat_stat: end | ||
83 | -- STATEMENT: end 'repeat' | ||
84 | |||
85 | -- STATEMENT: begin 'repeat' line=3 | ||
86 | repeat_stat: begin | ||
87 | enterblock(isbreakable=true) | ||
88 | block: begin | ||
89 | enterblock(isbreakable=false) | ||
90 | chunk: | ||
91 | -- STATEMENT: begin 'break' line=3 | ||
92 | break_stat: -- break out of loop | ||
93 | -- STATEMENT: end 'break' | ||
94 | leaveblock | ||
95 | block: end | ||
96 | repeat_stat: condition | ||
97 | cond: begin | ||
98 | expr: | ||
99 | simpleexp: false | ||
100 | cond: end | ||
101 | leaveblock | ||
102 | repeat_stat: end | ||
103 | -- STATEMENT: end 'repeat' | ||
104 | |||
105 | close_func | ||
106 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_11.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_11.lua new file mode 100644 index 0000000..8af611b --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_11.lua | |||
@@ -0,0 +1,175 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | for i=1,10 do foo=i end | ||
3 | for i=1,10,2 do break end | ||
4 | for i in foo do bar=0 end | ||
5 | for i,j in foo,bar do baz=0 end | ||
6 | -- END OF SOURCE -- | ||
7 | |||
8 | -- TOP: begin | ||
9 | open_func | ||
10 | |||
11 | chunk: | ||
12 | -- STATEMENT: begin 'for' line=1 | ||
13 | for_stat: begin | ||
14 | enterblock(isbreakable=false) | ||
15 | str_checkname: 'i' | ||
16 | for_stat: numerical loop | ||
17 | fornum: begin | ||
18 | fornum: index start | ||
19 | exp1: begin | ||
20 | expr: | ||
21 | simpleexp: <number>=1 | ||
22 | exp1: end | ||
23 | fornum: index stop | ||
24 | exp1: begin | ||
25 | expr: | ||
26 | simpleexp: <number>=10 | ||
27 | exp1: end | ||
28 | fornum: body | ||
29 | enterblock(isbreakable=true) | ||
30 | block: begin | ||
31 | enterblock(isbreakable=false) | ||
32 | chunk: | ||
33 | -- STATEMENT: begin 'expr' line=1 | ||
34 | prefixexp: <name> | ||
35 | str_checkname: 'foo' | ||
36 | singlevar: name='foo' | ||
37 | expr_stat: assignment k='VLOCAL' | ||
38 | assignment: '=' -- RHS elements follows | ||
39 | explist1: begin | ||
40 | expr: | ||
41 | prefixexp: <name> | ||
42 | str_checkname: 'i' | ||
43 | singlevar: name='i' | ||
44 | explist1: end | ||
45 | -- STATEMENT: end 'expr' | ||
46 | |||
47 | leaveblock | ||
48 | block: end | ||
49 | leaveblock | ||
50 | fornum: end | ||
51 | leaveblock | ||
52 | for_stat: end | ||
53 | -- STATEMENT: end 'for' | ||
54 | |||
55 | -- STATEMENT: begin 'for' line=2 | ||
56 | for_stat: begin | ||
57 | enterblock(isbreakable=false) | ||
58 | str_checkname: 'i' | ||
59 | for_stat: numerical loop | ||
60 | fornum: begin | ||
61 | fornum: index start | ||
62 | exp1: begin | ||
63 | expr: | ||
64 | simpleexp: <number>=1 | ||
65 | exp1: end | ||
66 | fornum: index stop | ||
67 | exp1: begin | ||
68 | expr: | ||
69 | simpleexp: <number>=10 | ||
70 | exp1: end | ||
71 | fornum: index step | ||
72 | exp1: begin | ||
73 | expr: | ||
74 | simpleexp: <number>=2 | ||
75 | exp1: end | ||
76 | fornum: body | ||
77 | enterblock(isbreakable=true) | ||
78 | block: begin | ||
79 | enterblock(isbreakable=false) | ||
80 | chunk: | ||
81 | -- STATEMENT: begin 'break' line=2 | ||
82 | break_stat: -- break out of loop | ||
83 | -- STATEMENT: end 'break' | ||
84 | leaveblock | ||
85 | block: end | ||
86 | leaveblock | ||
87 | fornum: end | ||
88 | leaveblock | ||
89 | for_stat: end | ||
90 | -- STATEMENT: end 'for' | ||
91 | |||
92 | -- STATEMENT: begin 'for' line=3 | ||
93 | for_stat: begin | ||
94 | enterblock(isbreakable=false) | ||
95 | str_checkname: 'i' | ||
96 | for_stat: list-based loop | ||
97 | forlist: begin | ||
98 | forlist: explist1 | ||
99 | explist1: begin | ||
100 | expr: | ||
101 | prefixexp: <name> | ||
102 | str_checkname: 'foo' | ||
103 | singlevar: name='foo' | ||
104 | explist1: end | ||
105 | forlist: body | ||
106 | enterblock(isbreakable=true) | ||
107 | block: begin | ||
108 | enterblock(isbreakable=false) | ||
109 | chunk: | ||
110 | -- STATEMENT: begin 'expr' line=3 | ||
111 | prefixexp: <name> | ||
112 | str_checkname: 'bar' | ||
113 | singlevar: name='bar' | ||
114 | expr_stat: assignment k='VLOCAL' | ||
115 | assignment: '=' -- RHS elements follows | ||
116 | explist1: begin | ||
117 | expr: | ||
118 | simpleexp: <number>=0 | ||
119 | explist1: end | ||
120 | -- STATEMENT: end 'expr' | ||
121 | |||
122 | leaveblock | ||
123 | block: end | ||
124 | leaveblock | ||
125 | forlist: end | ||
126 | leaveblock | ||
127 | for_stat: end | ||
128 | -- STATEMENT: end 'for' | ||
129 | |||
130 | -- STATEMENT: begin 'for' line=4 | ||
131 | for_stat: begin | ||
132 | enterblock(isbreakable=false) | ||
133 | str_checkname: 'i' | ||
134 | for_stat: list-based loop | ||
135 | forlist: begin | ||
136 | str_checkname: 'j' | ||
137 | forlist: explist1 | ||
138 | explist1: begin | ||
139 | expr: | ||
140 | prefixexp: <name> | ||
141 | str_checkname: 'foo' | ||
142 | singlevar: name='foo' | ||
143 | explist1: ',' -- continuation | ||
144 | expr: | ||
145 | prefixexp: <name> | ||
146 | str_checkname: 'bar' | ||
147 | singlevar: name='bar' | ||
148 | explist1: end | ||
149 | forlist: body | ||
150 | enterblock(isbreakable=true) | ||
151 | block: begin | ||
152 | enterblock(isbreakable=false) | ||
153 | chunk: | ||
154 | -- STATEMENT: begin 'expr' line=4 | ||
155 | prefixexp: <name> | ||
156 | str_checkname: 'baz' | ||
157 | singlevar: name='baz' | ||
158 | expr_stat: assignment k='VLOCAL' | ||
159 | assignment: '=' -- RHS elements follows | ||
160 | explist1: begin | ||
161 | expr: | ||
162 | simpleexp: <number>=0 | ||
163 | explist1: end | ||
164 | -- STATEMENT: end 'expr' | ||
165 | |||
166 | leaveblock | ||
167 | block: end | ||
168 | leaveblock | ||
169 | forlist: end | ||
170 | leaveblock | ||
171 | for_stat: end | ||
172 | -- STATEMENT: end 'for' | ||
173 | |||
174 | close_func | ||
175 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_12.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_12.lua new file mode 100644 index 0000000..916fc7f --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_12.lua | |||
@@ -0,0 +1,46 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local foo | ||
3 | local foo,bar,baz | ||
4 | local foo,bar="foo","bar" | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'local' line=1 | ||
12 | local_stat: local statement | ||
13 | localstat: begin | ||
14 | str_checkname: 'foo' | ||
15 | localstat: end | ||
16 | -- STATEMENT: end 'local' | ||
17 | |||
18 | -- STATEMENT: begin 'local' line=2 | ||
19 | local_stat: local statement | ||
20 | localstat: begin | ||
21 | str_checkname: 'foo' | ||
22 | str_checkname: 'bar' | ||
23 | str_checkname: 'baz' | ||
24 | localstat: end | ||
25 | -- STATEMENT: end 'local' | ||
26 | |||
27 | -- STATEMENT: begin 'local' line=3 | ||
28 | local_stat: local statement | ||
29 | localstat: begin | ||
30 | str_checkname: 'foo' | ||
31 | str_checkname: 'bar' | ||
32 | localstat: -- assignment | ||
33 | explist1: begin | ||
34 | expr: | ||
35 | simpleexp: <string>=foo | ||
36 | codestring: "foo" | ||
37 | explist1: ',' -- continuation | ||
38 | expr: | ||
39 | simpleexp: <string>=bar | ||
40 | codestring: "bar" | ||
41 | explist1: end | ||
42 | localstat: end | ||
43 | -- STATEMENT: end 'local' | ||
44 | |||
45 | close_func | ||
46 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_13.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_13.lua new file mode 100644 index 0000000..8ddd3ea --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_13.lua | |||
@@ -0,0 +1,99 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local function foo() return end | ||
3 | local function foo(a) return end | ||
4 | local function foo(x,y,z) return end | ||
5 | local function foo(x,...) return end | ||
6 | -- END OF SOURCE -- | ||
7 | |||
8 | -- TOP: begin | ||
9 | open_func | ||
10 | |||
11 | chunk: | ||
12 | -- STATEMENT: begin 'local' line=1 | ||
13 | local_stat: local function | ||
14 | localfunc: begin | ||
15 | str_checkname: 'foo' | ||
16 | localfunc: body | ||
17 | open_func | ||
18 | body: begin | ||
19 | body: parlist | ||
20 | parlist: begin | ||
21 | parlist: end | ||
22 | body: chunk | ||
23 | chunk: | ||
24 | -- STATEMENT: begin 'return' line=1 | ||
25 | return_stat: no return values | ||
26 | -- STATEMENT: end 'return' | ||
27 | body: end | ||
28 | close_func | ||
29 | localfunc: end | ||
30 | -- STATEMENT: end 'local' | ||
31 | |||
32 | -- STATEMENT: begin 'local' line=2 | ||
33 | local_stat: local function | ||
34 | localfunc: begin | ||
35 | str_checkname: 'foo' | ||
36 | localfunc: body | ||
37 | open_func | ||
38 | body: begin | ||
39 | body: parlist | ||
40 | parlist: begin | ||
41 | str_checkname: 'a' | ||
42 | parlist: end | ||
43 | body: chunk | ||
44 | chunk: | ||
45 | -- STATEMENT: begin 'return' line=2 | ||
46 | return_stat: no return values | ||
47 | -- STATEMENT: end 'return' | ||
48 | body: end | ||
49 | close_func | ||
50 | localfunc: end | ||
51 | -- STATEMENT: end 'local' | ||
52 | |||
53 | -- STATEMENT: begin 'local' line=3 | ||
54 | local_stat: local function | ||
55 | localfunc: begin | ||
56 | str_checkname: 'foo' | ||
57 | localfunc: body | ||
58 | open_func | ||
59 | body: begin | ||
60 | body: parlist | ||
61 | parlist: begin | ||
62 | str_checkname: 'x' | ||
63 | str_checkname: 'y' | ||
64 | str_checkname: 'z' | ||
65 | parlist: end | ||
66 | body: chunk | ||
67 | chunk: | ||
68 | -- STATEMENT: begin 'return' line=3 | ||
69 | return_stat: no return values | ||
70 | -- STATEMENT: end 'return' | ||
71 | body: end | ||
72 | close_func | ||
73 | localfunc: end | ||
74 | -- STATEMENT: end 'local' | ||
75 | |||
76 | -- STATEMENT: begin 'local' line=4 | ||
77 | local_stat: local function | ||
78 | localfunc: begin | ||
79 | str_checkname: 'foo' | ||
80 | localfunc: body | ||
81 | open_func | ||
82 | body: begin | ||
83 | body: parlist | ||
84 | parlist: begin | ||
85 | str_checkname: 'x' | ||
86 | parlist: ... (dots) | ||
87 | parlist: end | ||
88 | body: chunk | ||
89 | chunk: | ||
90 | -- STATEMENT: begin 'return' line=4 | ||
91 | return_stat: no return values | ||
92 | -- STATEMENT: end 'return' | ||
93 | body: end | ||
94 | close_func | ||
95 | localfunc: end | ||
96 | -- STATEMENT: end 'local' | ||
97 | |||
98 | close_func | ||
99 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_14.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_14.lua new file mode 100644 index 0000000..aa0069a --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_14.lua | |||
@@ -0,0 +1,107 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | function foo() return end | ||
3 | function foo(a) return end | ||
4 | function foo(x,y,z) return end | ||
5 | function foo(x,...) return end | ||
6 | -- END OF SOURCE -- | ||
7 | |||
8 | -- TOP: begin | ||
9 | open_func | ||
10 | |||
11 | chunk: | ||
12 | -- STATEMENT: begin 'function' line=1 | ||
13 | function_stat: begin | ||
14 | funcname: begin | ||
15 | str_checkname: 'foo' | ||
16 | singlevar: name='foo' | ||
17 | funcname: end | ||
18 | function_stat: body needself='false' | ||
19 | open_func | ||
20 | body: begin | ||
21 | body: parlist | ||
22 | parlist: begin | ||
23 | parlist: end | ||
24 | body: chunk | ||
25 | chunk: | ||
26 | -- STATEMENT: begin 'return' line=1 | ||
27 | return_stat: no return values | ||
28 | -- STATEMENT: end 'return' | ||
29 | body: end | ||
30 | close_func | ||
31 | function_stat: end | ||
32 | -- STATEMENT: end 'function' | ||
33 | |||
34 | -- STATEMENT: begin 'function' line=2 | ||
35 | function_stat: begin | ||
36 | funcname: begin | ||
37 | str_checkname: 'foo' | ||
38 | singlevar: name='foo' | ||
39 | funcname: end | ||
40 | function_stat: body needself='false' | ||
41 | open_func | ||
42 | body: begin | ||
43 | body: parlist | ||
44 | parlist: begin | ||
45 | str_checkname: 'a' | ||
46 | parlist: end | ||
47 | body: chunk | ||
48 | chunk: | ||
49 | -- STATEMENT: begin 'return' line=2 | ||
50 | return_stat: no return values | ||
51 | -- STATEMENT: end 'return' | ||
52 | body: end | ||
53 | close_func | ||
54 | function_stat: end | ||
55 | -- STATEMENT: end 'function' | ||
56 | |||
57 | -- STATEMENT: begin 'function' line=3 | ||
58 | function_stat: begin | ||
59 | funcname: begin | ||
60 | str_checkname: 'foo' | ||
61 | singlevar: name='foo' | ||
62 | funcname: end | ||
63 | function_stat: body needself='false' | ||
64 | open_func | ||
65 | body: begin | ||
66 | body: parlist | ||
67 | parlist: begin | ||
68 | str_checkname: 'x' | ||
69 | str_checkname: 'y' | ||
70 | str_checkname: 'z' | ||
71 | parlist: end | ||
72 | body: chunk | ||
73 | chunk: | ||
74 | -- STATEMENT: begin 'return' line=3 | ||
75 | return_stat: no return values | ||
76 | -- STATEMENT: end 'return' | ||
77 | body: end | ||
78 | close_func | ||
79 | function_stat: end | ||
80 | -- STATEMENT: end 'function' | ||
81 | |||
82 | -- STATEMENT: begin 'function' line=4 | ||
83 | function_stat: begin | ||
84 | funcname: begin | ||
85 | str_checkname: 'foo' | ||
86 | singlevar: name='foo' | ||
87 | funcname: end | ||
88 | function_stat: body needself='false' | ||
89 | open_func | ||
90 | body: begin | ||
91 | body: parlist | ||
92 | parlist: begin | ||
93 | str_checkname: 'x' | ||
94 | parlist: ... (dots) | ||
95 | parlist: end | ||
96 | body: chunk | ||
97 | chunk: | ||
98 | -- STATEMENT: begin 'return' line=4 | ||
99 | return_stat: no return values | ||
100 | -- STATEMENT: end 'return' | ||
101 | body: end | ||
102 | close_func | ||
103 | function_stat: end | ||
104 | -- STATEMENT: end 'function' | ||
105 | |||
106 | close_func | ||
107 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_15.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_15.lua new file mode 100644 index 0000000..73cdac3 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_15.lua | |||
@@ -0,0 +1,135 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | function foo.bar(p) return end | ||
3 | function foo.bar.baz(p) return end | ||
4 | function foo:bar(p) return end | ||
5 | function foo.bar.baz(p) return end | ||
6 | -- END OF SOURCE -- | ||
7 | |||
8 | -- TOP: begin | ||
9 | open_func | ||
10 | |||
11 | chunk: | ||
12 | -- STATEMENT: begin 'function' line=1 | ||
13 | function_stat: begin | ||
14 | funcname: begin | ||
15 | str_checkname: 'foo' | ||
16 | singlevar: name='foo' | ||
17 | funcname: -- '.' field | ||
18 | field: operator=. | ||
19 | checkname: | ||
20 | str_checkname: 'bar' | ||
21 | codestring: "bar" | ||
22 | funcname: end | ||
23 | function_stat: body needself='false' | ||
24 | open_func | ||
25 | body: begin | ||
26 | body: parlist | ||
27 | parlist: begin | ||
28 | str_checkname: 'p' | ||
29 | parlist: end | ||
30 | body: chunk | ||
31 | chunk: | ||
32 | -- STATEMENT: begin 'return' line=1 | ||
33 | return_stat: no return values | ||
34 | -- STATEMENT: end 'return' | ||
35 | body: end | ||
36 | close_func | ||
37 | function_stat: end | ||
38 | -- STATEMENT: end 'function' | ||
39 | |||
40 | -- STATEMENT: begin 'function' line=2 | ||
41 | function_stat: begin | ||
42 | funcname: begin | ||
43 | str_checkname: 'foo' | ||
44 | singlevar: name='foo' | ||
45 | funcname: -- '.' field | ||
46 | field: operator=. | ||
47 | checkname: | ||
48 | str_checkname: 'bar' | ||
49 | codestring: "bar" | ||
50 | funcname: -- '.' field | ||
51 | field: operator=. | ||
52 | checkname: | ||
53 | str_checkname: 'baz' | ||
54 | codestring: "baz" | ||
55 | funcname: end | ||
56 | function_stat: body needself='false' | ||
57 | open_func | ||
58 | body: begin | ||
59 | body: parlist | ||
60 | parlist: begin | ||
61 | str_checkname: 'p' | ||
62 | parlist: end | ||
63 | body: chunk | ||
64 | chunk: | ||
65 | -- STATEMENT: begin 'return' line=2 | ||
66 | return_stat: no return values | ||
67 | -- STATEMENT: end 'return' | ||
68 | body: end | ||
69 | close_func | ||
70 | function_stat: end | ||
71 | -- STATEMENT: end 'function' | ||
72 | |||
73 | -- STATEMENT: begin 'function' line=3 | ||
74 | function_stat: begin | ||
75 | funcname: begin | ||
76 | str_checkname: 'foo' | ||
77 | singlevar: name='foo' | ||
78 | funcname: -- ':' field | ||
79 | field: operator=: | ||
80 | checkname: | ||
81 | str_checkname: 'bar' | ||
82 | codestring: "bar" | ||
83 | funcname: end | ||
84 | function_stat: body needself='true' | ||
85 | open_func | ||
86 | body: begin | ||
87 | body: parlist | ||
88 | parlist: begin | ||
89 | str_checkname: 'p' | ||
90 | parlist: end | ||
91 | body: chunk | ||
92 | chunk: | ||
93 | -- STATEMENT: begin 'return' line=3 | ||
94 | return_stat: no return values | ||
95 | -- STATEMENT: end 'return' | ||
96 | body: end | ||
97 | close_func | ||
98 | function_stat: end | ||
99 | -- STATEMENT: end 'function' | ||
100 | |||
101 | -- STATEMENT: begin 'function' line=4 | ||
102 | function_stat: begin | ||
103 | funcname: begin | ||
104 | str_checkname: 'foo' | ||
105 | singlevar: name='foo' | ||
106 | funcname: -- '.' field | ||
107 | field: operator=. | ||
108 | checkname: | ||
109 | str_checkname: 'bar' | ||
110 | codestring: "bar" | ||
111 | funcname: -- '.' field | ||
112 | field: operator=. | ||
113 | checkname: | ||
114 | str_checkname: 'baz' | ||
115 | codestring: "baz" | ||
116 | funcname: end | ||
117 | function_stat: body needself='false' | ||
118 | open_func | ||
119 | body: begin | ||
120 | body: parlist | ||
121 | parlist: begin | ||
122 | str_checkname: 'p' | ||
123 | parlist: end | ||
124 | body: chunk | ||
125 | chunk: | ||
126 | -- STATEMENT: begin 'return' line=4 | ||
127 | return_stat: no return values | ||
128 | -- STATEMENT: end 'return' | ||
129 | body: end | ||
130 | close_func | ||
131 | function_stat: end | ||
132 | -- STATEMENT: end 'function' | ||
133 | |||
134 | close_func | ||
135 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_16.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_16.lua new file mode 100644 index 0000000..b53b2fb --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_16.lua | |||
@@ -0,0 +1,87 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | foo = function() return end | ||
3 | foo = function(x,y) return end | ||
4 | foo = function(...) return end | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'expr' line=1 | ||
12 | prefixexp: <name> | ||
13 | str_checkname: 'foo' | ||
14 | singlevar: name='foo' | ||
15 | expr_stat: assignment k='VLOCAL' | ||
16 | assignment: '=' -- RHS elements follows | ||
17 | explist1: begin | ||
18 | expr: | ||
19 | simpleexp: function | ||
20 | open_func | ||
21 | body: begin | ||
22 | body: parlist | ||
23 | parlist: begin | ||
24 | parlist: end | ||
25 | body: chunk | ||
26 | chunk: | ||
27 | -- STATEMENT: begin 'return' line=1 | ||
28 | return_stat: no return values | ||
29 | -- STATEMENT: end 'return' | ||
30 | body: end | ||
31 | close_func | ||
32 | explist1: end | ||
33 | -- STATEMENT: end 'expr' | ||
34 | |||
35 | -- STATEMENT: begin 'expr' line=2 | ||
36 | prefixexp: <name> | ||
37 | str_checkname: 'foo' | ||
38 | singlevar: name='foo' | ||
39 | expr_stat: assignment k='VLOCAL' | ||
40 | assignment: '=' -- RHS elements follows | ||
41 | explist1: begin | ||
42 | expr: | ||
43 | simpleexp: function | ||
44 | open_func | ||
45 | body: begin | ||
46 | body: parlist | ||
47 | parlist: begin | ||
48 | str_checkname: 'x' | ||
49 | str_checkname: 'y' | ||
50 | parlist: end | ||
51 | body: chunk | ||
52 | chunk: | ||
53 | -- STATEMENT: begin 'return' line=2 | ||
54 | return_stat: no return values | ||
55 | -- STATEMENT: end 'return' | ||
56 | body: end | ||
57 | close_func | ||
58 | explist1: end | ||
59 | -- STATEMENT: end 'expr' | ||
60 | |||
61 | -- STATEMENT: begin 'expr' line=3 | ||
62 | prefixexp: <name> | ||
63 | str_checkname: 'foo' | ||
64 | singlevar: name='foo' | ||
65 | expr_stat: assignment k='VLOCAL' | ||
66 | assignment: '=' -- RHS elements follows | ||
67 | explist1: begin | ||
68 | expr: | ||
69 | simpleexp: function | ||
70 | open_func | ||
71 | body: begin | ||
72 | body: parlist | ||
73 | parlist: begin | ||
74 | parlist: ... (dots) | ||
75 | parlist: end | ||
76 | body: chunk | ||
77 | chunk: | ||
78 | -- STATEMENT: begin 'return' line=3 | ||
79 | return_stat: no return values | ||
80 | -- STATEMENT: end 'return' | ||
81 | body: end | ||
82 | close_func | ||
83 | explist1: end | ||
84 | -- STATEMENT: end 'expr' | ||
85 | |||
86 | close_func | ||
87 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_17.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_17.lua new file mode 100644 index 0000000..87634d3 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_17.lua | |||
@@ -0,0 +1,110 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | foo = {} | ||
3 | foo = { 1,2,3; "foo"; } | ||
4 | foo = { bar=77, baz=88, } | ||
5 | foo = { ["bar"]=77, ["baz"]=88, } | ||
6 | -- END OF SOURCE -- | ||
7 | |||
8 | -- TOP: begin | ||
9 | open_func | ||
10 | |||
11 | chunk: | ||
12 | -- STATEMENT: begin 'expr' line=1 | ||
13 | prefixexp: <name> | ||
14 | str_checkname: 'foo' | ||
15 | singlevar: name='foo' | ||
16 | expr_stat: assignment k='VLOCAL' | ||
17 | assignment: '=' -- RHS elements follows | ||
18 | explist1: begin | ||
19 | expr: | ||
20 | simpleexp: constructor | ||
21 | constructor: begin | ||
22 | constructor: end | ||
23 | explist1: end | ||
24 | -- STATEMENT: end 'expr' | ||
25 | |||
26 | -- STATEMENT: begin 'expr' line=2 | ||
27 | prefixexp: <name> | ||
28 | str_checkname: 'foo' | ||
29 | singlevar: name='foo' | ||
30 | expr_stat: assignment k='VLOCAL' | ||
31 | assignment: '=' -- RHS elements follows | ||
32 | explist1: begin | ||
33 | expr: | ||
34 | simpleexp: constructor | ||
35 | constructor: begin | ||
36 | listfield: expr | ||
37 | expr: | ||
38 | simpleexp: <number>=1 | ||
39 | listfield: expr | ||
40 | expr: | ||
41 | simpleexp: <number>=2 | ||
42 | listfield: expr | ||
43 | expr: | ||
44 | simpleexp: <number>=3 | ||
45 | listfield: expr | ||
46 | expr: | ||
47 | simpleexp: <string>=foo | ||
48 | codestring: "foo" | ||
49 | constructor: end | ||
50 | explist1: end | ||
51 | -- STATEMENT: end 'expr' | ||
52 | |||
53 | -- STATEMENT: begin 'expr' line=3 | ||
54 | prefixexp: <name> | ||
55 | str_checkname: 'foo' | ||
56 | singlevar: name='foo' | ||
57 | expr_stat: assignment k='VLOCAL' | ||
58 | assignment: '=' -- RHS elements follows | ||
59 | explist1: begin | ||
60 | expr: | ||
61 | simpleexp: constructor | ||
62 | constructor: begin | ||
63 | recfield: name | ||
64 | checkname: | ||
65 | str_checkname: 'bar' | ||
66 | codestring: "bar" | ||
67 | expr: | ||
68 | simpleexp: <number>=77 | ||
69 | recfield: name | ||
70 | checkname: | ||
71 | str_checkname: 'baz' | ||
72 | codestring: "baz" | ||
73 | expr: | ||
74 | simpleexp: <number>=88 | ||
75 | constructor: end | ||
76 | explist1: end | ||
77 | -- STATEMENT: end 'expr' | ||
78 | |||
79 | -- STATEMENT: begin 'expr' line=4 | ||
80 | prefixexp: <name> | ||
81 | str_checkname: 'foo' | ||
82 | singlevar: name='foo' | ||
83 | expr_stat: assignment k='VLOCAL' | ||
84 | assignment: '=' -- RHS elements follows | ||
85 | explist1: begin | ||
86 | expr: | ||
87 | simpleexp: constructor | ||
88 | constructor: begin | ||
89 | recfield: [ exp1 ] | ||
90 | index: begin '[' | ||
91 | expr: | ||
92 | simpleexp: <string>=bar | ||
93 | codestring: "bar" | ||
94 | index: end ']' | ||
95 | expr: | ||
96 | simpleexp: <number>=77 | ||
97 | recfield: [ exp1 ] | ||
98 | index: begin '[' | ||
99 | expr: | ||
100 | simpleexp: <string>=baz | ||
101 | codestring: "baz" | ||
102 | index: end ']' | ||
103 | expr: | ||
104 | simpleexp: <number>=88 | ||
105 | constructor: end | ||
106 | explist1: end | ||
107 | -- STATEMENT: end 'expr' | ||
108 | |||
109 | close_func | ||
110 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_01.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_01.lua new file mode 100644 index 0000000..732b4d6 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_01.lua | |||
@@ -0,0 +1,26 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | print(a) | ||
3 | -- END OF SOURCE -- | ||
4 | |||
5 | -- TOP: begin | ||
6 | open_func | ||
7 | |||
8 | chunk: | ||
9 | -- STATEMENT: begin 'expr' line=1 | ||
10 | prefixexp: <name> | ||
11 | str_checkname: 'print' | ||
12 | singlevar(kind): 'VGLOBAL' | ||
13 | primaryexp: ( funcargs | ||
14 | funcargs: begin '(' | ||
15 | explist1: begin | ||
16 | expr: | ||
17 | prefixexp: <name> | ||
18 | str_checkname: 'a' | ||
19 | singlevar(kind): 'VGLOBAL' | ||
20 | explist1: end | ||
21 | funcargs: end -- expr is a VCALL | ||
22 | expr_stat: function call k='VCALL' | ||
23 | -- STATEMENT: end 'expr' | ||
24 | |||
25 | close_func | ||
26 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_02.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_02.lua new file mode 100644 index 0000000..9863b4a --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_02.lua | |||
@@ -0,0 +1,35 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local a | ||
3 | print(a) | ||
4 | -- END OF SOURCE -- | ||
5 | |||
6 | -- TOP: begin | ||
7 | open_func | ||
8 | |||
9 | chunk: | ||
10 | -- STATEMENT: begin 'local' line=1 | ||
11 | local_stat: local statement | ||
12 | localstat: begin | ||
13 | str_checkname: 'a' | ||
14 | new_localvar: 'a' | ||
15 | localstat: end | ||
16 | -- STATEMENT: end 'local' | ||
17 | |||
18 | -- STATEMENT: begin 'expr' line=2 | ||
19 | prefixexp: <name> | ||
20 | str_checkname: 'print' | ||
21 | singlevar(kind): 'VGLOBAL' | ||
22 | primaryexp: ( funcargs | ||
23 | funcargs: begin '(' | ||
24 | explist1: begin | ||
25 | expr: | ||
26 | prefixexp: <name> | ||
27 | str_checkname: 'a' | ||
28 | singlevar(kind): 'VLOCAL' | ||
29 | explist1: end | ||
30 | funcargs: end -- expr is a VCALL | ||
31 | expr_stat: function call k='VCALL' | ||
32 | -- STATEMENT: end 'expr' | ||
33 | |||
34 | close_func | ||
35 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_03.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_03.lua new file mode 100644 index 0000000..bc37280 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_03.lua | |||
@@ -0,0 +1,64 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | do | ||
3 | local a | ||
4 | print(a) | ||
5 | end | ||
6 | print(a) | ||
7 | -- END OF SOURCE -- | ||
8 | |||
9 | -- TOP: begin | ||
10 | open_func | ||
11 | |||
12 | chunk: | ||
13 | -- STATEMENT: begin 'do' line=1 | ||
14 | do_stat: begin | ||
15 | block: begin | ||
16 | enterblock(isbreakable=false) | ||
17 | chunk: | ||
18 | -- STATEMENT: begin 'local' line=2 | ||
19 | local_stat: local statement | ||
20 | localstat: begin | ||
21 | str_checkname: 'a' | ||
22 | new_localvar: 'a' | ||
23 | localstat: end | ||
24 | -- STATEMENT: end 'local' | ||
25 | |||
26 | -- STATEMENT: begin 'expr' line=3 | ||
27 | prefixexp: <name> | ||
28 | str_checkname: 'print' | ||
29 | singlevar(kind): 'VGLOBAL' | ||
30 | primaryexp: ( funcargs | ||
31 | funcargs: begin '(' | ||
32 | explist1: begin | ||
33 | expr: | ||
34 | prefixexp: <name> | ||
35 | str_checkname: 'a' | ||
36 | singlevar(kind): 'VLOCAL' | ||
37 | explist1: end | ||
38 | funcargs: end -- expr is a VCALL | ||
39 | expr_stat: function call k='VCALL' | ||
40 | -- STATEMENT: end 'expr' | ||
41 | |||
42 | leaveblock | ||
43 | block: end | ||
44 | do_stat: end | ||
45 | -- STATEMENT: end 'do' | ||
46 | |||
47 | -- STATEMENT: begin 'expr' line=5 | ||
48 | prefixexp: <name> | ||
49 | str_checkname: 'print' | ||
50 | singlevar(kind): 'VGLOBAL' | ||
51 | primaryexp: ( funcargs | ||
52 | funcargs: begin '(' | ||
53 | explist1: begin | ||
54 | expr: | ||
55 | prefixexp: <name> | ||
56 | str_checkname: 'a' | ||
57 | singlevar(kind): 'VGLOBAL' | ||
58 | explist1: end | ||
59 | funcargs: end -- expr is a VCALL | ||
60 | expr_stat: function call k='VCALL' | ||
61 | -- STATEMENT: end 'expr' | ||
62 | |||
63 | close_func | ||
64 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_04.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_04.lua new file mode 100644 index 0000000..b2bac4b --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_04.lua | |||
@@ -0,0 +1,77 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local a,b,c | ||
3 | do | ||
4 | local b | ||
5 | print(b) | ||
6 | end | ||
7 | print(b) | ||
8 | -- END OF SOURCE -- | ||
9 | |||
10 | -- TOP: begin | ||
11 | open_func | ||
12 | |||
13 | chunk: | ||
14 | -- STATEMENT: begin 'local' line=1 | ||
15 | local_stat: local statement | ||
16 | localstat: begin | ||
17 | str_checkname: 'a' | ||
18 | new_localvar: 'a' | ||
19 | str_checkname: 'b' | ||
20 | new_localvar: 'b' | ||
21 | str_checkname: 'c' | ||
22 | new_localvar: 'c' | ||
23 | localstat: end | ||
24 | -- STATEMENT: end 'local' | ||
25 | |||
26 | -- STATEMENT: begin 'do' line=2 | ||
27 | do_stat: begin | ||
28 | block: begin | ||
29 | enterblock(isbreakable=false) | ||
30 | chunk: | ||
31 | -- STATEMENT: begin 'local' line=3 | ||
32 | local_stat: local statement | ||
33 | localstat: begin | ||
34 | str_checkname: 'b' | ||
35 | new_localvar: 'b' | ||
36 | localstat: end | ||
37 | -- STATEMENT: end 'local' | ||
38 | |||
39 | -- STATEMENT: begin 'expr' line=4 | ||
40 | prefixexp: <name> | ||
41 | str_checkname: 'print' | ||
42 | singlevar(kind): 'VGLOBAL' | ||
43 | primaryexp: ( funcargs | ||
44 | funcargs: begin '(' | ||
45 | explist1: begin | ||
46 | expr: | ||
47 | prefixexp: <name> | ||
48 | str_checkname: 'b' | ||
49 | singlevar(kind): 'VLOCAL' | ||
50 | explist1: end | ||
51 | funcargs: end -- expr is a VCALL | ||
52 | expr_stat: function call k='VCALL' | ||
53 | -- STATEMENT: end 'expr' | ||
54 | |||
55 | leaveblock | ||
56 | block: end | ||
57 | do_stat: end | ||
58 | -- STATEMENT: end 'do' | ||
59 | |||
60 | -- STATEMENT: begin 'expr' line=6 | ||
61 | prefixexp: <name> | ||
62 | str_checkname: 'print' | ||
63 | singlevar(kind): 'VGLOBAL' | ||
64 | primaryexp: ( funcargs | ||
65 | funcargs: begin '(' | ||
66 | explist1: begin | ||
67 | expr: | ||
68 | prefixexp: <name> | ||
69 | str_checkname: 'b' | ||
70 | singlevar(kind): 'VLOCAL' | ||
71 | explist1: end | ||
72 | funcargs: end -- expr is a VCALL | ||
73 | expr_stat: function call k='VCALL' | ||
74 | -- STATEMENT: end 'expr' | ||
75 | |||
76 | close_func | ||
77 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_05.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_05.lua new file mode 100644 index 0000000..6885f01 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_05.lua | |||
@@ -0,0 +1,43 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local function foo() end | ||
3 | bar = foo | ||
4 | -- END OF SOURCE -- | ||
5 | |||
6 | -- TOP: begin | ||
7 | open_func | ||
8 | |||
9 | chunk: | ||
10 | -- STATEMENT: begin 'local' line=1 | ||
11 | local_stat: local function | ||
12 | localfunc: begin | ||
13 | str_checkname: 'foo' | ||
14 | new_localvar: 'foo' | ||
15 | localfunc: body | ||
16 | open_func | ||
17 | body: begin | ||
18 | body: parlist | ||
19 | parlist: begin | ||
20 | parlist: end | ||
21 | body: chunk | ||
22 | chunk: | ||
23 | body: end | ||
24 | close_func | ||
25 | localfunc: end | ||
26 | -- STATEMENT: end 'local' | ||
27 | |||
28 | -- STATEMENT: begin 'expr' line=2 | ||
29 | prefixexp: <name> | ||
30 | str_checkname: 'bar' | ||
31 | singlevar(kind): 'VGLOBAL' | ||
32 | expr_stat: assignment k='VGLOBAL' | ||
33 | assignment: '=' -- RHS elements follows | ||
34 | explist1: begin | ||
35 | expr: | ||
36 | prefixexp: <name> | ||
37 | str_checkname: 'foo' | ||
38 | singlevar(kind): 'VLOCAL' | ||
39 | explist1: end | ||
40 | -- STATEMENT: end 'expr' | ||
41 | |||
42 | close_func | ||
43 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_06.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_06.lua new file mode 100644 index 0000000..eb658ed --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_06.lua | |||
@@ -0,0 +1,70 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | do | ||
3 | local function foo() end | ||
4 | bar = foo | ||
5 | end | ||
6 | baz = foo | ||
7 | -- END OF SOURCE -- | ||
8 | |||
9 | -- TOP: begin | ||
10 | open_func | ||
11 | |||
12 | chunk: | ||
13 | -- STATEMENT: begin 'do' line=1 | ||
14 | do_stat: begin | ||
15 | block: begin | ||
16 | enterblock(isbreakable=false) | ||
17 | chunk: | ||
18 | -- STATEMENT: begin 'local' line=2 | ||
19 | local_stat: local function | ||
20 | localfunc: begin | ||
21 | str_checkname: 'foo' | ||
22 | new_localvar: 'foo' | ||
23 | localfunc: body | ||
24 | open_func | ||
25 | body: begin | ||
26 | body: parlist | ||
27 | parlist: begin | ||
28 | parlist: end | ||
29 | body: chunk | ||
30 | chunk: | ||
31 | body: end | ||
32 | close_func | ||
33 | localfunc: end | ||
34 | -- STATEMENT: end 'local' | ||
35 | |||
36 | -- STATEMENT: begin 'expr' line=3 | ||
37 | prefixexp: <name> | ||
38 | str_checkname: 'bar' | ||
39 | singlevar(kind): 'VGLOBAL' | ||
40 | expr_stat: assignment k='VGLOBAL' | ||
41 | assignment: '=' -- RHS elements follows | ||
42 | explist1: begin | ||
43 | expr: | ||
44 | prefixexp: <name> | ||
45 | str_checkname: 'foo' | ||
46 | singlevar(kind): 'VLOCAL' | ||
47 | explist1: end | ||
48 | -- STATEMENT: end 'expr' | ||
49 | |||
50 | leaveblock | ||
51 | block: end | ||
52 | do_stat: end | ||
53 | -- STATEMENT: end 'do' | ||
54 | |||
55 | -- STATEMENT: begin 'expr' line=5 | ||
56 | prefixexp: <name> | ||
57 | str_checkname: 'baz' | ||
58 | singlevar(kind): 'VGLOBAL' | ||
59 | expr_stat: assignment k='VGLOBAL' | ||
60 | assignment: '=' -- RHS elements follows | ||
61 | explist1: begin | ||
62 | expr: | ||
63 | prefixexp: <name> | ||
64 | str_checkname: 'foo' | ||
65 | singlevar(kind): 'VGLOBAL' | ||
66 | explist1: end | ||
67 | -- STATEMENT: end 'expr' | ||
68 | |||
69 | close_func | ||
70 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_07.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_07.lua new file mode 100644 index 0000000..6403234 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_07.lua | |||
@@ -0,0 +1,84 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local foo | ||
3 | local function bar() | ||
4 | baz = nil | ||
5 | foo = bar() | ||
6 | end | ||
7 | foo = bar | ||
8 | -- END OF SOURCE -- | ||
9 | |||
10 | -- TOP: begin | ||
11 | open_func | ||
12 | |||
13 | chunk: | ||
14 | -- STATEMENT: begin 'local' line=1 | ||
15 | local_stat: local statement | ||
16 | localstat: begin | ||
17 | str_checkname: 'foo' | ||
18 | new_localvar: 'foo' | ||
19 | localstat: end | ||
20 | -- STATEMENT: end 'local' | ||
21 | |||
22 | -- STATEMENT: begin 'local' line=2 | ||
23 | local_stat: local function | ||
24 | localfunc: begin | ||
25 | str_checkname: 'bar' | ||
26 | new_localvar: 'bar' | ||
27 | localfunc: body | ||
28 | open_func | ||
29 | body: begin | ||
30 | body: parlist | ||
31 | parlist: begin | ||
32 | parlist: end | ||
33 | body: chunk | ||
34 | chunk: | ||
35 | -- STATEMENT: begin 'expr' line=3 | ||
36 | prefixexp: <name> | ||
37 | str_checkname: 'baz' | ||
38 | singlevar(kind): 'VGLOBAL' | ||
39 | expr_stat: assignment k='VGLOBAL' | ||
40 | assignment: '=' -- RHS elements follows | ||
41 | explist1: begin | ||
42 | expr: | ||
43 | simpleexp: nil | ||
44 | explist1: end | ||
45 | -- STATEMENT: end 'expr' | ||
46 | |||
47 | -- STATEMENT: begin 'expr' line=4 | ||
48 | prefixexp: <name> | ||
49 | str_checkname: 'foo' | ||
50 | singlevar(kind): 'VUPVAL' | ||
51 | expr_stat: assignment k='VUPVAL' | ||
52 | assignment: '=' -- RHS elements follows | ||
53 | explist1: begin | ||
54 | expr: | ||
55 | prefixexp: <name> | ||
56 | str_checkname: 'bar' | ||
57 | singlevar(kind): 'VUPVAL' | ||
58 | primaryexp: ( funcargs | ||
59 | funcargs: begin '(' | ||
60 | funcargs: end -- expr is a VCALL | ||
61 | explist1: end | ||
62 | -- STATEMENT: end 'expr' | ||
63 | |||
64 | body: end | ||
65 | close_func | ||
66 | localfunc: end | ||
67 | -- STATEMENT: end 'local' | ||
68 | |||
69 | -- STATEMENT: begin 'expr' line=6 | ||
70 | prefixexp: <name> | ||
71 | str_checkname: 'foo' | ||
72 | singlevar(kind): 'VLOCAL' | ||
73 | expr_stat: assignment k='VLOCAL' | ||
74 | assignment: '=' -- RHS elements follows | ||
75 | explist1: begin | ||
76 | expr: | ||
77 | prefixexp: <name> | ||
78 | str_checkname: 'bar' | ||
79 | singlevar(kind): 'VLOCAL' | ||
80 | explist1: end | ||
81 | -- STATEMENT: end 'expr' | ||
82 | |||
83 | close_func | ||
84 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_08.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_08.lua new file mode 100644 index 0000000..594e267 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_08.lua | |||
@@ -0,0 +1,159 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local foo | ||
3 | local function bar() | ||
4 | local function baz() | ||
5 | local foo, bar | ||
6 | foo = bar | ||
7 | foo = baz | ||
8 | end | ||
9 | foo = bar | ||
10 | foo = baz | ||
11 | end | ||
12 | foo = bar | ||
13 | foo = baz | ||
14 | -- END OF SOURCE -- | ||
15 | |||
16 | -- TOP: begin | ||
17 | open_func | ||
18 | |||
19 | chunk: | ||
20 | -- STATEMENT: begin 'local' line=1 | ||
21 | local_stat: local statement | ||
22 | localstat: begin | ||
23 | str_checkname: 'foo' | ||
24 | new_localvar: 'foo' | ||
25 | localstat: end | ||
26 | -- STATEMENT: end 'local' | ||
27 | |||
28 | -- STATEMENT: begin 'local' line=2 | ||
29 | local_stat: local function | ||
30 | localfunc: begin | ||
31 | str_checkname: 'bar' | ||
32 | new_localvar: 'bar' | ||
33 | localfunc: body | ||
34 | open_func | ||
35 | body: begin | ||
36 | body: parlist | ||
37 | parlist: begin | ||
38 | parlist: end | ||
39 | body: chunk | ||
40 | chunk: | ||
41 | -- STATEMENT: begin 'local' line=3 | ||
42 | local_stat: local function | ||
43 | localfunc: begin | ||
44 | str_checkname: 'baz' | ||
45 | new_localvar: 'baz' | ||
46 | localfunc: body | ||
47 | open_func | ||
48 | body: begin | ||
49 | body: parlist | ||
50 | parlist: begin | ||
51 | parlist: end | ||
52 | body: chunk | ||
53 | chunk: | ||
54 | -- STATEMENT: begin 'local' line=4 | ||
55 | local_stat: local statement | ||
56 | localstat: begin | ||
57 | str_checkname: 'foo' | ||
58 | new_localvar: 'foo' | ||
59 | str_checkname: 'bar' | ||
60 | new_localvar: 'bar' | ||
61 | localstat: end | ||
62 | -- STATEMENT: end 'local' | ||
63 | |||
64 | -- STATEMENT: begin 'expr' line=5 | ||
65 | prefixexp: <name> | ||
66 | str_checkname: 'foo' | ||
67 | singlevar(kind): 'VLOCAL' | ||
68 | expr_stat: assignment k='VLOCAL' | ||
69 | assignment: '=' -- RHS elements follows | ||
70 | explist1: begin | ||
71 | expr: | ||
72 | prefixexp: <name> | ||
73 | str_checkname: 'bar' | ||
74 | singlevar(kind): 'VLOCAL' | ||
75 | explist1: end | ||
76 | -- STATEMENT: end 'expr' | ||
77 | |||
78 | -- STATEMENT: begin 'expr' line=6 | ||
79 | prefixexp: <name> | ||
80 | str_checkname: 'foo' | ||
81 | singlevar(kind): 'VLOCAL' | ||
82 | expr_stat: assignment k='VLOCAL' | ||
83 | assignment: '=' -- RHS elements follows | ||
84 | explist1: begin | ||
85 | expr: | ||
86 | prefixexp: <name> | ||
87 | str_checkname: 'baz' | ||
88 | singlevar(kind): 'VUPVAL' | ||
89 | explist1: end | ||
90 | -- STATEMENT: end 'expr' | ||
91 | |||
92 | body: end | ||
93 | close_func | ||
94 | localfunc: end | ||
95 | -- STATEMENT: end 'local' | ||
96 | |||
97 | -- STATEMENT: begin 'expr' line=8 | ||
98 | prefixexp: <name> | ||
99 | str_checkname: 'foo' | ||
100 | singlevar(kind): 'VUPVAL' | ||
101 | expr_stat: assignment k='VUPVAL' | ||
102 | assignment: '=' -- RHS elements follows | ||
103 | explist1: begin | ||
104 | expr: | ||
105 | prefixexp: <name> | ||
106 | str_checkname: 'bar' | ||
107 | singlevar(kind): 'VUPVAL' | ||
108 | explist1: end | ||
109 | -- STATEMENT: end 'expr' | ||
110 | |||
111 | -- STATEMENT: begin 'expr' line=9 | ||
112 | prefixexp: <name> | ||
113 | str_checkname: 'foo' | ||
114 | singlevar(kind): 'VUPVAL' | ||
115 | expr_stat: assignment k='VUPVAL' | ||
116 | assignment: '=' -- RHS elements follows | ||
117 | explist1: begin | ||
118 | expr: | ||
119 | prefixexp: <name> | ||
120 | str_checkname: 'baz' | ||
121 | singlevar(kind): 'VLOCAL' | ||
122 | explist1: end | ||
123 | -- STATEMENT: end 'expr' | ||
124 | |||
125 | body: end | ||
126 | close_func | ||
127 | localfunc: end | ||
128 | -- STATEMENT: end 'local' | ||
129 | |||
130 | -- STATEMENT: begin 'expr' line=11 | ||
131 | prefixexp: <name> | ||
132 | str_checkname: 'foo' | ||
133 | singlevar(kind): 'VLOCAL' | ||
134 | expr_stat: assignment k='VLOCAL' | ||
135 | assignment: '=' -- RHS elements follows | ||
136 | explist1: begin | ||
137 | expr: | ||
138 | prefixexp: <name> | ||
139 | str_checkname: 'bar' | ||
140 | singlevar(kind): 'VLOCAL' | ||
141 | explist1: end | ||
142 | -- STATEMENT: end 'expr' | ||
143 | |||
144 | -- STATEMENT: begin 'expr' line=12 | ||
145 | prefixexp: <name> | ||
146 | str_checkname: 'foo' | ||
147 | singlevar(kind): 'VLOCAL' | ||
148 | expr_stat: assignment k='VLOCAL' | ||
149 | assignment: '=' -- RHS elements follows | ||
150 | explist1: begin | ||
151 | expr: | ||
152 | prefixexp: <name> | ||
153 | str_checkname: 'baz' | ||
154 | singlevar(kind): 'VGLOBAL' | ||
155 | explist1: end | ||
156 | -- STATEMENT: end 'expr' | ||
157 | |||
158 | close_func | ||
159 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_09.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_09.lua new file mode 100644 index 0000000..bfa3920 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_09.lua | |||
@@ -0,0 +1,53 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | function foo:bar() | ||
3 | print(self) | ||
4 | end | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'function' line=1 | ||
12 | function_stat: begin | ||
13 | funcname: begin | ||
14 | str_checkname: 'foo' | ||
15 | singlevar(kind): 'VGLOBAL' | ||
16 | funcname: -- ':' field | ||
17 | field: operator=: | ||
18 | checkname: | ||
19 | str_checkname: 'bar' | ||
20 | codestring: "bar" | ||
21 | funcname: end | ||
22 | function_stat: body needself='true' | ||
23 | open_func | ||
24 | body: begin | ||
25 | new_localvar: 'self' | ||
26 | body: parlist | ||
27 | parlist: begin | ||
28 | parlist: end | ||
29 | body: chunk | ||
30 | chunk: | ||
31 | -- STATEMENT: begin 'expr' line=2 | ||
32 | prefixexp: <name> | ||
33 | str_checkname: 'print' | ||
34 | singlevar(kind): 'VGLOBAL' | ||
35 | primaryexp: ( funcargs | ||
36 | funcargs: begin '(' | ||
37 | explist1: begin | ||
38 | expr: | ||
39 | prefixexp: <name> | ||
40 | str_checkname: 'self' | ||
41 | singlevar(kind): 'VLOCAL' | ||
42 | explist1: end | ||
43 | funcargs: end -- expr is a VCALL | ||
44 | expr_stat: function call k='VCALL' | ||
45 | -- STATEMENT: end 'expr' | ||
46 | |||
47 | body: end | ||
48 | close_func | ||
49 | function_stat: end | ||
50 | -- STATEMENT: end 'function' | ||
51 | |||
52 | close_func | ||
53 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_10.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_10.lua new file mode 100644 index 0000000..9a38883 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_10.lua | |||
@@ -0,0 +1,49 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | function foo(...) | ||
3 | print(arg) | ||
4 | end | ||
5 | -- END OF SOURCE -- | ||
6 | |||
7 | -- TOP: begin | ||
8 | open_func | ||
9 | |||
10 | chunk: | ||
11 | -- STATEMENT: begin 'function' line=1 | ||
12 | function_stat: begin | ||
13 | funcname: begin | ||
14 | str_checkname: 'foo' | ||
15 | singlevar(kind): 'VGLOBAL' | ||
16 | funcname: end | ||
17 | function_stat: body needself='false' | ||
18 | open_func | ||
19 | body: begin | ||
20 | body: parlist | ||
21 | parlist: begin | ||
22 | parlist: ... (dots) | ||
23 | new_localvar: 'arg' | ||
24 | parlist: end | ||
25 | body: chunk | ||
26 | chunk: | ||
27 | -- STATEMENT: begin 'expr' line=2 | ||
28 | prefixexp: <name> | ||
29 | str_checkname: 'print' | ||
30 | singlevar(kind): 'VGLOBAL' | ||
31 | primaryexp: ( funcargs | ||
32 | funcargs: begin '(' | ||
33 | explist1: begin | ||
34 | expr: | ||
35 | prefixexp: <name> | ||
36 | str_checkname: 'arg' | ||
37 | singlevar(kind): 'VLOCAL' | ||
38 | explist1: end | ||
39 | funcargs: end -- expr is a VCALL | ||
40 | expr_stat: function call k='VCALL' | ||
41 | -- STATEMENT: end 'expr' | ||
42 | |||
43 | body: end | ||
44 | close_func | ||
45 | function_stat: end | ||
46 | -- STATEMENT: end 'function' | ||
47 | |||
48 | close_func | ||
49 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_11.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_11.lua new file mode 100644 index 0000000..e4c9e21 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_11.lua | |||
@@ -0,0 +1,79 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | local c,d | ||
3 | function foo(a,b,c) | ||
4 | print(a,c,d,e) | ||
5 | end | ||
6 | -- END OF SOURCE -- | ||
7 | |||
8 | -- TOP: begin | ||
9 | open_func | ||
10 | |||
11 | chunk: | ||
12 | -- STATEMENT: begin 'local' line=1 | ||
13 | local_stat: local statement | ||
14 | localstat: begin | ||
15 | str_checkname: 'c' | ||
16 | new_localvar: 'c' | ||
17 | str_checkname: 'd' | ||
18 | new_localvar: 'd' | ||
19 | localstat: end | ||
20 | -- STATEMENT: end 'local' | ||
21 | |||
22 | -- STATEMENT: begin 'function' line=2 | ||
23 | function_stat: begin | ||
24 | funcname: begin | ||
25 | str_checkname: 'foo' | ||
26 | singlevar(kind): 'VGLOBAL' | ||
27 | funcname: end | ||
28 | function_stat: body needself='false' | ||
29 | open_func | ||
30 | body: begin | ||
31 | body: parlist | ||
32 | parlist: begin | ||
33 | str_checkname: 'a' | ||
34 | new_localvar: 'a' | ||
35 | str_checkname: 'b' | ||
36 | new_localvar: 'b' | ||
37 | str_checkname: 'c' | ||
38 | new_localvar: 'c' | ||
39 | parlist: end | ||
40 | body: chunk | ||
41 | chunk: | ||
42 | -- STATEMENT: begin 'expr' line=3 | ||
43 | prefixexp: <name> | ||
44 | str_checkname: 'print' | ||
45 | singlevar(kind): 'VGLOBAL' | ||
46 | primaryexp: ( funcargs | ||
47 | funcargs: begin '(' | ||
48 | explist1: begin | ||
49 | expr: | ||
50 | prefixexp: <name> | ||
51 | str_checkname: 'a' | ||
52 | singlevar(kind): 'VLOCAL' | ||
53 | explist1: ',' -- continuation | ||
54 | expr: | ||
55 | prefixexp: <name> | ||
56 | str_checkname: 'c' | ||
57 | singlevar(kind): 'VLOCAL' | ||
58 | explist1: ',' -- continuation | ||
59 | expr: | ||
60 | prefixexp: <name> | ||
61 | str_checkname: 'd' | ||
62 | singlevar(kind): 'VUPVAL' | ||
63 | explist1: ',' -- continuation | ||
64 | expr: | ||
65 | prefixexp: <name> | ||
66 | str_checkname: 'e' | ||
67 | singlevar(kind): 'VGLOBAL' | ||
68 | explist1: end | ||
69 | funcargs: end -- expr is a VCALL | ||
70 | expr_stat: function call k='VCALL' | ||
71 | -- STATEMENT: end 'expr' | ||
72 | |||
73 | body: end | ||
74 | close_func | ||
75 | function_stat: end | ||
76 | -- STATEMENT: end 'function' | ||
77 | |||
78 | close_func | ||
79 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_12.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_12.lua new file mode 100644 index 0000000..b278ba2 --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_12.lua | |||
@@ -0,0 +1,94 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | function foo(a,b) | ||
3 | local bar = function(c,d) | ||
4 | print(a,b,c,d) | ||
5 | end | ||
6 | end | ||
7 | -- END OF SOURCE -- | ||
8 | |||
9 | -- TOP: begin | ||
10 | open_func | ||
11 | |||
12 | chunk: | ||
13 | -- STATEMENT: begin 'function' line=1 | ||
14 | function_stat: begin | ||
15 | funcname: begin | ||
16 | str_checkname: 'foo' | ||
17 | singlevar(kind): 'VGLOBAL' | ||
18 | funcname: end | ||
19 | function_stat: body needself='false' | ||
20 | open_func | ||
21 | body: begin | ||
22 | body: parlist | ||
23 | parlist: begin | ||
24 | str_checkname: 'a' | ||
25 | new_localvar: 'a' | ||
26 | str_checkname: 'b' | ||
27 | new_localvar: 'b' | ||
28 | parlist: end | ||
29 | body: chunk | ||
30 | chunk: | ||
31 | -- STATEMENT: begin 'local' line=2 | ||
32 | local_stat: local statement | ||
33 | localstat: begin | ||
34 | str_checkname: 'bar' | ||
35 | new_localvar: 'bar' | ||
36 | localstat: -- assignment | ||
37 | explist1: begin | ||
38 | expr: | ||
39 | simpleexp: function | ||
40 | open_func | ||
41 | body: begin | ||
42 | body: parlist | ||
43 | parlist: begin | ||
44 | str_checkname: 'c' | ||
45 | new_localvar: 'c' | ||
46 | str_checkname: 'd' | ||
47 | new_localvar: 'd' | ||
48 | parlist: end | ||
49 | body: chunk | ||
50 | chunk: | ||
51 | -- STATEMENT: begin 'expr' line=3 | ||
52 | prefixexp: <name> | ||
53 | str_checkname: 'print' | ||
54 | singlevar(kind): 'VGLOBAL' | ||
55 | primaryexp: ( funcargs | ||
56 | funcargs: begin '(' | ||
57 | explist1: begin | ||
58 | expr: | ||
59 | prefixexp: <name> | ||
60 | str_checkname: 'a' | ||
61 | singlevar(kind): 'VUPVAL' | ||
62 | explist1: ',' -- continuation | ||
63 | expr: | ||
64 | prefixexp: <name> | ||
65 | str_checkname: 'b' | ||
66 | singlevar(kind): 'VUPVAL' | ||
67 | explist1: ',' -- continuation | ||
68 | expr: | ||
69 | prefixexp: <name> | ||
70 | str_checkname: 'c' | ||
71 | singlevar(kind): 'VLOCAL' | ||
72 | explist1: ',' -- continuation | ||
73 | expr: | ||
74 | prefixexp: <name> | ||
75 | str_checkname: 'd' | ||
76 | singlevar(kind): 'VLOCAL' | ||
77 | explist1: end | ||
78 | funcargs: end -- expr is a VCALL | ||
79 | expr_stat: function call k='VCALL' | ||
80 | -- STATEMENT: end 'expr' | ||
81 | |||
82 | body: end | ||
83 | close_func | ||
84 | explist1: end | ||
85 | localstat: end | ||
86 | -- STATEMENT: end 'local' | ||
87 | |||
88 | body: end | ||
89 | close_func | ||
90 | function_stat: end | ||
91 | -- STATEMENT: end 'function' | ||
92 | |||
93 | close_func | ||
94 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_13.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_13.lua new file mode 100644 index 0000000..6e4850c --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_13.lua | |||
@@ -0,0 +1,117 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | for i = 1,10 do | ||
3 | print(i) | ||
4 | end | ||
5 | for i = 1,10,-2 do | ||
6 | print(i) | ||
7 | end | ||
8 | -- END OF SOURCE -- | ||
9 | |||
10 | -- TOP: begin | ||
11 | open_func | ||
12 | |||
13 | chunk: | ||
14 | -- STATEMENT: begin 'for' line=1 | ||
15 | for_stat: begin | ||
16 | enterblock(isbreakable=false) | ||
17 | str_checkname: 'i' | ||
18 | for_stat: numerical loop | ||
19 | new_localvar: 'i' | ||
20 | new_localvar: '(for limit)' | ||
21 | new_localvar: '(for step)' | ||
22 | fornum: begin | ||
23 | fornum: index start | ||
24 | exp1: begin | ||
25 | expr: | ||
26 | simpleexp: <number>=1 | ||
27 | exp1: end | ||
28 | fornum: index stop | ||
29 | exp1: begin | ||
30 | expr: | ||
31 | simpleexp: <number>=10 | ||
32 | exp1: end | ||
33 | fornum: body | ||
34 | enterblock(isbreakable=true) | ||
35 | block: begin | ||
36 | enterblock(isbreakable=false) | ||
37 | chunk: | ||
38 | -- STATEMENT: begin 'expr' line=2 | ||
39 | prefixexp: <name> | ||
40 | str_checkname: 'print' | ||
41 | singlevar(kind): 'VGLOBAL' | ||
42 | primaryexp: ( funcargs | ||
43 | funcargs: begin '(' | ||
44 | explist1: begin | ||
45 | expr: | ||
46 | prefixexp: <name> | ||
47 | str_checkname: 'i' | ||
48 | singlevar(kind): 'VLOCAL' | ||
49 | explist1: end | ||
50 | funcargs: end -- expr is a VCALL | ||
51 | expr_stat: function call k='VCALL' | ||
52 | -- STATEMENT: end 'expr' | ||
53 | |||
54 | leaveblock | ||
55 | block: end | ||
56 | leaveblock | ||
57 | fornum: end | ||
58 | leaveblock | ||
59 | for_stat: end | ||
60 | -- STATEMENT: end 'for' | ||
61 | |||
62 | -- STATEMENT: begin 'for' line=4 | ||
63 | for_stat: begin | ||
64 | enterblock(isbreakable=false) | ||
65 | str_checkname: 'i' | ||
66 | for_stat: numerical loop | ||
67 | new_localvar: 'i' | ||
68 | new_localvar: '(for limit)' | ||
69 | new_localvar: '(for step)' | ||
70 | fornum: begin | ||
71 | fornum: index start | ||
72 | exp1: begin | ||
73 | expr: | ||
74 | simpleexp: <number>=1 | ||
75 | exp1: end | ||
76 | fornum: index stop | ||
77 | exp1: begin | ||
78 | expr: | ||
79 | simpleexp: <number>=10 | ||
80 | exp1: end | ||
81 | fornum: index step | ||
82 | exp1: begin | ||
83 | expr: | ||
84 | subexpr: uop='-' | ||
85 | simpleexp: <number>=2 | ||
86 | exp1: end | ||
87 | fornum: body | ||
88 | enterblock(isbreakable=true) | ||
89 | block: begin | ||
90 | enterblock(isbreakable=false) | ||
91 | chunk: | ||
92 | -- STATEMENT: begin 'expr' line=5 | ||
93 | prefixexp: <name> | ||
94 | str_checkname: 'print' | ||
95 | singlevar(kind): 'VGLOBAL' | ||
96 | primaryexp: ( funcargs | ||
97 | funcargs: begin '(' | ||
98 | explist1: begin | ||
99 | expr: | ||
100 | prefixexp: <name> | ||
101 | str_checkname: 'i' | ||
102 | singlevar(kind): 'VLOCAL' | ||
103 | explist1: end | ||
104 | funcargs: end -- expr is a VCALL | ||
105 | expr_stat: function call k='VCALL' | ||
106 | -- STATEMENT: end 'expr' | ||
107 | |||
108 | leaveblock | ||
109 | block: end | ||
110 | leaveblock | ||
111 | fornum: end | ||
112 | leaveblock | ||
113 | for_stat: end | ||
114 | -- STATEMENT: end 'for' | ||
115 | |||
116 | close_func | ||
117 | -- TOP: end | ||
diff --git a/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_14.lua b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_14.lua new file mode 100644 index 0000000..f80c33f --- /dev/null +++ b/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_b_14.lua | |||
@@ -0,0 +1,125 @@ | |||
1 | -- START OF SOURCE -- | ||
2 | for foo in bar() do | ||
3 | print(foo) | ||
4 | end | ||
5 | for foo,bar,baz in spring() do | ||
6 | print(foo,bar,baz) | ||
7 | end | ||
8 | -- END OF SOURCE -- | ||
9 | |||
10 | -- TOP: begin | ||
11 | open_func | ||
12 | |||
13 | chunk: | ||
14 | -- STATEMENT: begin 'for' line=1 | ||
15 | for_stat: begin | ||
16 | enterblock(isbreakable=false) | ||
17 | str_checkname: 'foo' | ||
18 | for_stat: list-based loop | ||
19 | forlist: begin | ||
20 | new_localvar: '(for generator)' | ||
21 | new_localvar: '(for state)' | ||
22 | new_localvar: 'foo' | ||
23 | forlist: explist1 | ||
24 | explist1: begin | ||
25 | expr: | ||
26 | prefixexp: <name> | ||
27 | str_checkname: 'bar' | ||
28 | singlevar(kind): 'VGLOBAL' | ||
29 | primaryexp: ( funcargs | ||
30 | funcargs: begin '(' | ||
31 | funcargs: end -- expr is a VCALL | ||
32 | explist1: end | ||
33 | forlist: body | ||
34 | enterblock(isbreakable=true) | ||
35 | block: begin | ||
36 | enterblock(isbreakable=false) | ||
37 | chunk: | ||
38 | -- STATEMENT: begin 'expr' line=2 | ||
39 | prefixexp: <name> | ||
40 | str_checkname: 'print' | ||
41 | singlevar(kind): 'VGLOBAL' | ||
42 | primaryexp: ( funcargs | ||
43 | funcargs: begin '(' | ||
44 | explist1: begin | ||
45 | expr: | ||
46 | prefixexp: <name> | ||
47 | str_checkname: 'foo' | ||
48 | singlevar(kind): 'VLOCAL' | ||
49 | explist1: end | ||
50 | funcargs: end -- expr is a VCALL | ||
51 | expr_stat: function call k='VCALL' | ||
52 | -- STATEMENT: end 'expr' | ||
53 | |||
54 | leaveblock | ||
55 | block: end | ||
56 | leaveblock | ||
57 | forlist: end | ||
58 | leaveblock | ||
59 | for_stat: end | ||
60 | -- STATEMENT: end 'for' | ||
61 | |||
62 | -- STATEMENT: begin 'for' line=4 | ||
63 | for_stat: begin | ||
64 | enterblock(isbreakable=false) | ||
65 | str_checkname: 'foo' | ||
66 | for_stat: list-based loop | ||
67 | forlist: begin | ||
68 | new_localvar: '(for generator)' | ||
69 | new_localvar: '(for state)' | ||
70 | new_localvar: 'foo' | ||
71 | str_checkname: 'bar' | ||
72 | new_localvar: 'bar' | ||
73 | str_checkname: 'baz' | ||
74 | new_localvar: 'baz' | ||
75 | forlist: explist1 | ||
76 | explist1: begin | ||
77 | expr: | ||
78 | prefixexp: <name> | ||
79 | str_checkname: 'spring' | ||
80 | singlevar(kind): 'VGLOBAL' | ||
81 | primaryexp: ( funcargs | ||
82 | funcargs: begin '(' | ||
83 | funcargs: end -- expr is a VCALL | ||
84 | explist1: end | ||
85 | forlist: body | ||
86 | enterblock(isbreakable=true) | ||
87 | block: begin | ||
88 | enterblock(isbreakable=false) | ||
89 | chunk: | ||
90 | -- STATEMENT: begin 'expr' line=5 | ||
91 | prefixexp: <name> | ||
92 | str_checkname: 'print' | ||
93 | singlevar(kind): 'VGLOBAL' | ||
94 | primaryexp: ( funcargs | ||
95 | funcargs: begin '(' | ||
96 | explist1: begin | ||
97 | expr: | ||
98 | prefixexp: <name> | ||
99 | str_checkname: 'foo' | ||
100 | singlevar(kind): 'VLOCAL' | ||
101 | explist1: ',' -- continuation | ||
102 | expr: | ||
103 | prefixexp: <name> | ||
104 | str_checkname: 'bar' | ||
105 | singlevar(kind): 'VLOCAL' | ||
106 | explist1: ',' -- continuation | ||
107 | expr: | ||
108 | prefixexp: <name> | ||
109 | str_checkname: 'baz' | ||
110 | singlevar(kind): 'VLOCAL' | ||
111 | explist1: end | ||
112 | funcargs: end -- expr is a VCALL | ||
113 | expr_stat: function call k='VCALL' | ||
114 | -- STATEMENT: end 'expr' | ||
115 | |||
116 | leaveblock | ||
117 | block: end | ||
118 | leaveblock | ||
119 | forlist: end | ||
120 | leaveblock | ||
121 | for_stat: end | ||
122 | -- STATEMENT: end 'for' | ||
123 | |||
124 | close_func | ||
125 | -- TOP: end | ||