antelope 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +25 -23
  3. data/.rspec +3 -3
  4. data/.travis.yml +10 -9
  5. data/.yardopts +7 -7
  6. data/CONTRIBUTING.md +38 -38
  7. data/GENERATORS.md +124 -124
  8. data/Gemfile +7 -7
  9. data/LICENSE.txt +22 -22
  10. data/README.md +104 -104
  11. data/Rakefile +2 -2
  12. data/TODO.md +58 -58
  13. data/antelope.gemspec +28 -28
  14. data/bin/antelope +7 -7
  15. data/examples/deterministic.ace +35 -35
  16. data/examples/example.ace +51 -50
  17. data/examples/example.err +192 -0
  18. data/examples/{example.output → example.inf} +384 -385
  19. data/examples/liquidscript.ace +233 -162
  20. data/examples/simple.ace +22 -22
  21. data/lib/antelope/ace/compiler.rb +334 -334
  22. data/lib/antelope/ace/errors.rb +48 -48
  23. data/lib/antelope/ace/grammar/generation.rb +80 -80
  24. data/lib/antelope/ace/grammar/loading.rb +53 -53
  25. data/lib/antelope/ace/grammar/precedences.rb +68 -65
  26. data/lib/antelope/ace/grammar/productions.rb +156 -150
  27. data/lib/antelope/ace/grammar/symbols.rb +66 -66
  28. data/lib/antelope/ace/grammar.rb +69 -69
  29. data/lib/antelope/ace/precedence.rb +61 -61
  30. data/lib/antelope/ace/production.rb +57 -57
  31. data/lib/antelope/ace/scanner/argument.rb +57 -57
  32. data/lib/antelope/ace/scanner/first.rb +89 -89
  33. data/lib/antelope/ace/scanner/second.rb +177 -177
  34. data/lib/antelope/ace/scanner/third.rb +27 -27
  35. data/lib/antelope/ace/scanner.rb +134 -134
  36. data/lib/antelope/ace/token/epsilon.rb +24 -24
  37. data/lib/antelope/ace/token/error.rb +26 -26
  38. data/lib/antelope/ace/token/nonterminal.rb +17 -17
  39. data/lib/antelope/ace/token/terminal.rb +17 -17
  40. data/lib/antelope/ace/token.rb +238 -238
  41. data/lib/antelope/ace.rb +53 -53
  42. data/lib/antelope/cli.rb +55 -55
  43. data/lib/antelope/errors.rb +8 -8
  44. data/lib/antelope/generation/constructor/first.rb +88 -88
  45. data/lib/antelope/generation/constructor/follow.rb +103 -103
  46. data/lib/antelope/generation/constructor/nullable.rb +64 -64
  47. data/lib/antelope/generation/constructor.rb +126 -126
  48. data/lib/antelope/generation/errors.rb +17 -17
  49. data/lib/antelope/generation/null.rb +13 -13
  50. data/lib/antelope/generation/recognizer/rule.rb +216 -216
  51. data/lib/antelope/generation/recognizer/state.rb +130 -130
  52. data/lib/antelope/generation/recognizer.rb +180 -180
  53. data/lib/antelope/generation/tableizer.rb +175 -154
  54. data/lib/antelope/generation.rb +15 -15
  55. data/lib/antelope/generator/base.rb +264 -264
  56. data/lib/antelope/generator/c.rb +11 -11
  57. data/lib/antelope/generator/c_header.rb +105 -105
  58. data/lib/antelope/generator/c_source.rb +39 -39
  59. data/lib/antelope/generator/error.rb +34 -0
  60. data/lib/antelope/generator/group.rb +57 -57
  61. data/lib/antelope/generator/html.rb +51 -0
  62. data/lib/antelope/generator/info.rb +47 -0
  63. data/lib/antelope/generator/null.rb +18 -18
  64. data/lib/antelope/generator/output.rb +17 -49
  65. data/lib/antelope/generator/ruby.rb +79 -79
  66. data/lib/antelope/generator/templates/c_header.ant +36 -36
  67. data/lib/antelope/generator/templates/c_source.ant +202 -202
  68. data/lib/antelope/generator/templates/error.ant +33 -0
  69. data/lib/antelope/generator/templates/html/antelope.css +1 -0
  70. data/lib/antelope/generator/templates/html/antelope.html +1 -0
  71. data/lib/antelope/generator/templates/html/antelope.js +1 -0
  72. data/lib/antelope/generator/templates/html/css.ant +53 -0
  73. data/lib/antelope/generator/templates/html/html.ant +82 -0
  74. data/lib/antelope/generator/templates/html/js.ant +9 -0
  75. data/lib/antelope/generator/templates/info.ant +53 -0
  76. data/lib/antelope/generator/templates/ruby.ant +178 -146
  77. data/lib/antelope/generator.rb +66 -63
  78. data/lib/antelope/template/compiler.rb +78 -78
  79. data/lib/antelope/template/errors.rb +9 -9
  80. data/lib/antelope/template/scanner.rb +109 -109
  81. data/lib/antelope/template.rb +65 -60
  82. data/lib/antelope/version.rb +6 -6
  83. data/lib/antelope.rb +13 -13
  84. data/optimizations.txt +42 -0
  85. data/spec/antelope/ace/compiler_spec.rb +60 -60
  86. data/spec/antelope/ace/scanner_spec.rb +27 -27
  87. data/spec/antelope/constructor_spec.rb +133 -136
  88. data/spec/antelope/template_spec.rb +50 -49
  89. data/spec/fixtures/simple.ace +22 -22
  90. data/spec/spec_helper.rb +39 -39
  91. data/spec/support/benchmark_helper.rb +5 -5
  92. data/spec/support/grammar_helper.rb +15 -15
  93. data/subl/Ace (Ruby).JSON-tmLanguage +94 -94
  94. data/subl/Ace (Ruby).tmLanguage +153 -153
  95. metadata +17 -6
  96. data/lib/antelope/generator/templates/output.ant +0 -68
