antelope 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +25 -25
- data/.rspec +3 -3
- data/.travis.yml +10 -10
- data/.yardopts +7 -7
- data/CONTRIBUTING.md +50 -38
- data/GENERATORS.md +180 -124
- data/Gemfile +7 -7
- data/LICENSE.txt +22 -22
- data/README.md +240 -104
- data/Rakefile +2 -2
- data/TODO.md +58 -58
- data/antelope.gemspec +29 -28
- data/bin/antelope +7 -7
- data/examples/deterministic.ace +35 -35
- data/examples/example.ace +52 -51
- data/examples/example.ace.err +192 -192
- data/examples/example.ace.inf +432 -432
- data/examples/example.ate +70 -70
- data/examples/example.ate.err +192 -192
- data/examples/example.ate.inf +432 -432
- data/examples/liquidscript.ace +233 -233
- data/examples/simple.ace +22 -22
- data/lib/antelope/ace/compiler.rb +334 -334
- data/lib/antelope/ace/errors.rb +30 -30
- data/lib/antelope/ace/scanner/argument.rb +57 -57
- data/lib/antelope/ace/scanner/first.rb +89 -89
- data/lib/antelope/ace/scanner/second.rb +178 -178
- data/lib/antelope/ace/scanner/third.rb +27 -27
- data/lib/antelope/ace/scanner.rb +144 -144
- data/lib/antelope/ace.rb +47 -47
- data/lib/antelope/cli.rb +60 -60
- data/lib/antelope/errors.rb +25 -25
- data/lib/antelope/generation/constructor/first.rb +86 -86
- data/lib/antelope/generation/constructor/follow.rb +105 -105
- data/lib/antelope/generation/constructor/nullable.rb +64 -64
- data/lib/antelope/generation/constructor.rb +127 -127
- data/lib/antelope/generation/errors.rb +17 -17
- data/lib/antelope/generation/null.rb +13 -13
- data/lib/antelope/generation/recognizer/rule.rb +216 -216
- data/lib/antelope/generation/recognizer/state.rb +129 -129
- data/lib/antelope/generation/recognizer.rb +177 -177
- data/lib/antelope/generation/tableizer.rb +176 -176
- data/lib/antelope/generation.rb +15 -15
- data/lib/antelope/generator/base/coerce.rb +115 -0
- data/lib/antelope/generator/base/extra.rb +50 -0
- data/lib/antelope/generator/base.rb +134 -264
- data/lib/antelope/generator/c.rb +11 -11
- data/lib/antelope/generator/c_header.rb +105 -105
- data/lib/antelope/generator/c_source.rb +39 -39
- data/lib/antelope/generator/error.rb +34 -34
- data/lib/antelope/generator/group.rb +60 -57
- data/lib/antelope/generator/html.rb +51 -51
- data/lib/antelope/generator/info.rb +47 -47
- data/lib/antelope/generator/null.rb +18 -18
- data/lib/antelope/generator/output.rb +17 -17
- data/lib/antelope/generator/ruby.rb +112 -79
- data/lib/antelope/generator/templates/c_header.ant +36 -36
- data/lib/antelope/generator/templates/c_source.ant +202 -202
- data/lib/antelope/generator/templates/error.erb +40 -0
- data/lib/antelope/generator/templates/html/antelope.css +53 -1
- data/lib/antelope/generator/templates/html/antelope.html +82 -1
- data/lib/antelope/generator/templates/html/antelope.js +9 -1
- data/lib/antelope/generator/templates/html/css.ant +53 -53
- data/lib/antelope/generator/templates/html/html.ant +82 -82
- data/lib/antelope/generator/templates/html/js.ant +9 -9
- data/lib/antelope/generator/templates/info.erb +61 -0
- data/lib/antelope/generator/templates/{ruby.ant → ruby.erb} +171 -178
- data/lib/antelope/generator.rb +62 -66
- data/lib/antelope/grammar/generation.rb +76 -76
- data/lib/antelope/grammar/loading.rb +84 -84
- data/lib/antelope/grammar/precedence.rb +59 -59
- data/lib/antelope/grammar/precedences.rb +64 -64
- data/lib/antelope/grammar/production.rb +56 -56
- data/lib/antelope/grammar/productions.rb +154 -154
- data/lib/antelope/grammar/symbols.rb +64 -64
- data/lib/antelope/grammar/token/epsilon.rb +23 -23
- data/lib/antelope/grammar/token/error.rb +24 -24
- data/lib/antelope/grammar/token/nonterminal.rb +15 -15
- data/lib/antelope/grammar/token/terminal.rb +15 -15
- data/lib/antelope/grammar/token.rb +231 -231
- data/lib/antelope/grammar.rb +68 -68
- data/lib/antelope/version.rb +6 -6
- data/lib/antelope.rb +18 -19
- data/optimizations.txt +42 -42
- data/spec/antelope/ace/compiler_spec.rb +60 -60
- data/spec/antelope/ace/scanner_spec.rb +27 -27
- data/spec/antelope/generation/constructor_spec.rb +131 -131
- data/spec/fixtures/simple.ace +22 -22
- data/spec/spec_helper.rb +39 -39
- data/spec/support/benchmark_helper.rb +5 -5
- data/spec/support/grammar_helper.rb +14 -14
- data/subl/Ace (Ruby).JSON-tmLanguage +94 -94
- data/subl/Ace (Ruby).tmLanguage +153 -153
- metadata +22 -11
- data/lib/antelope/generator/templates/error.ant +0 -34
- data/lib/antelope/generator/templates/info.ant +0 -53
- data/lib/antelope/template/compiler.rb +0 -78
- data/lib/antelope/template/errors.rb +0 -9
- data/lib/antelope/template/scanner.rb +0 -109
- data/lib/antelope/template.rb +0 -64
- data/spec/antelope/template_spec.rb +0 -50
data/examples/example.ate
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
Antelope.define :example, version: "0.0.1", require: "~> 0.3",
|
2
|
-
output: :ruby do
|
3
|
-
define "output.verbose" => true,
|
4
|
-
"output.panic-mode" => true,
|
5
|
-
"ruby.error-class" => "SyntaxError",
|
6
|
-
"ruby.indent" => 2,
|
7
|
-
"salt.variant" => "normal"
|
8
|
-
|
9
|
-
terminals do
|
10
|
-
# We set the value to true, because the default value in a hash
|
11
|
-
# is nil.
|
12
|
-
terminal NUMBER: true,
|
13
|
-
MULTIPLY: "*",
|
14
|
-
EXPONENTIATE: "^",
|
15
|
-
DIVIDE: "/",
|
16
|
-
ADD: "+",
|
17
|
-
SUBTRACT: "-",
|
18
|
-
LPAREN: "(",
|
19
|
-
RPAREN: ")"
|
20
|
-
end
|
21
|
-
|
22
|
-
precedences do
|
23
|
-
precedence :right, [:EXPONENTIATE]
|
24
|
-
precedence :left, [:MULTIPLY, :DIVIDE]
|
25
|
-
precedence :left, [:ADD, :SUBTRACT]
|
26
|
-
end
|
27
|
-
|
28
|
-
productions do
|
29
|
-
production :expression do
|
30
|
-
match body: [:NUMBER],
|
31
|
-
action: %{ match[0][1] }
|
32
|
-
match body: [:expression, :EXPONENTIATE, :expression],
|
33
|
-
action: %{ match[0] ** match[2] }
|
34
|
-
match body: [:expression, :ADD, :expression],
|
35
|
-
action: %{ match[0] + match[2] }
|
36
|
-
match body: [:expression, :SUBTRACT, :expression],
|
37
|
-
action: %{ match[0] - match[2] }
|
38
|
-
match body: [:expression, :MULTIPLY, :expression],
|
39
|
-
action: %{ match[0] * match[2] }
|
40
|
-
match body: [:expression, :DIVIDE, :expression],
|
41
|
-
action: %{ match[0] / match[2] }
|
42
|
-
match body: [:LPAREN, :expression, :RPAREN],
|
43
|
-
action: %{ match[1] }
|
44
|
-
match body: [:LPAREN, :$error, :RPAREN],
|
45
|
-
action: %{ match[1] }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
template <<-RUBY
|
50
|
-
class ExampleParser
|
51
|
-
%{write}
|
52
|
-
|
53
|
-
def type(token)
|
54
|
-
token[0]
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
input = [
|
59
|
-
[:LPAREN],
|
60
|
-
[:NUMBER, 2],
|
61
|
-
[:ADD],
|
62
|
-
[:ADD, 2],
|
63
|
-
[:RPAREN],
|
64
|
-
[:MULTIPLY],
|
65
|
-
[:NUMBER, 3]
|
66
|
-
]
|
67
|
-
|
68
|
-
p ExampleParser.new.parse(input)
|
69
|
-
RUBY
|
70
|
-
end
|
1
|
+
Antelope.define :example, version: "0.0.1", require: "~> 0.3",
|
2
|
+
output: :ruby do
|
3
|
+
define "output.verbose" => true,
|
4
|
+
"output.panic-mode" => true,
|
5
|
+
"ruby.error-class" => "SyntaxError",
|
6
|
+
"ruby.indent" => 2,
|
7
|
+
"salt.variant" => "normal"
|
8
|
+
|
9
|
+
terminals do
|
10
|
+
# We set the value to true, because the default value in a hash
|
11
|
+
# is nil.
|
12
|
+
terminal NUMBER: true,
|
13
|
+
MULTIPLY: "*",
|
14
|
+
EXPONENTIATE: "^",
|
15
|
+
DIVIDE: "/",
|
16
|
+
ADD: "+",
|
17
|
+
SUBTRACT: "-",
|
18
|
+
LPAREN: "(",
|
19
|
+
RPAREN: ")"
|
20
|
+
end
|
21
|
+
|
22
|
+
precedences do
|
23
|
+
precedence :right, [:EXPONENTIATE]
|
24
|
+
precedence :left, [:MULTIPLY, :DIVIDE]
|
25
|
+
precedence :left, [:ADD, :SUBTRACT]
|
26
|
+
end
|
27
|
+
|
28
|
+
productions do
|
29
|
+
production :expression do
|
30
|
+
match body: [:NUMBER],
|
31
|
+
action: %{ match[0][1] }
|
32
|
+
match body: [:expression, :EXPONENTIATE, :expression],
|
33
|
+
action: %{ match[0] ** match[2] }
|
34
|
+
match body: [:expression, :ADD, :expression],
|
35
|
+
action: %{ match[0] + match[2] }
|
36
|
+
match body: [:expression, :SUBTRACT, :expression],
|
37
|
+
action: %{ match[0] - match[2] }
|
38
|
+
match body: [:expression, :MULTIPLY, :expression],
|
39
|
+
action: %{ match[0] * match[2] }
|
40
|
+
match body: [:expression, :DIVIDE, :expression],
|
41
|
+
action: %{ match[0] / match[2] }
|
42
|
+
match body: [:LPAREN, :expression, :RPAREN],
|
43
|
+
action: %{ match[1] }
|
44
|
+
match body: [:LPAREN, :$error, :RPAREN],
|
45
|
+
action: %{ match[1] }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
template <<-RUBY
|
50
|
+
class ExampleParser
|
51
|
+
%{write}
|
52
|
+
|
53
|
+
def type(token)
|
54
|
+
token[0]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
input = [
|
59
|
+
[:LPAREN],
|
60
|
+
[:NUMBER, 2],
|
61
|
+
[:ADD],
|
62
|
+
[:ADD, 2],
|
63
|
+
[:RPAREN],
|
64
|
+
[:MULTIPLY],
|
65
|
+
[:NUMBER, 3]
|
66
|
+
]
|
67
|
+
|
68
|
+
p ExampleParser.new.parse(input)
|
69
|
+
RUBY
|
70
|
+
end
|
data/examples/example.ate.err
CHANGED
@@ -1,192 +1,192 @@
|
|
1
|
-
Productions:
|
2
|
-
15/n1: expression → NUMBER { match[0][1] }
|
3
|
-
26/n0: $start → expression $end
|
4
|
-
79/r4: expression → expression "^" expression { match[0] ** match[2] }
|
5
|
-
85/l2: expression → expression "+" expression { match[0] + match[2] }
|
6
|
-
91/l2: expression → expression "-" expression { match[0] - match[2] }
|
7
|
-
97/l3: expression → expression "*" expression { match[0] * match[2] }
|
8
|
-
103/l3: expression → expression "/" expression { match[0] / match[2] }
|
9
|
-
109/n1: expression → "(" expression ")" { match[1] }
|
10
|
-
110/n1: expression → "(" $error ")" { match[1] }
|
11
|
-
|
12
|
-
Error:
|
13
|
-
Conflicts in State 12:
|
14
|
-
On EXPONENTIATE (resolved):
|
15
|
-
state 5/reduce 2 (r4 vs r4, -1)
|
16
|
-
Rules:
|
17
|
-
79/r4: expression → expression "^" expression •
|
18
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
19
|
-
Transitions:
|
20
|
-
80/r4: expression → expression • "^" expression
|
21
|
-
On ADD (resolved):
|
22
|
-
state 6/reduce 2 (r4 vs l2, 1)
|
23
|
-
Rules:
|
24
|
-
79/r4: expression → expression "^" expression •
|
25
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
26
|
-
Transitions:
|
27
|
-
81/l2: expression → expression • "+" expression
|
28
|
-
On SUBTRACT (resolved):
|
29
|
-
state 7/reduce 2 (r4 vs l2, 1)
|
30
|
-
Rules:
|
31
|
-
79/r4: expression → expression "^" expression •
|
32
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
33
|
-
Transitions:
|
34
|
-
82/l2: expression → expression • "-" expression
|
35
|
-
On MULTIPLY (resolved):
|
36
|
-
state 8/reduce 2 (r4 vs l3, 1)
|
37
|
-
Rules:
|
38
|
-
79/r4: expression → expression "^" expression •
|
39
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
40
|
-
Transitions:
|
41
|
-
83/l3: expression → expression • "*" expression
|
42
|
-
On DIVIDE (resolved):
|
43
|
-
state 9/reduce 2 (r4 vs l3, 1)
|
44
|
-
Rules:
|
45
|
-
79/r4: expression → expression "^" expression •
|
46
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
47
|
-
Transitions:
|
48
|
-
84/l3: expression → expression • "/" expression
|
49
|
-
Conflicts in State 13:
|
50
|
-
On EXPONENTIATE (resolved):
|
51
|
-
state 5/reduce 3 (l2 vs r4, -1)
|
52
|
-
Rules:
|
53
|
-
85/l2: expression → expression "+" expression •
|
54
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
55
|
-
Transitions:
|
56
|
-
86/r4: expression → expression • "^" expression
|
57
|
-
On ADD (resolved):
|
58
|
-
state 6/reduce 3 (l2 vs l2, 1)
|
59
|
-
Rules:
|
60
|
-
85/l2: expression → expression "+" expression •
|
61
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
62
|
-
Transitions:
|
63
|
-
87/l2: expression → expression • "+" expression
|
64
|
-
On SUBTRACT (resolved):
|
65
|
-
state 7/reduce 3 (l2 vs l2, 1)
|
66
|
-
Rules:
|
67
|
-
85/l2: expression → expression "+" expression •
|
68
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
69
|
-
Transitions:
|
70
|
-
88/l2: expression → expression • "-" expression
|
71
|
-
On MULTIPLY (resolved):
|
72
|
-
state 8/reduce 3 (l2 vs l3, -1)
|
73
|
-
Rules:
|
74
|
-
85/l2: expression → expression "+" expression •
|
75
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
76
|
-
Transitions:
|
77
|
-
89/l3: expression → expression • "*" expression
|
78
|
-
On DIVIDE (resolved):
|
79
|
-
state 9/reduce 3 (l2 vs l3, -1)
|
80
|
-
Rules:
|
81
|
-
85/l2: expression → expression "+" expression •
|
82
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
83
|
-
Transitions:
|
84
|
-
90/l3: expression → expression • "/" expression
|
85
|
-
Conflicts in State 14:
|
86
|
-
On EXPONENTIATE (resolved):
|
87
|
-
state 5/reduce 4 (l2 vs r4, -1)
|
88
|
-
Rules:
|
89
|
-
91/l2: expression → expression "-" expression •
|
90
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
91
|
-
Transitions:
|
92
|
-
92/r4: expression → expression • "^" expression
|
93
|
-
On ADD (resolved):
|
94
|
-
state 6/reduce 4 (l2 vs l2, 1)
|
95
|
-
Rules:
|
96
|
-
91/l2: expression → expression "-" expression •
|
97
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
98
|
-
Transitions:
|
99
|
-
93/l2: expression → expression • "+" expression
|
100
|
-
On SUBTRACT (resolved):
|
101
|
-
state 7/reduce 4 (l2 vs l2, 1)
|
102
|
-
Rules:
|
103
|
-
91/l2: expression → expression "-" expression •
|
104
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
105
|
-
Transitions:
|
106
|
-
94/l2: expression → expression • "-" expression
|
107
|
-
On MULTIPLY (resolved):
|
108
|
-
state 8/reduce 4 (l2 vs l3, -1)
|
109
|
-
Rules:
|
110
|
-
91/l2: expression → expression "-" expression •
|
111
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
112
|
-
Transitions:
|
113
|
-
95/l3: expression → expression • "*" expression
|
114
|
-
On DIVIDE (resolved):
|
115
|
-
state 9/reduce 4 (l2 vs l3, -1)
|
116
|
-
Rules:
|
117
|
-
91/l2: expression → expression "-" expression •
|
118
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
119
|
-
Transitions:
|
120
|
-
96/l3: expression → expression • "/" expression
|
121
|
-
Conflicts in State 15:
|
122
|
-
On EXPONENTIATE (resolved):
|
123
|
-
state 5/reduce 5 (l3 vs r4, -1)
|
124
|
-
Rules:
|
125
|
-
97/l3: expression → expression "*" expression •
|
126
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
127
|
-
Transitions:
|
128
|
-
98/r4: expression → expression • "^" expression
|
129
|
-
On ADD (resolved):
|
130
|
-
state 6/reduce 5 (l3 vs l2, 1)
|
131
|
-
Rules:
|
132
|
-
97/l3: expression → expression "*" expression •
|
133
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
134
|
-
Transitions:
|
135
|
-
99/l2: expression → expression • "+" expression
|
136
|
-
On SUBTRACT (resolved):
|
137
|
-
state 7/reduce 5 (l3 vs l2, 1)
|
138
|
-
Rules:
|
139
|
-
97/l3: expression → expression "*" expression •
|
140
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
141
|
-
Transitions:
|
142
|
-
100/l2: expression → expression • "-" expression
|
143
|
-
On MULTIPLY (resolved):
|
144
|
-
state 8/reduce 5 (l3 vs l3, 1)
|
145
|
-
Rules:
|
146
|
-
97/l3: expression → expression "*" expression •
|
147
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
148
|
-
Transitions:
|
149
|
-
101/l3: expression → expression • "*" expression
|
150
|
-
On DIVIDE (resolved):
|
151
|
-
state 9/reduce 5 (l3 vs l3, 1)
|
152
|
-
Rules:
|
153
|
-
97/l3: expression → expression "*" expression •
|
154
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
155
|
-
Transitions:
|
156
|
-
102/l3: expression → expression • "/" expression
|
157
|
-
Conflicts in State 16:
|
158
|
-
On EXPONENTIATE (resolved):
|
159
|
-
state 5/reduce 6 (l3 vs r4, -1)
|
160
|
-
Rules:
|
161
|
-
103/l3: expression → expression "/" expression •
|
162
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
163
|
-
Transitions:
|
164
|
-
104/r4: expression → expression • "^" expression
|
165
|
-
On ADD (resolved):
|
166
|
-
state 6/reduce 6 (l3 vs l2, 1)
|
167
|
-
Rules:
|
168
|
-
103/l3: expression → expression "/" expression •
|
169
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
170
|
-
Transitions:
|
171
|
-
105/l2: expression → expression • "+" expression
|
172
|
-
On SUBTRACT (resolved):
|
173
|
-
state 7/reduce 6 (l3 vs l2, 1)
|
174
|
-
Rules:
|
175
|
-
103/l3: expression → expression "/" expression •
|
176
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
177
|
-
Transitions:
|
178
|
-
106/l2: expression → expression • "-" expression
|
179
|
-
On MULTIPLY (resolved):
|
180
|
-
state 8/reduce 6 (l3 vs l3, 1)
|
181
|
-
Rules:
|
182
|
-
103/l3: expression → expression "/" expression •
|
183
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
184
|
-
Transitions:
|
185
|
-
107/l3: expression → expression • "*" expression
|
186
|
-
On DIVIDE (resolved):
|
187
|
-
state 9/reduce 6 (l3 vs l3, 1)
|
188
|
-
Rules:
|
189
|
-
103/l3: expression → expression "/" expression •
|
190
|
-
{$end, "^", "+", "-", "*", "/", ")"}
|
191
|
-
Transitions:
|
192
|
-
108/l3: expression → expression • "/" expression
|
1
|
+
Productions:
|
2
|
+
15/n1: expression → NUMBER { match[0][1] }
|
3
|
+
26/n0: $start → expression $end
|
4
|
+
79/r4: expression → expression "^" expression { match[0] ** match[2] }
|
5
|
+
85/l2: expression → expression "+" expression { match[0] + match[2] }
|
6
|
+
91/l2: expression → expression "-" expression { match[0] - match[2] }
|
7
|
+
97/l3: expression → expression "*" expression { match[0] * match[2] }
|
8
|
+
103/l3: expression → expression "/" expression { match[0] / match[2] }
|
9
|
+
109/n1: expression → "(" expression ")" { match[1] }
|
10
|
+
110/n1: expression → "(" $error ")" { match[1] }
|
11
|
+
|
12
|
+
Error:
|
13
|
+
Conflicts in State 12:
|
14
|
+
On EXPONENTIATE (resolved):
|
15
|
+
state 5/reduce 2 (r4 vs r4, -1)
|
16
|
+
Rules:
|
17
|
+
79/r4: expression → expression "^" expression •
|
18
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
19
|
+
Transitions:
|
20
|
+
80/r4: expression → expression • "^" expression
|
21
|
+
On ADD (resolved):
|
22
|
+
state 6/reduce 2 (r4 vs l2, 1)
|
23
|
+
Rules:
|
24
|
+
79/r4: expression → expression "^" expression •
|
25
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
26
|
+
Transitions:
|
27
|
+
81/l2: expression → expression • "+" expression
|
28
|
+
On SUBTRACT (resolved):
|
29
|
+
state 7/reduce 2 (r4 vs l2, 1)
|
30
|
+
Rules:
|
31
|
+
79/r4: expression → expression "^" expression •
|
32
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
33
|
+
Transitions:
|
34
|
+
82/l2: expression → expression • "-" expression
|
35
|
+
On MULTIPLY (resolved):
|
36
|
+
state 8/reduce 2 (r4 vs l3, 1)
|
37
|
+
Rules:
|
38
|
+
79/r4: expression → expression "^" expression •
|
39
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
40
|
+
Transitions:
|
41
|
+
83/l3: expression → expression • "*" expression
|
42
|
+
On DIVIDE (resolved):
|
43
|
+
state 9/reduce 2 (r4 vs l3, 1)
|
44
|
+
Rules:
|
45
|
+
79/r4: expression → expression "^" expression •
|
46
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
47
|
+
Transitions:
|
48
|
+
84/l3: expression → expression • "/" expression
|
49
|
+
Conflicts in State 13:
|
50
|
+
On EXPONENTIATE (resolved):
|
51
|
+
state 5/reduce 3 (l2 vs r4, -1)
|
52
|
+
Rules:
|
53
|
+
85/l2: expression → expression "+" expression •
|
54
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
55
|
+
Transitions:
|
56
|
+
86/r4: expression → expression • "^" expression
|
57
|
+
On ADD (resolved):
|
58
|
+
state 6/reduce 3 (l2 vs l2, 1)
|
59
|
+
Rules:
|
60
|
+
85/l2: expression → expression "+" expression •
|
61
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
62
|
+
Transitions:
|
63
|
+
87/l2: expression → expression • "+" expression
|
64
|
+
On SUBTRACT (resolved):
|
65
|
+
state 7/reduce 3 (l2 vs l2, 1)
|
66
|
+
Rules:
|
67
|
+
85/l2: expression → expression "+" expression •
|
68
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
69
|
+
Transitions:
|
70
|
+
88/l2: expression → expression • "-" expression
|
71
|
+
On MULTIPLY (resolved):
|
72
|
+
state 8/reduce 3 (l2 vs l3, -1)
|
73
|
+
Rules:
|
74
|
+
85/l2: expression → expression "+" expression •
|
75
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
76
|
+
Transitions:
|
77
|
+
89/l3: expression → expression • "*" expression
|
78
|
+
On DIVIDE (resolved):
|
79
|
+
state 9/reduce 3 (l2 vs l3, -1)
|
80
|
+
Rules:
|
81
|
+
85/l2: expression → expression "+" expression •
|
82
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
83
|
+
Transitions:
|
84
|
+
90/l3: expression → expression • "/" expression
|
85
|
+
Conflicts in State 14:
|
86
|
+
On EXPONENTIATE (resolved):
|
87
|
+
state 5/reduce 4 (l2 vs r4, -1)
|
88
|
+
Rules:
|
89
|
+
91/l2: expression → expression "-" expression •
|
90
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
91
|
+
Transitions:
|
92
|
+
92/r4: expression → expression • "^" expression
|
93
|
+
On ADD (resolved):
|
94
|
+
state 6/reduce 4 (l2 vs l2, 1)
|
95
|
+
Rules:
|
96
|
+
91/l2: expression → expression "-" expression •
|
97
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
98
|
+
Transitions:
|
99
|
+
93/l2: expression → expression • "+" expression
|
100
|
+
On SUBTRACT (resolved):
|
101
|
+
state 7/reduce 4 (l2 vs l2, 1)
|
102
|
+
Rules:
|
103
|
+
91/l2: expression → expression "-" expression •
|
104
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
105
|
+
Transitions:
|
106
|
+
94/l2: expression → expression • "-" expression
|
107
|
+
On MULTIPLY (resolved):
|
108
|
+
state 8/reduce 4 (l2 vs l3, -1)
|
109
|
+
Rules:
|
110
|
+
91/l2: expression → expression "-" expression •
|
111
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
112
|
+
Transitions:
|
113
|
+
95/l3: expression → expression • "*" expression
|
114
|
+
On DIVIDE (resolved):
|
115
|
+
state 9/reduce 4 (l2 vs l3, -1)
|
116
|
+
Rules:
|
117
|
+
91/l2: expression → expression "-" expression •
|
118
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
119
|
+
Transitions:
|
120
|
+
96/l3: expression → expression • "/" expression
|
121
|
+
Conflicts in State 15:
|
122
|
+
On EXPONENTIATE (resolved):
|
123
|
+
state 5/reduce 5 (l3 vs r4, -1)
|
124
|
+
Rules:
|
125
|
+
97/l3: expression → expression "*" expression •
|
126
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
127
|
+
Transitions:
|
128
|
+
98/r4: expression → expression • "^" expression
|
129
|
+
On ADD (resolved):
|
130
|
+
state 6/reduce 5 (l3 vs l2, 1)
|
131
|
+
Rules:
|
132
|
+
97/l3: expression → expression "*" expression •
|
133
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
134
|
+
Transitions:
|
135
|
+
99/l2: expression → expression • "+" expression
|
136
|
+
On SUBTRACT (resolved):
|
137
|
+
state 7/reduce 5 (l3 vs l2, 1)
|
138
|
+
Rules:
|
139
|
+
97/l3: expression → expression "*" expression •
|
140
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
141
|
+
Transitions:
|
142
|
+
100/l2: expression → expression • "-" expression
|
143
|
+
On MULTIPLY (resolved):
|
144
|
+
state 8/reduce 5 (l3 vs l3, 1)
|
145
|
+
Rules:
|
146
|
+
97/l3: expression → expression "*" expression •
|
147
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
148
|
+
Transitions:
|
149
|
+
101/l3: expression → expression • "*" expression
|
150
|
+
On DIVIDE (resolved):
|
151
|
+
state 9/reduce 5 (l3 vs l3, 1)
|
152
|
+
Rules:
|
153
|
+
97/l3: expression → expression "*" expression •
|
154
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
155
|
+
Transitions:
|
156
|
+
102/l3: expression → expression • "/" expression
|
157
|
+
Conflicts in State 16:
|
158
|
+
On EXPONENTIATE (resolved):
|
159
|
+
state 5/reduce 6 (l3 vs r4, -1)
|
160
|
+
Rules:
|
161
|
+
103/l3: expression → expression "/" expression •
|
162
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
163
|
+
Transitions:
|
164
|
+
104/r4: expression → expression • "^" expression
|
165
|
+
On ADD (resolved):
|
166
|
+
state 6/reduce 6 (l3 vs l2, 1)
|
167
|
+
Rules:
|
168
|
+
103/l3: expression → expression "/" expression •
|
169
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
170
|
+
Transitions:
|
171
|
+
105/l2: expression → expression • "+" expression
|
172
|
+
On SUBTRACT (resolved):
|
173
|
+
state 7/reduce 6 (l3 vs l2, 1)
|
174
|
+
Rules:
|
175
|
+
103/l3: expression → expression "/" expression •
|
176
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
177
|
+
Transitions:
|
178
|
+
106/l2: expression → expression • "-" expression
|
179
|
+
On MULTIPLY (resolved):
|
180
|
+
state 8/reduce 6 (l3 vs l3, 1)
|
181
|
+
Rules:
|
182
|
+
103/l3: expression → expression "/" expression •
|
183
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
184
|
+
Transitions:
|
185
|
+
107/l3: expression → expression • "*" expression
|
186
|
+
On DIVIDE (resolved):
|
187
|
+
state 9/reduce 6 (l3 vs l3, 1)
|
188
|
+
Rules:
|
189
|
+
103/l3: expression → expression "/" expression •
|
190
|
+
{$end, "^", "+", "-", "*", "/", ")"}
|
191
|
+
Transitions:
|
192
|
+
108/l3: expression → expression • "/" expression
|