@@ -1,385 +1,384 @@
1
- Productions:
2
- 0 $start: expression $end
3
- 1 expression: NUMBER { |a| a[1] }
4
- 2 expression: expression "^" expression { |a, _, b| a** b }
5
- 3 expression: expression "+" expression { |a, _, b| a + b }
6
- 4 expression: expression "-" expression { |a, _, b| a - b }
7
- 5 expression: expression "*" expression { |a, _, b| a * b }
8
- 6 expression: expression "/" expression { |a, _, b| a / b }
9
- 7 expression: "(" expression ")" { |_, a, _| a }
10
- 8 expression: "(" $error ")" { |_, e, _| e[1] }
11
-
12
-
13
- Precedence:
14
- --- highest
15
- right 4:
16
- {EXPONENTIATE}
17
- left 3:
18
- {MULTIPLY, DIVIDE}
19
- left 2:
20
- {ADD, SUBTRACT}
21
- nonassoc 1:
22
- {_}
23
- nonassoc 0:
24
- {$end}
25
- --- lowest
26
-
27
-
28
- State 0:
29
- 0/n0: $start → • expression $end
30
- {}
31
- 1/n1: expression → • NUMBER
32
- {}
33
- 2/r4: expression → • expression "^" expression
34
- {}
35
- 3/l2: expression → • expression "+" expression
36
- {}
37
- 4/l2: expression → • expression "-" expression
38
- {}
39
- 5/l3: expression → • expression "*" expression
40
- {}
41
- 6/l3: expression → • expression "/" expression
42
- {}
43
- 7/n1: expression → • "(" expression ")"
44
- {}
45
- 8/n1: expression → • "(" $error ")"
46
- {}
47
- transitions:
48
- expression: State 1
49
- NUMBER: State 2
50
- "(": State 3
51
-
52
- State 1:
53
- 9/n0: $start → expression • $end
54
- {}
55
- 10/r4: expression → expression • "^" expression
56
- {}
57
- 11/l2: expression → expression • "+" expression
58
- {}
59
- 12/l2: expression → expression • "-" expression
60
- {}
61
- 13/l3: expression → expression • "*" expression
62
- {}
63
- 14/l3: expression → expression • "/" expression
64
- {}
65
- transitions:
66
- $end: State 4
67
- "^": State 5
68
- "+": State 6
69
- "-": State 7
70
- "*": State 8
71
- "/": State 9
72
-
73
- State 2:
74
- 15/n1: expression NUMBER
75
- {$end, "^", "+", "-", "*", "/", ")"}
76
- reductions:
77
- $default: Rule 1
78
-
79
- State 3:
80
- 16/n1: expression → "(" • expression ")"
81
- {}
82
- 17/n1: expression → "(" • $error ")"
83
- {}
84
- 18/n1: expression → • NUMBER
85
- {}
86
- 19/r4: expression → • expression "^" expression
87
- {}
88
- 20/l2: expression → • expression "+" expression
89
- {}
90
- 21/l2: expression → • expression "-" expression
91
- {}
92
- 22/l3: expression → • expression "*" expression
93
- {}
94
- 23/l3: expression → • expression "/" expression
95
- {}
96
- 24/n1: expression → • "(" expression ")"
97
- {}
98
- 25/n1: expression → • "(" $error ")"
99
- {}
100
- transitions:
101
- expression: State 10
102
- $error: State 11
103
- NUMBER: State 2
104
- "(": State 3
105
-
106
- State 4:
107
- 26/n0: $start → expression $end •
108
- {}
109
- accepting:
110
- $end: Rule 0
111
-
112
- State 5:
113
- 27/r4: expression → expression "^" • expression
114
- {}
115
- 28/n1: expression → • NUMBER
116
- {}
117
- 29/r4: expression → • expression "^" expression
118
- {}
119
- 30/l2: expression → • expression "+" expression
120
- {}
121
- 31/l2: expression → • expression "-" expression
122
- {}
123
- 32/l3: expression → • expression "*" expression
124
- {}
125
- 33/l3: expression → • expression "/" expression
126
- {}
127
- 34/n1: expression → • "(" expression ")"
128
- {}
129
- 35/n1: expression → • "(" $error ")"
130
- {}
131
- transitions:
132
- expression: State 12
133
- NUMBER: State 2
134
- "(": State 3
135
-
136
- State 6:
137
- 36/l2: expression → expression "+" • expression
138
- {}
139
- 37/n1: expression → • NUMBER
140
- {}
141
- 38/r4: expression → • expression "^" expression
142
- {}
143
- 39/l2: expression → • expression "+" expression
144
- {}
145
- 40/l2: expression → • expression "-" expression
146
- {}
147
- 41/l3: expression → • expression "*" expression
148
- {}
149
- 42/l3: expression → • expression "/" expression
150
- {}
151
- 43/n1: expression → • "(" expression ")"
152
- {}
153
- 44/n1: expression → • "(" $error ")"
154
- {}
155
- transitions:
156
- expression: State 13
157
- NUMBER: State 2
158
- "(": State 3
159
-
160
- State 7:
161
- 45/l2: expression → expression "-" • expression
162
- {}
163
- 46/n1: expression → • NUMBER
164
- {}
165
- 47/r4: expression → • expression "^" expression
166
- {}
167
- 48/l2: expression → • expression "+" expression
168
- {}
169
- 49/l2: expression → • expression "-" expression
170
- {}
171
- 50/l3: expression → • expression "*" expression
172
- {}
173
- 51/l3: expression → • expression "/" expression
174
- {}
175
- 52/n1: expression → • "(" expression ")"
176
- {}
177
- 53/n1: expression → • "(" $error ")"
178
- {}
179
- transitions:
180
- expression: State 14
181
- NUMBER: State 2
182
- "(": State 3
183
-
184
- State 8:
185
- 54/l3: expression → expression "*" • expression
186
- {}
187
- 55/n1: expression → • NUMBER
188
- {}
189
- 56/r4: expression → • expression "^" expression
190
- {}
191
- 57/l2: expression → • expression "+" expression
192
- {}
193
- 58/l2: expression → • expression "-" expression
194
- {}
195
- 59/l3: expression → • expression "*" expression
196
- {}
197
- 60/l3: expression → • expression "/" expression
198
- {}
199
- 61/n1: expression → • "(" expression ")"
200
- {}
201
- 62/n1: expression → • "(" $error ")"
202
- {}
203
- transitions:
204
- expression: State 15
205
- NUMBER: State 2
206
- "(": State 3
207
-
208
- State 9:
209
- 63/l3: expression → expression "/" • expression
210
- {}
211
- 64/n1: expression → • NUMBER
212
- {}
213
- 65/r4: expression → • expression "^" expression
214
- {}
215
- 66/l2: expression → • expression "+" expression
216
- {}
217
- 67/l2: expression → • expression "-" expression
218
- {}
219
- 68/l3: expression → • expression "*" expression
220
- {}
221
- 69/l3: expression → • expression "/" expression
222
- {}
223
- 70/n1: expression → • "(" expression ")"
224
- {}
225
- 71/n1: expression → • "(" $error ")"
226
- {}
227
- transitions:
228
- expression: State 16
229
- NUMBER: State 2
230
- "(": State 3
231
-
232
- State 10:
233
- 72/n1: expression → "(" expression • ")"
234
- {}
235
- 73/r4: expression → expression • "^" expression
236
- {}
237
- 74/l2: expression → expression • "+" expression
238
- {}
239
- 75/l2: expression → expression • "-" expression
240
- {}
241
- 76/l3: expression → expression • "*" expression
242
- {}
243
- 77/l3: expression → expression • "/" expression
244
- {}
245
- transitions:
246
- ")": State 17
247
- "^": State 5
248
- "+": State 6
249
- "-": State 7
250
- "*": State 8
251
- "/": State 9
252
-
253
- State 11:
254
- 78/n1: expression → "(" $error • ")"
255
- {}
256
- transitions:
257
- ")": State 18
258
-
259
- State 12:
260
- 79/r4: expression expression "^" expression
261
- {$end, "^", "+", "-", "*", "/", ")"}
262
- 80/r4: expression → expression • "^" expression
263
- {}
264
- 81/l2: expression → expression • "+" expression
265
- {}
266
- 82/l2: expression → expression • "-" expression
267
- {}
268
- 83/l3: expression → expression • "*" expression
269
- {}
270
- 84/l3: expression → expression • "/" expression
271
- {}
272
- transitions:
273
- "^": State 5
274
- reductions:
275
- "+": Rule 2
276
- "-": Rule 2
277
- "*": Rule 2
278
- "/": Rule 2
279
- $end: Rule 2
280
- ")": Rule 2
281
-
282
- State 13:
283
- 85/l2: expression expression "+" expression
284
- {$end, "^", "+", "-", "*", "/", ")"}
285
- 86/r4: expression → expression • "^" expression
286
- {}
287
- 87/l2: expression → expression • "+" expression
288
- {}
289
- 88/l2: expression → expression • "-" expression
290
- {}
291
- 89/l3: expression → expression • "*" expression
292
- {}
293
- 90/l3: expression → expression • "/" expression
294
- {}
295
- transitions:
296
- "^": State 5
297
- "*": State 8
298
- "/": State 9
299
- reductions:
300
- "+": Rule 3
301
- "-": Rule 3
302
- $end: Rule 3
303
- ")": Rule 3
304
-
305
- State 14:
306
- 91/l2: expression expression "-" expression
307
- {$end, "^", "+", "-", "*", "/", ")"}
308
- 92/r4: expression → expression • "^" expression
309
- {}
310
- 93/l2: expression → expression • "+" expression
311
- {}
312
- 94/l2: expression → expression • "-" expression
313
- {}
314
- 95/l3: expression → expression • "*" expression
315
- {}
316
- 96/l3: expression → expression • "/" expression
317
- {}
318
- transitions:
319
- "^": State 5
320
- "*": State 8
321
- "/": State 9
322
- reductions:
323
- "+": Rule 4
324
- "-": Rule 4
325
- $end: Rule 4
326
- ")": Rule 4
327
-
328
- State 15:
329
- 97/l3: expression expression "*" expression
330
- {$end, "^", "+", "-", "*", "/", ")"}
331
- 98/r4: expression → expression • "^" expression
332
- {}
333
- 99/l2: expression → expression • "+" expression
334
- {}
335
- 100/l2: expression → expression • "-" expression
336
- {}
337
- 101/l3: expression → expression • "*" expression
338
- {}
339
- 102/l3: expression → expression • "/" expression
340
- {}
341
- transitions:
342
- "^": State 5
343
- reductions:
344
- "+": Rule 5
345
- "-": Rule 5
346
- "*": Rule 5
347
- "/": Rule 5
348
- $end: Rule 5
349
- ")": Rule 5
350
-
351
- State 16:
352
- 103/l3: expression expression "/" expression •
353
- {$end, "^", "+", "-", "*", "/", ")"}
354
- 104/r4: expression → expression • "^" expression
355
- {}
356
- 105/l2: expression → expression • "+" expression
357
- {}
358
- 106/l2: expression → expression • "-" expression
359
- {}
360
- 107/l3: expression → expression • "*" expression
361
- {}
362
- 108/l3: expression → expression • "/" expression
363
- {}
364
- transitions:
365
- "^": State 5
366
- reductions:
367
- "+": Rule 6
368
- "-": Rule 6
369
- "*": Rule 6
370
- "/": Rule 6
371
- $end: Rule 6
372
- ")": Rule 6
373
-
374
- State 17:
375
- 109/n1: expression "(" expression ")"
376
- {$end, "^", "+", "-", "*", "/", ")"}
377
- reductions:
378
- $default: Rule 7
379
-
380
- State 18:
381
- 110/n1: expression "(" $error ")"
382
- {$end, "^", "+", "-", "*", "/", ")"}
383
- reductions:
384
- $default: Rule 8
385
-
1
+ Productions:
2
+ 0 $start expression $end
3
+ 1 expression NUMBER { |a| a[1] }
4
+ 2 expression expression "^" expression { |a, _, b| a** b }
5
+ 3 expression expression "+" expression { |a, _, b| a + b }
6
+ 4 expression expression "-" expression { |a, _, b| a - b }
7
+ 5 expression expression "*" expression { |a, _, b| a * b }
8
+ 6 expression expression "/" expression { |a, _, b| a / b }
9
+ 7 expression "(" expression ")" { |_, a, _| a }
10
+ 8 expression "(" $error ")" { |_, e, _| e[1] }
11
+
12
+
13
+ Precedence:
14
+ --- highest
15
+ right 4:
16
+ {EXPONENTIATE}
17
+ left 3:
18
+ {MULTIPLY, DIVIDE}
19
+ left 2:
20
+ {ADD, SUBTRACT}
21
+ nonassoc 1:
22
+ {_}
23
+ nonassoc 0:
24
+ {$end}
25
+ --- lowest
26
+
27
+ State 0:
28
+ 0/n0: $start → expression $end
29
+ {}
30
+ 1/n1: expression → • NUMBER
31
+ {}
32
+ 2/r4: expression → • expression "^" expression
33
+ {}
34
+ 3/l2: expression → • expression "+" expression
35
+ {}
36
+ 4/l2: expression → • expression "-" expression
37
+ {}
38
+ 5/l3: expression → • expression "*" expression
39
+ {}
40
+ 6/l3: expression → • expression "/" expression
41
+ {}
42
+ 7/n1: expression → • "(" expression ")"
43
+ {}
44
+ 8/n1: expression → • "(" $error ")"
45
+ {}
46
+ transitions:
47
+ expression: State 1
48
+ NUMBER: State 2
49
+ "(": State 3
50
+
51
+ State 1:
52
+ 9/n0: $start → expression • $end
53
+ {}
54
+ 10/r4: expression → expression • "^" expression
55
+ {}
56
+ 11/l2: expression → expression • "+" expression
57
+ {}
58
+ 12/l2: expression → expression • "-" expression
59
+ {}
60
+ 13/l3: expression → expression • "*" expression
61
+ {}
62
+ 14/l3: expression → expression • "/" expression
63
+ {}
64
+ transitions:
65
+ $end: State 4
66
+ "^": State 5
67
+ "+": State 6
68
+ "-": State 7
69
+ "*": State 8
70
+ "/": State 9
71
+
72
+ State 2:
73
+ 15/n1: expression → NUMBER •
74
+ {$end, "^", "+", "-", "*", "/", ")"}
75
+ reductions:
76
+ $default: Rule 1
77
+
78
+ State 3:
79
+ 16/n1: expression → "(" • expression ")"
80
+ {}
81
+ 17/n1: expression → "(" • $error ")"
82
+ {}
83
+ 18/n1: expression → • NUMBER
84
+ {}
85
+ 19/r4: expression → • expression "^" expression
86
+ {}
87
+ 20/l2: expression → • expression "+" expression
88
+ {}
89
+ 21/l2: expression → • expression "-" expression
90
+ {}
91
+ 22/l3: expression → • expression "*" expression
92
+ {}
93
+ 23/l3: expression → • expression "/" expression
94
+ {}
95
+ 24/n1: expression → • "(" expression ")"
96
+ {}
97
+ 25/n1: expression → • "(" $error ")"
98
+ {}
99
+ transitions:
100
+ expression: State 10
101
+ $error: State 11
102
+ NUMBER: State 2
103
+ "(": State 3
104
+
105
+ State 4:
106
+ 26/n0: $start → expression $end •
107
+ {}
108
+ accepting:
109
+ $end: Rule 0
110
+
111
+ State 5:
112
+ 27/r4: expression → expression "^" • expression
113
+ {}
114
+ 28/n1: expression → • NUMBER
115
+ {}
116
+ 29/r4: expression → • expression "^" expression
117
+ {}
118
+ 30/l2: expression → • expression "+" expression
119
+ {}
120
+ 31/l2: expression → • expression "-" expression
121
+ {}
122
+ 32/l3: expression → • expression "*" expression
123
+ {}
124
+ 33/l3: expression → • expression "/" expression
125
+ {}
126
+ 34/n1: expression → • "(" expression ")"
127
+ {}
128
+ 35/n1: expression → • "(" $error ")"
129
+ {}
130
+ transitions:
131
+ expression: State 12
132
+ NUMBER: State 2
133
+ "(": State 3
134
+
135
+ State 6:
136
+ 36/l2: expression → expression "+" • expression
137
+ {}
138
+ 37/n1: expression → • NUMBER
139
+ {}
140
+ 38/r4: expression → • expression "^" expression
141
+ {}
142
+ 39/l2: expression → • expression "+" expression
143
+ {}
144
+ 40/l2: expression → • expression "-" expression
145
+ {}
146
+ 41/l3: expression → • expression "*" expression
147
+ {}
148
+ 42/l3: expression → • expression "/" expression
149
+ {}
150
+ 43/n1: expression → • "(" expression ")"
151
+ {}
152
+ 44/n1: expression → • "(" $error ")"
153
+ {}
154
+ transitions:
155
+ expression: State 13
156
+ NUMBER: State 2
157
+ "(": State 3
158
+
159
+ State 7:
160
+ 45/l2: expression → expression "-" • expression
161
+ {}
162
+ 46/n1: expression → • NUMBER
163
+ {}
164
+ 47/r4: expression → • expression "^" expression
165
+ {}
166
+ 48/l2: expression → • expression "+" expression
167
+ {}
168
+ 49/l2: expression → • expression "-" expression
169
+ {}
170
+ 50/l3: expression → • expression "*" expression
171
+ {}
172
+ 51/l3: expression → • expression "/" expression
173
+ {}
174
+ 52/n1: expression → • "(" expression ")"
175
+ {}
176
+ 53/n1: expression → • "(" $error ")"
177
+ {}
178
+ transitions:
179
+ expression: State 14
180
+ NUMBER: State 2
181
+ "(": State 3
182
+
183
+ State 8:
184
+ 54/l3: expression → expression "*" • expression
185
+ {}
186
+ 55/n1: expression → • NUMBER
187
+ {}
188
+ 56/r4: expression → • expression "^" expression
189
+ {}
190
+ 57/l2: expression → • expression "+" expression
191
+ {}
192
+ 58/l2: expression → • expression "-" expression
193
+ {}
194
+ 59/l3: expression → • expression "*" expression
195
+ {}
196
+ 60/l3: expression → • expression "/" expression
197
+ {}
198
+ 61/n1: expression → • "(" expression ")"
199
+ {}
200
+ 62/n1: expression → • "(" $error ")"
201
+ {}
202
+ transitions:
203
+ expression: State 15
204
+ NUMBER: State 2
205
+ "(": State 3
206
+
207
+ State 9:
208
+ 63/l3: expression → expression "/" • expression
209
+ {}
210
+ 64/n1: expression → • NUMBER
211
+ {}
212
+ 65/r4: expression → • expression "^" expression
213
+ {}
214
+ 66/l2: expression → • expression "+" expression
215
+ {}
216
+ 67/l2: expression → • expression "-" expression
217
+ {}
218
+ 68/l3: expression → • expression "*" expression
219
+ {}
220
+ 69/l3: expression → • expression "/" expression
221
+ {}
222
+ 70/n1: expression → • "(" expression ")"
223
+ {}
224
+ 71/n1: expression → • "(" $error ")"
225
+ {}
226
+ transitions:
227
+ expression: State 16
228
+ NUMBER: State 2
229
+ "(": State 3
230
+
231
+ State 10:
232
+ 72/n1: expression → "(" expression • ")"
233
+ {}
234
+ 73/r4: expression → expression • "^" expression
235
+ {}
236
+ 74/l2: expression → expression • "+" expression
237
+ {}
238
+ 75/l2: expression → expression • "-" expression
239
+ {}
240
+ 76/l3: expression → expression • "*" expression
241
+ {}
242
+ 77/l3: expression → expression • "/" expression
243
+ {}
244
+ transitions:
245
+ ")": State 17
246
+ "^": State 5
247
+ "+": State 6
248
+ "-": State 7
249
+ "*": State 8
250
+ "/": State 9
251
+
252
+ State 11:
253
+ 78/n1: expression → "(" $error • ")"
254
+ {}
255
+ transitions:
256
+ ")": State 18
257
+
258
+ State 12:
259
+ 79/r4: expression → expression "^" expression •
260
+ {$end, "^", "+", "-", "*", "/", ")"}
261
+ 80/r4: expression expression "^" expression
262
+ {}
263
+ 81/l2: expression → expression • "+" expression
264
+ {}
265
+ 82/l2: expression → expression • "-" expression
266
+ {}
267
+ 83/l3: expression → expression • "*" expression
268
+ {}
269
+ 84/l3: expression → expression • "/" expression
270
+ {}
271
+ transitions:
272
+ "^": State 5
273
+ reductions:
274
+ "+": Rule 2
275
+ "-": Rule 2
276
+ "*": Rule 2
277
+ "/": Rule 2
278
+ $end: Rule 2
279
+ ")": Rule 2
280
+
281
+ State 13:
282
+ 85/l2: expression → expression "+" expression •
283
+ {$end, "^", "+", "-", "*", "/", ")"}
284
+ 86/r4: expression expression "^" expression
285
+ {}
286
+ 87/l2: expression → expression • "+" expression
287
+ {}
288
+ 88/l2: expression → expression • "-" expression
289
+ {}
290
+ 89/l3: expression → expression • "*" expression
291
+ {}
292
+ 90/l3: expression → expression • "/" expression
293
+ {}
294
+ transitions:
295
+ "^": State 5
296
+ "*": State 8
297
+ "/": State 9
298
+ reductions:
299
+ "+": Rule 3
300
+ "-": Rule 3
301
+ $end: Rule 3
302
+ ")": Rule 3
303
+
304
+ State 14:
305
+ 91/l2: expression → expression "-" expression •
306
+ {$end, "^", "+", "-", "*", "/", ")"}
307
+ 92/r4: expression expression "^" expression
308
+ {}
309
+ 93/l2: expression → expression • "+" expression
310
+ {}
311
+ 94/l2: expression → expression • "-" expression
312
+ {}
313
+ 95/l3: expression → expression • "*" expression
314
+ {}
315
+ 96/l3: expression → expression • "/" expression
316
+ {}
317
+ transitions:
318
+ "^": State 5
319
+ "*": State 8
320
+ "/": State 9
321
+ reductions:
322
+ "+": Rule 4
323
+ "-": Rule 4
324
+ $end: Rule 4
325
+ ")": Rule 4
326
+
327
+ State 15:
328
+ 97/l3: expression → expression "*" expression •
329
+ {$end, "^", "+", "-", "*", "/", ")"}
330
+ 98/r4: expression expression "^" expression
331
+ {}
332
+ 99/l2: expression → expression • "+" expression
333
+ {}
334
+ 100/l2: expression → expression • "-" expression
335
+ {}
336
+ 101/l3: expression → expression • "*" expression
337
+ {}
338
+ 102/l3: expression → expression • "/" expression
339
+ {}
340
+ transitions:
341
+ "^": State 5
342
+ reductions:
343
+ "+": Rule 5
344
+ "-": Rule 5
345
+ "*": Rule 5
346
+ "/": Rule 5
347
+ $end: Rule 5
348
+ ")": Rule 5
349
+
350
+ State 16:
351
+ 103/l3: expression → expression "/" expression •
352
+ {$end, "^", "+", "-", "*", "/", ")"}
353
+ 104/r4: expression expression "^" expression
354
+ {}
355
+ 105/l2: expression → expression • "+" expression
356
+ {}
357
+ 106/l2: expression → expression • "-" expression
358
+ {}
359
+ 107/l3: expression → expression • "*" expression
360
+ {}
361
+ 108/l3: expression → expression • "/" expression
362
+ {}
363
+ transitions:
364
+ "^": State 5
365
+ reductions:
366
+ "+": Rule 6
367
+ "-": Rule 6
368
+ "*": Rule 6
369
+ "/": Rule 6
370
+ $end: Rule 6
371
+ ")": Rule 6
372
+
373
+ State 17:
374
+ 109/n1: expression → "(" expression ")" •
375
+ {$end, "^", "+", "-", "*", "/", ")"}
376
+ reductions:
377
+ $default: Rule 7
378
+
379
+ State 18:
380
+ 110/n1: expression → "(" $error ")" •
381
+ {$end, "^", "+", "-", "*", "/", ")"}
382
+ reductions:
383
+ $default: Rule 8
384
+