]>
Commit | Line | Data |
---|---|---|
817e9f41 | 1 | # Exercising Bison on actual grammars. -*- Autotest -*- |
2740f169 | 2 | |
7d6bad19 | 3 | # Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2013 Free Software |
575619af | 4 | # Foundation, Inc. |
817e9f41 | 5 | |
f16b0819 | 6 | # This program is free software: you can redistribute it and/or modify |
817e9f41 | 7 | # it under the terms of the GNU General Public License as published by |
f16b0819 PE |
8 | # the Free Software Foundation, either version 3 of the License, or |
9 | # (at your option) any later version. | |
10 | # | |
817e9f41 AD |
11 | # This program is distributed in the hope that it will be useful, |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
f16b0819 | 15 | # |
817e9f41 | 16 | # You should have received a copy of the GNU General Public License |
f16b0819 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
817e9f41 AD |
18 | |
19 | AT_BANNER([[Existing Grammars.]]) | |
817e9f41 | 20 | |
db34f798 JD |
21 | # AT_TEST_EXISTING_GRAMMAR(DESCRIPTION, |
22 | # DECLS, GRAMMAR, INPUT, | |
23 | # BISON-STDERR, LAST-STATE, LALR1-DIFF, | |
24 | # [OTHER-CHECKS], | |
25 | # [PARSER-EXIT-VALUE], | |
26 | # [PARSER-STDOUT], [PARSER-STDERR]) | |
27 | # -------------------------------------------------------------- | |
28 | m4_define([AT_TEST_EXISTING_GRAMMAR], [_AT_TEST_EXISTING_GRAMMAR([$][1], $@)]) | |
29 | ||
30 | m4_define([_AT_TEST_EXISTING_GRAMMAR], | |
31 | [ | |
32 | dnl See how the parser tables have changed. As the .output format evolves, the | |
33 | dnl diff comments with line numbers might be a pain to maintain. When that | |
34 | dnl time comes, just use sed to drop the line numbers. For now, as LR(1) | |
35 | dnl support is rapidly evolving, let's keep that information to be careful. | |
36 | dnl However, we don't do diffs for canonical LR(1) because the diff is huge. | |
37 | m4_pushdef([AT_LALR1_DIFF_CHECK], | |
a1a77e1f AD |
38 | [dnl We need diff -u, which is not portable. |
39 | AT_CHECK([diff -u /dev/null /dev/null || exit 77], [0], [ignore]) | |
40 | ||
41 | AT_CHECK([[sed 's/^%define lr.type .*$//' input.y > input-lalr.y]]) | |
db34f798 JD |
42 | AT_BISON_CHECK([[--report=all input-lalr.y]], [[0]], [ignore], [ignore]) |
43 | AT_CHECK([[diff -u input-lalr.output input.output \ | |
44 | | sed -n '/^@@/,$p' | sed 's/^ $//']], | |
45 | [[0]], [$1])]) | |
46 | ||
47 | AT_TEST_TABLES_AND_PARSE([$2[: LALR(1)]], [[LALR]], [[last-state]], | |
cf499cff | 48 | [[%define lr.type lalr |
db34f798 JD |
49 | ]$3], |
50 | [$4], [$5], [$6], [$7], | |
c4be5517 | 51 | [AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12]) |
db34f798 | 52 | AT_TEST_TABLES_AND_PARSE([$2[: IELR(1)]], [[IELR]], [[last-state]], |
cf499cff | 53 | [[%define lr.type ielr |
db34f798 JD |
54 | ]$3], |
55 | [$4], [$5], [$6], [$7], | |
c4be5517 | 56 | [AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12]) |
db34f798 JD |
57 | AT_TEST_TABLES_AND_PARSE([$2[: Canonical LR(1)]], [[canonical LR]], |
58 | [[last-state,no-xml]], | |
cf499cff | 59 | [[%define lr.type canonical-lr |
db34f798 JD |
60 | ]$3], |
61 | [$4], [$5], [$6], [$7], | |
c4be5517 | 62 | [$9], [$10], [$11], [$12]) |
db34f798 JD |
63 | |
64 | m4_popdef([AT_LALR1_DIFF_CHECK]) | |
65 | ]) | |
66 | ||
67 | ||
68 | ||
69 | ## ----------------------- ## | |
70 | ## GNU AWK 3.1.0 Grammar. ## | |
71 | ## ----------------------- ## | |
817e9f41 AD |
72 | |
73 | # We have been careful to strip all the actions excepts the | |
db34f798 | 74 | # mid-rule actions. |
817e9f41 | 75 | # |
db34f798 JD |
76 | # There are 65 SR conflicts. Bison was once wrong, due to an incorrect |
77 | # computation of nullable. It reported 485 SR conflicts! | |
817e9f41 | 78 | |
db34f798 JD |
79 | AT_TEST_EXISTING_GRAMMAR([[GNU AWK 3.1.0 Grammar]], |
80 | [[%error-verbose | |
817e9f41 AD |
81 | |
82 | %token FUNC_CALL NAME REGEXP | |
83 | %token ERROR | |
84 | %token YNUMBER YSTRING | |
85 | %token RELOP APPEND_OP | |
86 | %token ASSIGNOP MATCHOP NEWLINE CONCAT_OP | |
87 | %token LEX_BEGIN LEX_END LEX_IF LEX_ELSE LEX_RETURN LEX_DELETE | |
88 | %token LEX_WHILE LEX_DO LEX_FOR LEX_BREAK LEX_CONTINUE | |
89 | %token LEX_PRINT LEX_PRINTF LEX_NEXT LEX_EXIT LEX_FUNCTION | |
90 | %token LEX_GETLINE LEX_NEXTFILE | |
91 | %token LEX_IN | |
92 | %token LEX_AND LEX_OR INCREMENT DECREMENT | |
93 | %token LEX_BUILTIN LEX_LENGTH | |
94 | ||
95 | /* Lowest to highest */ | |
96 | %right ASSIGNOP | |
97 | %right '?' ':' | |
98 | %left LEX_OR | |
99 | %left LEX_AND | |
100 | %left LEX_GETLINE | |
101 | %nonassoc LEX_IN | |
102 | %left FUNC_CALL LEX_BUILTIN LEX_LENGTH | |
103 | %nonassoc ',' | |
104 | %nonassoc MATCHOP | |
105 | %nonassoc RELOP '<' '>' '|' APPEND_OP TWOWAYIO | |
106 | %left CONCAT_OP | |
107 | %left YSTRING YNUMBER | |
108 | %left '+' '-' | |
109 | %left '*' '/' '%' | |
110 | %right '!' UNARY | |
111 | %right '^' | |
112 | %left INCREMENT DECREMENT | |
113 | %left '$' | |
114 | %left '(' ')' | |
db34f798 JD |
115 | ]], |
116 | [[ | |
817e9f41 | 117 | start |
e9690142 JD |
118 | : opt_nls program opt_nls |
119 | ; | |
817e9f41 AD |
120 | |
121 | program | |
e9690142 JD |
122 | : rule |
123 | | program rule | |
124 | | error | |
125 | | program error | |
126 | | /* empty */ | |
127 | ; | |
817e9f41 AD |
128 | |
129 | rule | |
e9690142 JD |
130 | : LEX_BEGIN {} action |
131 | | LEX_END {} action | |
132 | | LEX_BEGIN statement_term | |
133 | | LEX_END statement_term | |
134 | | pattern action | |
135 | | action | |
136 | | pattern statement_term | |
137 | | function_prologue function_body | |
138 | ; | |
817e9f41 AD |
139 | |
140 | func_name | |
e9690142 JD |
141 | : NAME |
142 | | FUNC_CALL | |
143 | | lex_builtin | |
144 | ; | |
817e9f41 AD |
145 | |
146 | lex_builtin | |
e9690142 JD |
147 | : LEX_BUILTIN |
148 | | LEX_LENGTH | |
149 | ; | |
817e9f41 AD |
150 | |
151 | function_prologue | |
e9690142 JD |
152 | : LEX_FUNCTION {} func_name '(' opt_param_list r_paren opt_nls |
153 | ; | |
817e9f41 AD |
154 | |
155 | function_body | |
e9690142 JD |
156 | : l_brace statements r_brace opt_semi opt_nls |
157 | | l_brace r_brace opt_semi opt_nls | |
158 | ; | |
817e9f41 | 159 | |
817e9f41 | 160 | pattern |
e9690142 JD |
161 | : exp |
162 | | exp ',' exp | |
163 | ; | |
817e9f41 AD |
164 | |
165 | regexp | |
e9690142 JD |
166 | /* |
167 | * In this rule, want_regexp tells yylex that the next thing | |
168 | * is a regexp so it should read up to the closing slash. | |
169 | */ | |
170 | : '/' {} REGEXP '/' | |
171 | ; | |
817e9f41 AD |
172 | |
173 | action | |
e9690142 JD |
174 | : l_brace statements r_brace opt_semi opt_nls |
175 | | l_brace r_brace opt_semi opt_nls | |
176 | ; | |
817e9f41 AD |
177 | |
178 | statements | |
e9690142 JD |
179 | : statement |
180 | | statements statement | |
181 | | error | |
182 | | statements error | |
183 | ; | |
817e9f41 AD |
184 | |
185 | statement_term | |
e9690142 JD |
186 | : nls |
187 | | semi opt_nls | |
188 | ; | |
817e9f41 AD |
189 | |
190 | statement | |
e9690142 JD |
191 | : semi opt_nls |
192 | | l_brace r_brace | |
193 | | l_brace statements r_brace | |
194 | | if_statement | |
195 | | LEX_WHILE '(' exp r_paren opt_nls statement | |
196 | | LEX_DO opt_nls statement LEX_WHILE '(' exp r_paren opt_nls | |
197 | | LEX_FOR '(' NAME LEX_IN NAME r_paren opt_nls statement | |
198 | | LEX_FOR '(' opt_exp semi opt_nls exp semi opt_nls opt_exp r_paren opt_nls statement | |
199 | | LEX_FOR '(' opt_exp semi opt_nls semi opt_nls opt_exp r_paren opt_nls statement | |
200 | | LEX_BREAK statement_term | |
201 | | LEX_CONTINUE statement_term | |
202 | | print '(' expression_list r_paren output_redir statement_term | |
203 | | print opt_rexpression_list output_redir statement_term | |
204 | | LEX_NEXT statement_term | |
205 | | LEX_NEXTFILE statement_term | |
206 | | LEX_EXIT opt_exp statement_term | |
207 | | LEX_RETURN {} opt_exp statement_term | |
208 | | LEX_DELETE NAME '[' expression_list ']' statement_term | |
209 | | LEX_DELETE NAME statement_term | |
210 | | exp statement_term | |
211 | ; | |
817e9f41 AD |
212 | |
213 | ||
e9690142 JD |
214 | : LEX_PRINT |
215 | | LEX_PRINTF | |
216 | ; | |
817e9f41 AD |
217 | |
218 | if_statement | |
e9690142 JD |
219 | : LEX_IF '(' exp r_paren opt_nls statement |
220 | | LEX_IF '(' exp r_paren opt_nls statement | |
221 | LEX_ELSE opt_nls statement | |
222 | ; | |
817e9f41 AD |
223 | |
224 | nls | |
e9690142 JD |
225 | : NEWLINE |
226 | | nls NEWLINE | |
227 | ; | |
817e9f41 AD |
228 | |
229 | opt_nls | |
e9690142 JD |
230 | : /* empty */ |
231 | | nls | |
232 | ; | |
817e9f41 AD |
233 | |
234 | input_redir | |
e9690142 JD |
235 | : /* empty */ |
236 | | '<' simp_exp | |
237 | ; | |
817e9f41 AD |
238 | |
239 | output_redir | |
e9690142 JD |
240 | : /* empty */ |
241 | | '>' exp | |
242 | | APPEND_OP exp | |
243 | | '|' exp | |
244 | | TWOWAYIO exp | |
245 | ; | |
817e9f41 AD |
246 | |
247 | opt_param_list | |
e9690142 JD |
248 | : /* empty */ |
249 | | param_list | |
250 | ; | |
817e9f41 AD |
251 | |
252 | param_list | |
e9690142 JD |
253 | : NAME |
254 | | param_list comma NAME | |
255 | | error | |
256 | | param_list error | |
257 | | param_list comma error | |
258 | ; | |
817e9f41 AD |
259 | |
260 | /* optional expression, as in for loop */ | |
261 | opt_exp | |
e9690142 JD |
262 | : /* empty */ |
263 | | exp | |
264 | ; | |
817e9f41 AD |
265 | |
266 | opt_rexpression_list | |
e9690142 JD |
267 | : /* empty */ |
268 | | rexpression_list | |
269 | ; | |
817e9f41 AD |
270 | |
271 | rexpression_list | |
e9690142 JD |
272 | : rexp |
273 | | rexpression_list comma rexp | |
274 | | error | |
275 | | rexpression_list error | |
276 | | rexpression_list error rexp | |
277 | | rexpression_list comma error | |
278 | ; | |
817e9f41 AD |
279 | |
280 | opt_expression_list | |
e9690142 JD |
281 | : /* empty */ |
282 | | expression_list | |
283 | ; | |
817e9f41 AD |
284 | |
285 | expression_list | |
e9690142 JD |
286 | : exp |
287 | | expression_list comma exp | |
288 | | error | |
289 | | expression_list error | |
290 | | expression_list error exp | |
291 | | expression_list comma error | |
292 | ; | |
817e9f41 AD |
293 | |
294 | /* Expressions, not including the comma operator. */ | |
e9690142 JD |
295 | exp : variable ASSIGNOP {} exp |
296 | | '(' expression_list r_paren LEX_IN NAME | |
297 | | exp '|' LEX_GETLINE opt_variable | |
298 | | exp TWOWAYIO LEX_GETLINE opt_variable | |
299 | | LEX_GETLINE opt_variable input_redir | |
300 | | exp LEX_AND exp | |
301 | | exp LEX_OR exp | |
302 | | exp MATCHOP exp | |
303 | | regexp | |
304 | | '!' regexp %prec UNARY | |
305 | | exp LEX_IN NAME | |
306 | | exp RELOP exp | |
307 | | exp '<' exp | |
308 | | exp '>' exp | |
309 | | exp '?' exp ':' exp | |
310 | | simp_exp | |
311 | | exp simp_exp %prec CONCAT_OP | |
312 | ; | |
817e9f41 AD |
313 | |
314 | rexp | |
e9690142 JD |
315 | : variable ASSIGNOP {} rexp |
316 | | rexp LEX_AND rexp | |
317 | | rexp LEX_OR rexp | |
318 | | LEX_GETLINE opt_variable input_redir | |
319 | | regexp | |
320 | | '!' regexp %prec UNARY | |
321 | | rexp MATCHOP rexp | |
322 | | rexp LEX_IN NAME | |
323 | | rexp RELOP rexp | |
324 | | rexp '?' rexp ':' rexp | |
325 | | simp_exp | |
326 | | rexp simp_exp %prec CONCAT_OP | |
327 | ; | |
817e9f41 AD |
328 | |
329 | simp_exp | |
e9690142 JD |
330 | : non_post_simp_exp |
331 | /* Binary operators in order of decreasing precedence. */ | |
332 | | simp_exp '^' simp_exp | |
333 | | simp_exp '*' simp_exp | |
334 | | simp_exp '/' simp_exp | |
335 | | simp_exp '%' simp_exp | |
336 | | simp_exp '+' simp_exp | |
337 | | simp_exp '-' simp_exp | |
338 | | variable INCREMENT | |
339 | | variable DECREMENT | |
340 | ; | |
817e9f41 AD |
341 | |
342 | non_post_simp_exp | |
e9690142 JD |
343 | : '!' simp_exp %prec UNARY |
344 | | '(' exp r_paren | |
345 | | LEX_BUILTIN | |
346 | '(' opt_expression_list r_paren | |
347 | | LEX_LENGTH '(' opt_expression_list r_paren | |
348 | | LEX_LENGTH | |
349 | | FUNC_CALL '(' opt_expression_list r_paren | |
350 | | variable | |
351 | | INCREMENT variable | |
352 | | DECREMENT variable | |
353 | | YNUMBER | |
354 | | YSTRING | |
355 | | '-' simp_exp %prec UNARY | |
356 | | '+' simp_exp %prec UNARY | |
357 | ; | |
817e9f41 AD |
358 | |
359 | opt_variable | |
e9690142 JD |
360 | : /* empty */ |
361 | | variable | |
362 | ; | |
817e9f41 AD |
363 | |
364 | variable | |
e9690142 JD |
365 | : NAME |
366 | | NAME '[' expression_list ']' | |
367 | | '$' non_post_simp_exp | |
368 | ; | |
817e9f41 AD |
369 | |
370 | l_brace | |
e9690142 JD |
371 | : '{' opt_nls |
372 | ; | |
817e9f41 AD |
373 | |
374 | r_brace | |
e9690142 JD |
375 | : '}' opt_nls |
376 | ; | |
817e9f41 AD |
377 | |
378 | r_paren | |
e9690142 JD |
379 | : ')' |
380 | ; | |
817e9f41 AD |
381 | |
382 | opt_semi | |
e9690142 JD |
383 | : /* empty */ |
384 | | semi | |
385 | ; | |
817e9f41 AD |
386 | |
387 | semi | |
e9690142 JD |
388 | : ';' |
389 | ; | |
817e9f41 | 390 | |
e9690142 JD |
391 | comma : ',' opt_nls |
392 | ; | |
db34f798 JD |
393 | ]], |
394 | ||
395 | dnl INPUT | |
396 | dnl | |
397 | dnl For example, in AWK: | |
398 | dnl | |
399 | dnl getline $!4*0; | |
400 | dnl | |
401 | dnl The grammar below (from GNU AWK 3.1.0) using canonical LR(1) or IELR(1) | |
402 | dnl parses it as: | |
403 | dnl | |
404 | dnl getline $!(4*0); | |
405 | dnl | |
4c9b8f13 | 406 | dnl That is, they shift '*' immediately and make it part of the getline |
db34f798 JD |
407 | dnl argument. |
408 | dnl | |
409 | dnl The grammar below using LALR(1) parses it as a syntax error. So does | |
410 | dnl GNU AWK 3.0.6, 3.1.0, and 3.1.1. They reduce the full getline expression | |
4c9b8f13 | 411 | dnl before shifting '*' even though '*' is not a valid lookahead. |
db34f798 JD |
412 | dnl |
413 | dnl GNU AWK 3.1.2, 3.1.3, 3.1.4, and 3.1.5 parse it as: | |
414 | dnl | |
415 | dnl (getline $!4)*0; | |
416 | dnl | |
417 | dnl That is, like the other versions of GNU AWK, they reduce the full getline | |
4c9b8f13 AD |
418 | dnl expression before shifting '*'. However, because of a different LHS on the |
419 | dnl getline rule, '*' actually is a valid lookahead. Solaris /usr/xpg4/bin/awk | |
db34f798 JD |
420 | dnl and the Open Group awk specification seem to agree: |
421 | dnl | |
422 | dnl http://www.opengroup.org/pubs/online/7908799/xcu/awk.html | |
423 | dnl | |
424 | dnl /bin/nawk and /bin/awk on Solaris 10 report it as a syntax error, but they | |
4c9b8f13 | 425 | dnl don't like even 'print $!4;'. |
db34f798 JD |
426 | [[LEX_GETLINE, '$', '!', YNUMBER, '*', YNUMBER, ';']], |
427 | ||
428 | dnl BISON-STDERR | |
f68a49ed AD |
429 | [[input.y:66.10: warning: empty rule without %empty [-Wempty-rule] |
430 | input.y:169.8: warning: empty rule without %empty [-Wempty-rule] | |
431 | input.y:174.12: warning: empty rule without %empty [-Wempty-rule] | |
432 | input.y:179.13: warning: empty rule without %empty [-Wempty-rule] | |
433 | input.y:187.15: warning: empty rule without %empty [-Wempty-rule] | |
434 | input.y:201.8: warning: empty rule without %empty [-Wempty-rule] | |
435 | input.y:206.21: warning: empty rule without %empty [-Wempty-rule] | |
436 | input.y:220.20: warning: empty rule without %empty [-Wempty-rule] | |
437 | input.y:299.13: warning: empty rule without %empty [-Wempty-rule] | |
438 | input.y:322.9: warning: empty rule without %empty [-Wempty-rule] | |
8782fe26 AD |
439 | ]AT_COND_CASE([[canonical LR]], |
440 | [[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]]], | |
441 | [[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]]])[ | |
d8ce7031 AD |
442 | input.y:39.1-5: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence] |
443 | input.y:44.1-5: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence] | |
444 | input.y:44.1-5: warning: useless associativity for YSTRING, use %precedence [-Wprecedence] | |
445 | input.y:42.1-9: warning: useless precedence and associativity for APPEND_OP [-Wprecedence] | |
446 | input.y:33.1-6: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence] | |
447 | input.y:43.1-5: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence] | |
448 | input.y:37.1-5: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence] | |
449 | input.y:38.1-9: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence] | |
450 | input.y:49.1-5: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence] | |
451 | input.y:49.1-5: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence] | |
452 | input.y:39.1-5: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence] | |
453 | input.y:39.1-5: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence] | |
454 | input.y:40.1-9: warning: useless precedence and associativity for ',' [-Wprecedence] | |
455 | input.y:47.1-6: warning: useless associativity for '!', use %precedence [-Wprecedence] | |
456 | input.y:47.1-6: warning: useless associativity for UNARY, use %precedence [-Wprecedence] | |
457 | input.y:50.1-5: warning: useless associativity for '$', use %precedence [-Wprecedence] | |
458 | input.y:51.1-5: warning: useless associativity for '(', use %precedence [-Wprecedence] | |
459 | input.y:51.1-5: warning: useless precedence and associativity for ')' [-Wprecedence] | |
db34f798 JD |
460 | ]], |
461 | ||
462 | dnl LAST-STATE | |
463 | [AT_COND_CASE([[LALR]], [[319]], [[canonical LR]], [[2358]], [[328]])], | |
464 | ||
465 | dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge. | |
466 | dnl Isocore map from LALR(1) state number to new state number plus descriptions | |
467 | dnl of any change in the actions resulting in a change in accepted language: | |
468 | dnl - 24 -> 320 | |
469 | dnl - 16 -> 321 | |
470 | dnl - 17 -> 322 | |
471 | dnl - 20 -> 323 | |
472 | dnl - 21 -> 324 | |
473 | dnl - 54 -> 325 | |
474 | dnl - 56 -> 326: reduce -> shift on '*', '/', and '%' | |
475 | dnl - 58 -> 327: reduce -> shift on '*', '/', and '%' | |
476 | dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' | |
477 | [AT_COND_CASE([[LALR]], [], | |
478 | [[@@ -712,7 +712,7 @@ | |
479 | 156 | . '$' non_post_simp_exp | |
480 | ||
481 | NAME shift, and go to state 9 | |
482 | - '$' shift, and go to state 24 | |
483 | + '$' shift, and go to state 320 | |
484 | ||
485 | NAME [reduce using rule 152 (opt_variable)] | |
486 | '$' [reduce using rule 152 (opt_variable)] | |
487 | @@ -5379,7 +5379,7 @@ | |
488 | 156 | . '$' non_post_simp_exp | |
489 | ||
490 | NAME shift, and go to state 9 | |
491 | - '$' shift, and go to state 24 | |
492 | + '$' shift, and go to state 320 | |
493 | ||
494 | NAME [reduce using rule 152 (opt_variable)] | |
495 | '$' [reduce using rule 152 (opt_variable)] | |
496 | @@ -5399,7 +5399,7 @@ | |
497 | 156 | . '$' non_post_simp_exp | |
498 | ||
499 | NAME shift, and go to state 9 | |
500 | - '$' shift, and go to state 24 | |
501 | + '$' shift, and go to state 320 | |
502 | ||
503 | NAME [reduce using rule 152 (opt_variable)] | |
504 | '$' [reduce using rule 152 (opt_variable)] | |
505 | @@ -6214,7 +6214,7 @@ | |
506 | 156 | . '$' non_post_simp_exp | |
507 | ||
508 | NAME shift, and go to state 9 | |
509 | - '$' shift, and go to state 24 | |
510 | + '$' shift, and go to state 320 | |
511 | ||
512 | NAME [reduce using rule 152 (opt_variable)] | |
513 | '$' [reduce using rule 152 (opt_variable)] | |
514 | @@ -11099,3 +11099,274 @@ | |
515 | 45 statement: LEX_FOR '(' opt_exp semi opt_nls exp semi opt_nls opt_exp r_paren opt_nls statement . | |
516 | ||
517 | $default reduce using rule 45 (statement) | |
518 | + | |
519 | + | |
d42fe46e | 520 | +State 320 |
db34f798 JD |
521 | + |
522 | + 139 non_post_simp_exp: . '!' simp_exp | |
523 | + 140 | . '(' exp r_paren | |
524 | + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren | |
525 | + 142 | . LEX_LENGTH '(' opt_expression_list r_paren | |
526 | + 143 | . LEX_LENGTH | |
527 | + 144 | . FUNC_CALL '(' opt_expression_list r_paren | |
528 | + 145 | . variable | |
529 | + 146 | . INCREMENT variable | |
530 | + 147 | . DECREMENT variable | |
531 | + 148 | . YNUMBER | |
532 | + 149 | . YSTRING | |
533 | + 150 | . '-' simp_exp | |
534 | + 151 | . '+' simp_exp | |
535 | + 154 variable: . NAME | |
536 | + 155 | . NAME '[' expression_list ']' | |
537 | + 156 | . '$' non_post_simp_exp | |
538 | + 156 | '$' . non_post_simp_exp | |
539 | + | |
540 | + FUNC_CALL shift, and go to state 8 | |
541 | + NAME shift, and go to state 9 | |
542 | + YNUMBER shift, and go to state 10 | |
543 | + YSTRING shift, and go to state 11 | |
544 | + INCREMENT shift, and go to state 321 | |
545 | + DECREMENT shift, and go to state 322 | |
546 | + LEX_BUILTIN shift, and go to state 18 | |
547 | + LEX_LENGTH shift, and go to state 19 | |
548 | + '+' shift, and go to state 323 | |
549 | + '-' shift, and go to state 324 | |
550 | + '!' shift, and go to state 325 | |
551 | + '$' shift, and go to state 320 | |
552 | + '(' shift, and go to state 55 | |
553 | + | |
554 | + non_post_simp_exp go to state 62 | |
555 | + variable go to state 63 | |
556 | + | |
557 | + | |
d42fe46e | 558 | +State 321 |
db34f798 JD |
559 | + |
560 | + 146 non_post_simp_exp: INCREMENT . variable | |
561 | + 154 variable: . NAME | |
562 | + 155 | . NAME '[' expression_list ']' | |
563 | + 156 | . '$' non_post_simp_exp | |
564 | + | |
565 | + NAME shift, and go to state 9 | |
566 | + '$' shift, and go to state 320 | |
567 | + | |
568 | + variable go to state 50 | |
569 | + | |
570 | + | |
d42fe46e | 571 | +State 322 |
db34f798 JD |
572 | + |
573 | + 147 non_post_simp_exp: DECREMENT . variable | |
574 | + 154 variable: . NAME | |
575 | + 155 | . NAME '[' expression_list ']' | |
576 | + 156 | . '$' non_post_simp_exp | |
577 | + | |
578 | + NAME shift, and go to state 9 | |
579 | + '$' shift, and go to state 320 | |
580 | + | |
581 | + variable go to state 51 | |
582 | + | |
583 | + | |
d42fe46e | 584 | +State 323 |
db34f798 JD |
585 | + |
586 | + 130 simp_exp: . non_post_simp_exp | |
587 | + 131 | . simp_exp '^' simp_exp | |
588 | + 132 | . simp_exp '*' simp_exp | |
589 | + 133 | . simp_exp '/' simp_exp | |
590 | + 134 | . simp_exp '%' simp_exp | |
591 | + 135 | . simp_exp '+' simp_exp | |
592 | + 136 | . simp_exp '-' simp_exp | |
593 | + 137 | . variable INCREMENT | |
594 | + 138 | . variable DECREMENT | |
595 | + 139 non_post_simp_exp: . '!' simp_exp | |
596 | + 140 | . '(' exp r_paren | |
597 | + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren | |
598 | + 142 | . LEX_LENGTH '(' opt_expression_list r_paren | |
599 | + 143 | . LEX_LENGTH | |
600 | + 144 | . FUNC_CALL '(' opt_expression_list r_paren | |
601 | + 145 | . variable | |
602 | + 146 | . INCREMENT variable | |
603 | + 147 | . DECREMENT variable | |
604 | + 148 | . YNUMBER | |
605 | + 149 | . YSTRING | |
606 | + 150 | . '-' simp_exp | |
607 | + 151 | . '+' simp_exp | |
608 | + 151 | '+' . simp_exp | |
609 | + 154 variable: . NAME | |
610 | + 155 | . NAME '[' expression_list ']' | |
611 | + 156 | . '$' non_post_simp_exp | |
612 | + | |
613 | + FUNC_CALL shift, and go to state 8 | |
614 | + NAME shift, and go to state 9 | |
615 | + YNUMBER shift, and go to state 10 | |
616 | + YSTRING shift, and go to state 11 | |
617 | + INCREMENT shift, and go to state 16 | |
618 | + DECREMENT shift, and go to state 17 | |
619 | + LEX_BUILTIN shift, and go to state 18 | |
620 | + LEX_LENGTH shift, and go to state 19 | |
621 | + '+' shift, and go to state 20 | |
622 | + '-' shift, and go to state 21 | |
623 | + '!' shift, and go to state 54 | |
624 | + '$' shift, and go to state 24 | |
625 | + '(' shift, and go to state 55 | |
626 | + | |
627 | + simp_exp go to state 326 | |
628 | + non_post_simp_exp go to state 35 | |
629 | + variable go to state 57 | |
630 | + | |
631 | + | |
d42fe46e | 632 | +State 324 |
db34f798 JD |
633 | + |
634 | + 130 simp_exp: . non_post_simp_exp | |
635 | + 131 | . simp_exp '^' simp_exp | |
636 | + 132 | . simp_exp '*' simp_exp | |
637 | + 133 | . simp_exp '/' simp_exp | |
638 | + 134 | . simp_exp '%' simp_exp | |
639 | + 135 | . simp_exp '+' simp_exp | |
640 | + 136 | . simp_exp '-' simp_exp | |
641 | + 137 | . variable INCREMENT | |
642 | + 138 | . variable DECREMENT | |
643 | + 139 non_post_simp_exp: . '!' simp_exp | |
644 | + 140 | . '(' exp r_paren | |
645 | + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren | |
646 | + 142 | . LEX_LENGTH '(' opt_expression_list r_paren | |
647 | + 143 | . LEX_LENGTH | |
648 | + 144 | . FUNC_CALL '(' opt_expression_list r_paren | |
649 | + 145 | . variable | |
650 | + 146 | . INCREMENT variable | |
651 | + 147 | . DECREMENT variable | |
652 | + 148 | . YNUMBER | |
653 | + 149 | . YSTRING | |
654 | + 150 | . '-' simp_exp | |
655 | + 150 | '-' . simp_exp | |
656 | + 151 | . '+' simp_exp | |
657 | + 154 variable: . NAME | |
658 | + 155 | . NAME '[' expression_list ']' | |
659 | + 156 | . '$' non_post_simp_exp | |
660 | + | |
661 | + FUNC_CALL shift, and go to state 8 | |
662 | + NAME shift, and go to state 9 | |
663 | + YNUMBER shift, and go to state 10 | |
664 | + YSTRING shift, and go to state 11 | |
665 | + INCREMENT shift, and go to state 16 | |
666 | + DECREMENT shift, and go to state 17 | |
667 | + LEX_BUILTIN shift, and go to state 18 | |
668 | + LEX_LENGTH shift, and go to state 19 | |
669 | + '+' shift, and go to state 20 | |
670 | + '-' shift, and go to state 21 | |
671 | + '!' shift, and go to state 54 | |
672 | + '$' shift, and go to state 24 | |
673 | + '(' shift, and go to state 55 | |
674 | + | |
675 | + simp_exp go to state 327 | |
676 | + non_post_simp_exp go to state 35 | |
677 | + variable go to state 57 | |
678 | + | |
679 | + | |
d42fe46e | 680 | +State 325 |
db34f798 JD |
681 | + |
682 | + 130 simp_exp: . non_post_simp_exp | |
683 | + 131 | . simp_exp '^' simp_exp | |
684 | + 132 | . simp_exp '*' simp_exp | |
685 | + 133 | . simp_exp '/' simp_exp | |
686 | + 134 | . simp_exp '%' simp_exp | |
687 | + 135 | . simp_exp '+' simp_exp | |
688 | + 136 | . simp_exp '-' simp_exp | |
689 | + 137 | . variable INCREMENT | |
690 | + 138 | . variable DECREMENT | |
691 | + 139 non_post_simp_exp: . '!' simp_exp | |
692 | + 139 | '!' . simp_exp | |
693 | + 140 | . '(' exp r_paren | |
694 | + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren | |
695 | + 142 | . LEX_LENGTH '(' opt_expression_list r_paren | |
696 | + 143 | . LEX_LENGTH | |
697 | + 144 | . FUNC_CALL '(' opt_expression_list r_paren | |
698 | + 145 | . variable | |
699 | + 146 | . INCREMENT variable | |
700 | + 147 | . DECREMENT variable | |
701 | + 148 | . YNUMBER | |
702 | + 149 | . YSTRING | |
703 | + 150 | . '-' simp_exp | |
704 | + 151 | . '+' simp_exp | |
705 | + 154 variable: . NAME | |
706 | + 155 | . NAME '[' expression_list ']' | |
707 | + 156 | . '$' non_post_simp_exp | |
708 | + | |
709 | + FUNC_CALL shift, and go to state 8 | |
710 | + NAME shift, and go to state 9 | |
711 | + YNUMBER shift, and go to state 10 | |
712 | + YSTRING shift, and go to state 11 | |
713 | + INCREMENT shift, and go to state 16 | |
714 | + DECREMENT shift, and go to state 17 | |
715 | + LEX_BUILTIN shift, and go to state 18 | |
716 | + LEX_LENGTH shift, and go to state 19 | |
717 | + '+' shift, and go to state 20 | |
718 | + '-' shift, and go to state 21 | |
719 | + '!' shift, and go to state 54 | |
720 | + '$' shift, and go to state 24 | |
721 | + '(' shift, and go to state 55 | |
722 | + | |
723 | + simp_exp go to state 328 | |
724 | + non_post_simp_exp go to state 35 | |
725 | + variable go to state 57 | |
726 | + | |
727 | + | |
d42fe46e | 728 | +State 326 |
db34f798 JD |
729 | + |
730 | + 131 simp_exp: simp_exp . '^' simp_exp | |
731 | + 132 | simp_exp . '*' simp_exp | |
732 | + 133 | simp_exp . '/' simp_exp | |
733 | + 134 | simp_exp . '%' simp_exp | |
734 | + 135 | simp_exp . '+' simp_exp | |
735 | + 136 | simp_exp . '-' simp_exp | |
736 | + 151 non_post_simp_exp: '+' simp_exp . [error, FUNC_CALL, NAME, YNUMBER, YSTRING, RELOP, APPEND_OP, MATCHOP, NEWLINE, LEX_IN, LEX_AND, LEX_OR, INCREMENT, DECREMENT, LEX_BUILTIN, LEX_LENGTH, '?', ':', ',', '<', '>', '|', TWOWAYIO, '+', '-', '!', '$', '(', ')', '@:>@', '{', ';'] | |
737 | + | |
738 | + '*' shift, and go to state 89 | |
739 | + '/' shift, and go to state 90 | |
740 | + '%' shift, and go to state 91 | |
741 | + '^' shift, and go to state 92 | |
742 | + | |
743 | + $default reduce using rule 151 (non_post_simp_exp) | |
744 | + | |
745 | + Conflict between rule 151 and token '+' resolved as reduce ('+' < UNARY). | |
746 | + Conflict between rule 151 and token '-' resolved as reduce ('-' < UNARY). | |
747 | + | |
748 | + | |
d42fe46e | 749 | +State 327 |
db34f798 JD |
750 | + |
751 | + 131 simp_exp: simp_exp . '^' simp_exp | |
752 | + 132 | simp_exp . '*' simp_exp | |
753 | + 133 | simp_exp . '/' simp_exp | |
754 | + 134 | simp_exp . '%' simp_exp | |
755 | + 135 | simp_exp . '+' simp_exp | |
756 | + 136 | simp_exp . '-' simp_exp | |
757 | + 150 non_post_simp_exp: '-' simp_exp . [error, FUNC_CALL, NAME, YNUMBER, YSTRING, RELOP, APPEND_OP, MATCHOP, NEWLINE, LEX_IN, LEX_AND, LEX_OR, INCREMENT, DECREMENT, LEX_BUILTIN, LEX_LENGTH, '?', ':', ',', '<', '>', '|', TWOWAYIO, '+', '-', '!', '$', '(', ')', '@:>@', '{', ';'] | |
758 | + | |
759 | + '*' shift, and go to state 89 | |
760 | + '/' shift, and go to state 90 | |
761 | + '%' shift, and go to state 91 | |
762 | + '^' shift, and go to state 92 | |
763 | + | |
764 | + $default reduce using rule 150 (non_post_simp_exp) | |
765 | + | |
766 | + Conflict between rule 150 and token '+' resolved as reduce ('+' < UNARY). | |
767 | + Conflict between rule 150 and token '-' resolved as reduce ('-' < UNARY). | |
768 | + | |
769 | + | |
d42fe46e | 770 | +State 328 |
db34f798 JD |
771 | + |
772 | + 131 simp_exp: simp_exp . '^' simp_exp | |
773 | + 132 | simp_exp . '*' simp_exp | |
774 | + 133 | simp_exp . '/' simp_exp | |
775 | + 134 | simp_exp . '%' simp_exp | |
776 | + 135 | simp_exp . '+' simp_exp | |
777 | + 136 | simp_exp . '-' simp_exp | |
778 | + 139 non_post_simp_exp: '!' simp_exp . [error, FUNC_CALL, NAME, YNUMBER, YSTRING, RELOP, APPEND_OP, MATCHOP, NEWLINE, LEX_IN, LEX_AND, LEX_OR, INCREMENT, DECREMENT, LEX_BUILTIN, LEX_LENGTH, '?', ':', ',', '<', '>', '|', TWOWAYIO, '+', '-', '!', '$', '(', ')', '@:>@', '{', ';'] | |
779 | + | |
780 | + '*' shift, and go to state 89 | |
781 | + '/' shift, and go to state 90 | |
782 | + '%' shift, and go to state 91 | |
783 | + '^' shift, and go to state 92 | |
784 | + | |
785 | + $default reduce using rule 139 (non_post_simp_exp) | |
786 | + | |
787 | + Conflict between rule 139 and token '+' resolved as reduce ('+' < UNARY). | |
788 | + Conflict between rule 139 and token '-' resolved as reduce ('-' < UNARY). | |
789 | ]])], | |
790 | ||
791 | dnl OTHER-CHECKS | |
792 | [], | |
793 | ||
794 | dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR | |
795 | dnl In the case of the syntax error, the parser recovers, so it returns 0. | |
796 | [[0]], | |
797 | [], | |
798 | [AT_COND_CASE([[LALR]], | |
799 | [[syntax error, unexpected '*', expecting NEWLINE or '{' or ';' | |
800 | ]])]) | |
817e9f41 | 801 | |
817e9f41 AD |
802 | ## ----------------- ## |
803 | ## GNU Cim Grammar. ## | |
804 | ## ----------------- ## | |
805 | ||
817e9f41 AD |
806 | # GNU Cim, the GNU Simula 87 Compiler. |
807 | ||
808 | # Bison was once wrong, due to an incorrect computation of the RR conflicts. | |
809 | # It reported 80 SR && 99 RR conflicts instead of 78/10!!! | |
810 | ||
db34f798 | 811 | AT_TEST_EXISTING_GRAMMAR([[GNU Cim Grammar]], |
765e1bd4 | 812 | [[ |
817e9f41 | 813 | %token |
e9690142 JD |
814 | HACTIVATE HAFTER /*HAND*/ HARRAY HAT |
815 | HBEFORE HBEGIN HBOOLEAN | |
816 | HCHARACTER HCLASS /*HCOMMENT*/ HCONC | |
817 | HDELAY HDO | |
818 | HELSE HEND HEQ /*HEQV*/ HEXTERNAL | |
819 | HFOR | |
820 | HGE HGO HGOTO HGT | |
821 | HHIDDEN | |
822 | HIF /*HIMP*/ HIN HINNER HINSPECT HINTEGER HIS | |
823 | HLABEL HLE HLONG HLT | |
824 | HNAME HNE HNEW HNONE /*HNOT*/ HNOTEXT | |
825 | /*HOR*/ HOTHERWISE | |
826 | HPRIOR HPROCEDURE HPROTECTED | |
827 | HQUA | |
828 | HREACTIVATE HREAL HREF | |
829 | HSHORT HSTEP HSWITCH | |
830 | HTEXT HTHEN HTHIS HTO | |
831 | HUNTIL | |
832 | HVALUE HVAR HVIRTUAL | |
833 | HWHEN HWHILE | |
834 | ||
835 | HASSIGNVALUE HASSIGNREF | |
836 | /*HDOT*/ HPAREXPSEPARATOR HLABELSEPARATOR HSTATEMENTSEPARATOR | |
837 | HBEGPAR HENDPAR | |
838 | HEQR HNER | |
839 | HADD HSUB HMUL HDIV HINTDIV HEXP | |
840 | HDOTDOTDOT | |
817e9f41 | 841 | |
affac613 AD |
842 | %token HIDENTIFIER |
843 | %token HBOOLEANKONST HINTEGERKONST HCHARACTERKONST | |
844 | %token HREALKONST | |
845 | %token HTEXTKONST | |
817e9f41 | 846 | |
817e9f41 | 847 | |
affac613 | 848 | %right HASSIGN |
817e9f41 AD |
849 | %left HORELSE |
850 | %left HANDTHEN | |
851 | %left HEQV | |
852 | %left HIMP | |
853 | %left HOR | |
854 | %left HAND | |
855 | ||
856 | %left HNOT | |
857 | ||
affac613 | 858 | %left HVALRELOPERATOR HREFRELOPERATOR HOBJRELOPERATOR |
817e9f41 | 859 | |
e9690142 | 860 | %left HCONC |
817e9f41 | 861 | |
affac613 AD |
862 | %left HTERMOPERATOR |
863 | %left UNEAR | |
864 | %left HFACTOROPERATOR | |
817e9f41 AD |
865 | %left HPRIMARYOPERATOR |
866 | ||
867 | %left HQUA | |
868 | ||
869 | %left HDOT | |
870 | ||
871 | %start MAIN_MODULE | |
db34f798 JD |
872 | ]], |
873 | [[ | |
817e9f41 | 874 | /* GRAMATIKK FOR PROGRAM MODULES */ |
affac613 | 875 | MAIN_MODULE : {} |
e9690142 JD |
876 | MODULS |
877 | | error HSTATEMENTSEPARATOR MBEE_DECLSTMS | |
878 | ; | |
879 | EXT_DECLARATION : HEXTERNAL | |
880 | MBEE_TYPE | |
881 | HPROCEDURE | |
882 | {} | |
883 | EXT_LIST | |
884 | | | |
885 | HEXTERNAL | |
886 | HIDENTIFIER | |
887 | HPROCEDURE | |
888 | {} | |
889 | HIDENTIFIER {} | |
890 | EXTERNAL_KIND_ITEM | |
891 | | HEXTERNAL | |
892 | HCLASS | |
893 | {} | |
894 | EXT_LIST | |
895 | ||
896 | ; | |
897 | EXTERNAL_KIND_ITEM: EXT_IDENT | |
898 | HOBJRELOPERATOR | |
899 | {} | |
900 | MBEE_TYPE HPROCEDURE | |
901 | HIDENTIFIER | |
902 | {} | |
903 | HEADING EMPTY_BLOCK | |
904 | {} | |
905 | /* | | |
906 | EXT_IDENT | |
907 | {} | |
908 | MBEE_REST_EXT_LIST | |
909 | ; | |
910 | MBEE_REST_EXT_LIST: /* EMPTY | |
911 | | HPAREXPSEPARATOR EXT_KIND_LIST | |
912 | ; | |
913 | EXT_KIND_LIST : EXT_KIND_ITEM | |
914 | | EXT_KIND_LIST HPAREXPSEPARATOR EXT_KIND_ITEM | |
915 | ; | |
916 | EXT_KIND_ITEM : HIDENTIFIER | |
917 | EXT_IDENT | |
918 | {}*/ | |
919 | ; | |
920 | EMPTY_BLOCK : /*EMPT*/ | |
921 | | HBEGIN HEND | |
922 | ; | |
923 | EXT_LIST : EXT_ITEM | |
924 | | EXT_LIST HPAREXPSEPARATOR EXT_ITEM | |
925 | ; | |
926 | EXT_ITEM : HIDENTIFIER | |
927 | EXT_IDENT | |
928 | ; | |
929 | EXT_IDENT : /* EMPTY */ | |
930 | | HVALRELOPERATOR {} | |
931 | HTEXTKONST | |
932 | ; | |
817e9f41 | 933 | /* GRAMATIKK FOR TYPER */ |
affac613 | 934 | NO_TYPE : /*EMPT*/ |
e9690142 | 935 | ; |
817e9f41 | 936 | MBEE_TYPE : NO_TYPE |
e9690142 JD |
937 | | TYPE |
938 | ; | |
817e9f41 | 939 | TYPE : HREF HBEGPAR |
e9690142 JD |
940 | HIDENTIFIER |
941 | {} | |
942 | HENDPAR | |
943 | | HTEXT | |
944 | | HBOOLEAN | |
945 | | HCHARACTER | |
946 | | HSHORT HINTEGER | |
947 | | HINTEGER | |
948 | | HREAL | |
949 | | HLONG HREAL | |
950 | ; | |
817e9f41 AD |
951 | |
952 | /* GRAMATIKK FOR DEL AV SETNINGER */ | |
953 | MBEE_ELSE_PART : /*EMPT*/ | |
e9690142 JD |
954 | /* | HELSE |
955 | HIF | |
956 | EXPRESSION | |
957 | HTHEN {} | |
958 | BLOCK {} | |
959 | MBEE_ELSE_PART {}*/ | |
960 | | HELSE {} | |
961 | BLOCK | |
962 | ; | |
affac613 | 963 | FOR_LIST : FOR_LIST_ELEMENT |
e9690142 JD |
964 | | FOR_LIST_ELEMENT |
965 | HPAREXPSEPARATOR | |
966 | FOR_LIST | |
967 | ; | |
817e9f41 | 968 | FOR_LIST_ELEMENT: EXPRESSION |
e9690142 JD |
969 | MBEE_F_L_EL_R_PT |
970 | ; | |
817e9f41 | 971 | MBEE_F_L_EL_R_PT: /*EMPT*/ |
e9690142 JD |
972 | | HWHILE |
973 | EXPRESSION | |
974 | | HSTEP | |
975 | EXPRESSION | |
976 | HUNTIL | |
977 | EXPRESSION | |
978 | ; | |
817e9f41 | 979 | GOTO : HGO |
e9690142 JD |
980 | HTO |
981 | | HGOTO | |
982 | ; | |
817e9f41 | 983 | CONN_STATE_R_PT : WHEN_CLAUSE_LIST |
e9690142 JD |
984 | | HDO {} |
985 | BLOCK | |
986 | ; | |
817e9f41 | 987 | WHEN_CLAUSE_LIST: HWHEN |
e9690142 JD |
988 | HIDENTIFIER |
989 | HDO {} | |
990 | BLOCK | |
991 | | WHEN_CLAUSE_LIST | |
992 | HWHEN | |
993 | HIDENTIFIER | |
994 | HDO {} | |
995 | BLOCK | |
996 | ; | |
817e9f41 | 997 | MBEE_OTWI_CLAUS : /*EMPT*/ |
e9690142 JD |
998 | | HOTHERWISE {} |
999 | ||
1000 | BLOCK | |
1001 | ; | |
1002 | ACTIVATOR : HACTIVATE | |
1003 | | HREACTIVATE | |
1004 | ; | |
1005 | SCHEDULE : /*EMPT*/ | |
1006 | | ATDELAY EXPRESSION {} | |
1007 | PRIOR | |
1008 | | BEFOREAFTER {} | |
1009 | EXPRESSION | |
1010 | ; | |
1011 | ATDELAY : HAT | |
1012 | | HDELAY | |
1013 | ; | |
1014 | BEFOREAFTER : HBEFORE | |
1015 | | HAFTER | |
1016 | ; | |
1017 | PRIOR : /*EMPT*/ | |
1018 | | HPRIOR | |
1019 | ; | |
817e9f41 AD |
1020 | /* GRAMATIKK FOR SETNINGER OG DEKLARASJONER */ |
1021 | MODULSTATEMENT : HWHILE | |
e9690142 JD |
1022 | EXPRESSION |
1023 | HDO {} | |
1024 | BLOCK | |
1025 | | HIF | |
1026 | EXPRESSION | |
1027 | HTHEN {} | |
1028 | BLOCK {} | |
1029 | MBEE_ELSE_PART | |
1030 | | HFOR | |
1031 | HIDENTIFIER | |
1032 | HASSIGN {} | |
1033 | FOR_LIST | |
1034 | HDO {} | |
1035 | BLOCK | |
1036 | | GOTO | |
1037 | EXPRESSION | |
1038 | | HINSPECT | |
1039 | EXPRESSION {} | |
1040 | CONN_STATE_R_PT | |
1041 | {} | |
1042 | MBEE_OTWI_CLAUS | |
1043 | | HINNER | |
1044 | | HIDENTIFIER | |
1045 | HLABELSEPARATOR | |
1046 | {} | |
1047 | DECLSTATEMENT | |
1048 | | EXPRESSION_SIMP | |
1049 | HBEGIN | |
1050 | {} | |
1051 | IMPORT_SPEC_MODULE | |
1052 | {} | |
1053 | MBEE_DECLSTMS | |
1054 | HEND | |
1055 | | EXPRESSION_SIMP HBEGIN error HSTATEMENTSEPARATOR | |
1056 | MBEE_DECLSTMS HEND | |
1057 | | EXPRESSION_SIMP HBEGIN error HEND | |
1058 | | EXPRESSION_SIMP | |
1059 | | ACTIVATOR EXPRESSION SCHEDULE | |
1060 | | HBEGIN | |
1061 | {} | |
1062 | MBEE_DECLSTMS | |
1063 | HEND | |
1064 | | MBEE_TYPE HPROCEDURE | |
1065 | HIDENTIFIER | |
1066 | {} | |
1067 | HEADING BLOCK | |
1068 | | HIDENTIFIER | |
1069 | HCLASS | |
1070 | NO_TYPE | |
1071 | {} | |
1072 | IMPORT_SPEC_MODULE | |
1073 | HIDENTIFIER | |
1074 | {} | |
1075 | HEADING | |
1076 | BLOCK | |
1077 | | HCLASS | |
1078 | NO_TYPE | |
1079 | HIDENTIFIER | |
1080 | {} | |
1081 | HEADING | |
1082 | BLOCK | |
1083 | | EXT_DECLARATION | |
1084 | | /*EMPT*/ | |
1085 | ; | |
affac613 | 1086 | IMPORT_SPEC_MODULE: |
e9690142 JD |
1087 | ; |
1088 | DECLSTATEMENT : MODULSTATEMENT | |
1089 | | TYPE | |
1090 | HIDENTIFIER | |
1091 | MBEE_CONSTANT | |
1092 | HPAREXPSEPARATOR | |
1093 | {} | |
1094 | IDENTIFIER_LISTC | |
1095 | | TYPE | |
1096 | HIDENTIFIER | |
1097 | MBEE_CONSTANT | |
1098 | | MBEE_TYPE | |
1099 | HARRAY {} | |
1100 | ARR_SEGMENT_LIST | |
1101 | | HSWITCH | |
1102 | HIDENTIFIER | |
1103 | HASSIGN {} | |
1104 | SWITCH_LIST | |
1105 | ; | |
affac613 | 1106 | BLOCK : DECLSTATEMENT |
e9690142 JD |
1107 | | HBEGIN MBEE_DECLSTMS HEND |
1108 | | HBEGIN error HSTATEMENTSEPARATOR MBEE_DECLSTMS HEND | |
1109 | | HBEGIN error HEND | |
1110 | ; | |
affac613 | 1111 | MBEE_DECLSTMS : MBEE_DECLSTMSU |
e9690142 | 1112 | ; |
affac613 | 1113 | MBEE_DECLSTMSU : DECLSTATEMENT |
e9690142 JD |
1114 | | MBEE_DECLSTMSU |
1115 | HSTATEMENTSEPARATOR | |
1116 | DECLSTATEMENT | |
1117 | ; | |
1118 | MODULS : MODULSTATEMENT | |
1119 | | MODULS HSTATEMENTSEPARATOR MODULSTATEMENT | |
1120 | ; | |
817e9f41 AD |
1121 | /* GRAMATIKK FOR DEL AV DEKLARASJONER */ |
1122 | ARR_SEGMENT_LIST: ARR_SEGMENT | |
e9690142 JD |
1123 | | ARR_SEGMENT_LIST |
1124 | HPAREXPSEPARATOR | |
1125 | ARR_SEGMENT | |
1126 | ; | |
1127 | ARR_SEGMENT : ARRAY_SEGMENT | |
1128 | HBEGPAR | |
1129 | BAUND_PAIR_LIST HENDPAR | |
1130 | ; | |
affac613 | 1131 | ARRAY_SEGMENT : ARRAY_SEGMENT_EL {} |
817e9f41 | 1132 | |
e9690142 JD |
1133 | | ARRAY_SEGMENT_EL |
1134 | HPAREXPSEPARATOR | |
1135 | ARRAY_SEGMENT | |
1136 | ; | |
affac613 | 1137 | ARRAY_SEGMENT_EL: HIDENTIFIER |
e9690142 | 1138 | ; |
affac613 | 1139 | BAUND_PAIR_LIST : BAUND_PAIR |
e9690142 JD |
1140 | | BAUND_PAIR |
1141 | HPAREXPSEPARATOR | |
1142 | BAUND_PAIR_LIST | |
1143 | ; | |
817e9f41 | 1144 | BAUND_PAIR : EXPRESSION |
e9690142 JD |
1145 | HLABELSEPARATOR |
1146 | EXPRESSION | |
1147 | ; | |
affac613 | 1148 | SWITCH_LIST : EXPRESSION |
e9690142 JD |
1149 | | EXPRESSION |
1150 | HPAREXPSEPARATOR | |
1151 | SWITCH_LIST | |
1152 | ; | |
affac613 | 1153 | HEADING : MBEE_FMAL_PAR_P HSTATEMENTSEPARATOR {} |
e9690142 JD |
1154 | MBEE_MODE_PART {} |
1155 | MBEE_SPEC_PART {} | |
1156 | MBEE_PROT_PART {} | |
1157 | MBEE_VIRT_PART | |
1158 | ; | |
817e9f41 | 1159 | MBEE_FMAL_PAR_P : /*EMPT*/ |
e9690142 JD |
1160 | | FMAL_PAR_PART |
1161 | ; | |
817e9f41 | 1162 | FMAL_PAR_PART : HBEGPAR NO_TYPE |
e9690142 JD |
1163 | MBEE_LISTV HENDPAR |
1164 | ; | |
817e9f41 | 1165 | MBEE_LISTV : /*EMPT*/ |
e9690142 JD |
1166 | | LISTV |
1167 | ; | |
affac613 | 1168 | LISTV : HIDENTIFIER |
e9690142 JD |
1169 | | FPP_CATEG HDOTDOTDOT |
1170 | | HIDENTIFIER {} | |
1171 | HPAREXPSEPARATOR LISTV | |
1172 | | FPP_SPEC | |
1173 | | FPP_SPEC | |
1174 | HPAREXPSEPARATOR LISTV | |
1175 | ; | |
817e9f41 | 1176 | FPP_HEADING : HBEGPAR NO_TYPE |
e9690142 JD |
1177 | FPP_MBEE_LISTV HENDPAR |
1178 | ; | |
817e9f41 | 1179 | FPP_MBEE_LISTV : /*EMPT*/ |
e9690142 JD |
1180 | | FPP_LISTV |
1181 | ; | |
1182 | FPP_LISTV : FPP_CATEG HDOTDOTDOT | |
1183 | | FPP_SPEC | |
1184 | | FPP_SPEC | |
1185 | HPAREXPSEPARATOR LISTV | |
1186 | ; | |
817e9f41 | 1187 | FPP_SPEC : FPP_CATEG SPECIFIER HIDENTIFIER |
e9690142 JD |
1188 | | FPP_CATEG FPP_PROC_DECL_IN_SPEC |
1189 | ; | |
817e9f41 | 1190 | FPP_CATEG : HNAME HLABELSEPARATOR |
e9690142 JD |
1191 | | HVALUE HLABELSEPARATOR |
1192 | | HVAR HLABELSEPARATOR | |
1193 | | /*EMPT*/ | |
1194 | ; | |
1195 | FPP_PROC_DECL_IN_SPEC: MBEE_TYPE HPROCEDURE | |
1196 | HIDENTIFIER | |
1197 | {} | |
1198 | FPP_HEADING {} { /* Yes, two "final" actions. */ } | |
1199 | ; | |
affac613 | 1200 | IDENTIFIER_LISTV: HIDENTIFIER |
e9690142 JD |
1201 | | HDOTDOTDOT |
1202 | | HIDENTIFIER {} | |
1203 | HPAREXPSEPARATOR IDENTIFIER_LISTV | |
1204 | ; | |
817e9f41 | 1205 | MBEE_MODE_PART : /*EMPT*/ |
e9690142 JD |
1206 | | MODE_PART |
1207 | ; | |
817e9f41 | 1208 | MODE_PART : NAME_PART |
e9690142 JD |
1209 | | VALUE_PART |
1210 | | VAR_PART | |
1211 | | NAME_PART VALUE_PART | |
1212 | | VALUE_PART NAME_PART | |
1213 | | NAME_PART VAR_PART | |
1214 | | VAR_PART NAME_PART | |
1215 | | VALUE_PART VAR_PART | |
1216 | | VAR_PART VALUE_PART | |
1217 | | VAR_PART NAME_PART VALUE_PART | |
1218 | | NAME_PART VAR_PART VALUE_PART | |
1219 | | NAME_PART VALUE_PART VAR_PART | |
1220 | | VAR_PART VALUE_PART NAME_PART | |
1221 | | VALUE_PART VAR_PART NAME_PART | |
1222 | | VALUE_PART NAME_PART VAR_PART | |
1223 | ; | |
affac613 | 1224 | NAME_PART : HNAME {} |
e9690142 JD |
1225 | IDENTIFIER_LISTV |
1226 | HSTATEMENTSEPARATOR | |
1227 | ; | |
affac613 | 1228 | VAR_PART : HVAR {} |
e9690142 JD |
1229 | IDENTIFIER_LISTV |
1230 | HSTATEMENTSEPARATOR | |
1231 | ; | |
affac613 | 1232 | VALUE_PART : HVALUE {} |
e9690142 JD |
1233 | IDENTIFIER_LISTV HSTATEMENTSEPARATOR |
1234 | ; | |
817e9f41 | 1235 | MBEE_SPEC_PART : /*EMPT*/ |
e9690142 JD |
1236 | | SPEC_PART |
1237 | ; | |
817e9f41 | 1238 | SPEC_PART : ONE_SPEC |
e9690142 JD |
1239 | | SPEC_PART ONE_SPEC |
1240 | ; | |
1241 | ONE_SPEC : SPECIFIER IDENTIFIER_LIST HSTATEMENTSEPARATOR | |
1242 | | NO_TYPE HPROCEDURE HIDENTIFIER HOBJRELOPERATOR | |
1243 | {} | |
1244 | PROC_DECL_IN_SPEC HSTATEMENTSEPARATOR | |
1245 | | FPP_PROC_DECL_IN_SPEC HSTATEMENTSEPARATOR | |
1246 | | MBEE_TYPE HPROCEDURE HIDENTIFIER HSTATEMENTSEPARATOR | |
1247 | | MBEE_TYPE HPROCEDURE HIDENTIFIER HPAREXPSEPARATOR | |
1248 | IDENTIFIER_LIST HSTATEMENTSEPARATOR | |
1249 | ; | |
affac613 | 1250 | SPECIFIER : TYPE |
e9690142 JD |
1251 | | MBEE_TYPE |
1252 | HARRAY | |
1253 | | HLABEL | |
1254 | | HSWITCH | |
1255 | ; | |
1256 | PROC_DECL_IN_SPEC: MBEE_TYPE HPROCEDURE | |
1257 | HIDENTIFIER | |
1258 | {} | |
1259 | HEADING | |
1260 | {} | |
1261 | MBEE_BEGIN_END | |
1262 | ; | |
1263 | MBEE_BEGIN_END : /* EMPTY */ | |
1264 | | HBEGIN HEND | |
1265 | ; | |
817e9f41 | 1266 | MBEE_PROT_PART : /*EMPT*/ |
e9690142 JD |
1267 | | PROTECTION_PART |
1268 | ; | |
817e9f41 | 1269 | PROTECTION_PART : PROT_SPECIFIER IDENTIFIER_LIST |
e9690142 JD |
1270 | HSTATEMENTSEPARATOR |
1271 | | PROTECTION_PART PROT_SPECIFIER | |
1272 | IDENTIFIER_LIST HSTATEMENTSEPARATOR | |
1273 | ; | |
affac613 | 1274 | PROT_SPECIFIER : HHIDDEN |
e9690142 JD |
1275 | | HPROTECTED |
1276 | | HHIDDEN | |
1277 | HPROTECTED | |
1278 | | HPROTECTED | |
1279 | HHIDDEN | |
1280 | ; | |
817e9f41 | 1281 | MBEE_VIRT_PART : /*EMPT*/ |
e9690142 JD |
1282 | | VIRTUAL_PART |
1283 | ; | |
817e9f41 | 1284 | VIRTUAL_PART : HVIRTUAL |
e9690142 JD |
1285 | HLABELSEPARATOR |
1286 | MBEE_SPEC_PART | |
1287 | ; | |
affac613 | 1288 | IDENTIFIER_LIST : HIDENTIFIER |
e9690142 JD |
1289 | | IDENTIFIER_LIST HPAREXPSEPARATOR |
1290 | HIDENTIFIER | |
1291 | ; | |
817e9f41 | 1292 | IDENTIFIER_LISTC: HIDENTIFIER |
e9690142 JD |
1293 | MBEE_CONSTANT |
1294 | | IDENTIFIER_LISTC HPAREXPSEPARATOR | |
1295 | HIDENTIFIER | |
1296 | MBEE_CONSTANT | |
1297 | ; | |
1298 | MBEE_CONSTANT : /* EMPTY */ | |
1299 | | HVALRELOPERATOR | |
1300 | {} | |
1301 | EXPRESSION | |
1302 | ; | |
817e9f41 AD |
1303 | |
1304 | /* GRAMATIKK FOR UTTRYKK */ | |
affac613 | 1305 | EXPRESSION : EXPRESSION_SIMP |
e9690142 JD |
1306 | | HIF |
1307 | EXPRESSION | |
1308 | HTHEN | |
1309 | EXPRESSION | |
1310 | HELSE | |
1311 | EXPRESSION | |
1312 | ; | |
1313 | EXPRESSION_SIMP : EXPRESSION_SIMP | |
1314 | HASSIGN | |
1315 | EXPRESSION | |
1316 | | | |
1317 | ||
1318 | EXPRESSION_SIMP | |
1319 | HCONC | |
1320 | EXPRESSION_SIMP | |
1321 | | EXPRESSION_SIMP HOR | |
1322 | HELSE | |
1323 | EXPRESSION_SIMP | |
1324 | %prec HORELSE | |
1325 | | EXPRESSION_SIMP HAND | |
1326 | HTHEN | |
1327 | EXPRESSION_SIMP | |
1328 | %prec HANDTHEN | |
1329 | | EXPRESSION_SIMP | |
1330 | HEQV EXPRESSION_SIMP | |
1331 | | EXPRESSION_SIMP | |
1332 | HIMP EXPRESSION_SIMP | |
1333 | | EXPRESSION_SIMP | |
1334 | HOR EXPRESSION_SIMP | |
1335 | | EXPRESSION_SIMP | |
1336 | HAND EXPRESSION_SIMP | |
1337 | | HNOT EXPRESSION_SIMP | |
1338 | | EXPRESSION_SIMP | |
1339 | HVALRELOPERATOR | |
1340 | EXPRESSION_SIMP | |
1341 | | EXPRESSION_SIMP | |
1342 | HREFRELOPERATOR | |
1343 | EXPRESSION_SIMP | |
1344 | | EXPRESSION_SIMP | |
1345 | HOBJRELOPERATOR | |
1346 | EXPRESSION_SIMP | |
1347 | | HTERMOPERATOR | |
1348 | EXPRESSION_SIMP %prec UNEAR | |
1349 | | EXPRESSION_SIMP | |
1350 | HTERMOPERATOR | |
1351 | EXPRESSION_SIMP | |
1352 | | EXPRESSION_SIMP | |
1353 | HFACTOROPERATOR | |
1354 | EXPRESSION_SIMP | |
1355 | | EXPRESSION_SIMP | |
1356 | HPRIMARYOPERATOR | |
1357 | EXPRESSION_SIMP | |
1358 | | HBEGPAR | |
1359 | EXPRESSION HENDPAR | |
1360 | | HTEXTKONST | |
1361 | | HCHARACTERKONST | |
1362 | | HREALKONST | |
1363 | | HINTEGERKONST | |
1364 | | HBOOLEANKONST | |
1365 | | HNONE | |
1366 | | HIDENTIFIER | |
1367 | {} | |
1368 | MBEE_ARG_R_PT | |
1369 | | HTHIS HIDENTIFIER | |
1370 | | HNEW | |
1371 | HIDENTIFIER | |
1372 | ARG_R_PT | |
1373 | | EXPRESSION_SIMP | |
1374 | HDOT | |
1375 | EXPRESSION_SIMP | |
1376 | | EXPRESSION_SIMP | |
1377 | HQUA HIDENTIFIER | |
1378 | ; | |
affac613 | 1379 | ARG_R_PT : /*EMPTY*/ |
e9690142 JD |
1380 | | HBEGPAR |
1381 | ARGUMENT_LIST HENDPAR | |
1382 | ; | |
affac613 | 1383 | MBEE_ARG_R_PT : /*EMPTY*/ |
e9690142 JD |
1384 | | HBEGPAR |
1385 | ARGUMENT_LIST HENDPAR | |
1386 | ; | |
affac613 | 1387 | ARGUMENT_LIST : EXPRESSION |
e9690142 JD |
1388 | | EXPRESSION |
1389 | HPAREXPSEPARATOR | |
1390 | ARGUMENT_LIST | |
1391 | ; | |
db34f798 JD |
1392 | ]], |
1393 | ||
1394 | dnl INPUT | |
1395 | [[]], | |
1396 | ||
1397 | dnl BISON-STDERR | |
f68a49ed AD |
1398 | [[input.y:128.12: warning: empty rule without %empty [-Wempty-rule] |
1399 | input.y:137.10: warning: empty rule without %empty [-Wempty-rule] | |
1400 | input.y:142.8: warning: empty rule without %empty [-Wempty-rule] | |
1401 | input.y:161.15: warning: empty rule without %empty [-Wempty-rule] | |
1402 | input.y:179.17: warning: empty rule without %empty [-Wempty-rule] | |
1403 | input.y:205.16: warning: empty rule without %empty [-Wempty-rule] | |
1404 | input.y:213.9: warning: empty rule without %empty [-Wempty-rule] | |
1405 | input.y:225.6: warning: empty rule without %empty [-Wempty-rule] | |
1406 | input.y:292.18: warning: empty rule without %empty [-Wempty-rule] | |
1407 | input.y:294.19: warning: empty rule without %empty [-Wempty-rule] | |
1408 | input.y:367.16: warning: empty rule without %empty [-Wempty-rule] | |
1409 | input.y:373.11: warning: empty rule without %empty [-Wempty-rule] | |
1410 | input.y:387.15: warning: empty rule without %empty [-Wempty-rule] | |
1411 | input.y:401.18: warning: empty rule without %empty [-Wempty-rule] | |
1412 | input.y:413.15: warning: empty rule without %empty [-Wempty-rule] | |
1413 | input.y:443.15: warning: empty rule without %empty [-Wempty-rule] | |
1414 | input.y:471.15: warning: empty rule without %empty [-Wempty-rule] | |
1415 | input.y:474.15: warning: empty rule without %empty [-Wempty-rule] | |
1416 | input.y:489.15: warning: empty rule without %empty [-Wempty-rule] | |
1417 | input.y:506.14: warning: empty rule without %empty [-Wempty-rule] | |
1418 | input.y:587.9: warning: empty rule without %empty [-Wempty-rule] | |
1419 | input.y:591.14: warning: empty rule without %empty [-Wempty-rule] | |
8782fe26 AD |
1420 | ]AT_COND_CASE([[canonical LR]], |
1421 | [[input.y: warning: 1876 shift/reduce conflicts [-Wconflicts-sr] | |
1422 | input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]]], | |
1423 | [[input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr] | |
1424 | input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]]])[ | |
d8ce7031 AD |
1425 | input.y:72.1-5: warning: useless associativity for HQUA, use %precedence [-Wprecedence] |
1426 | input.y:53.1-6: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence] | |
1427 | input.y:54.1-5: warning: useless associativity for HORELSE, use %precedence [-Wprecedence] | |
1428 | input.y:55.1-5: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence] | |
1429 | input.y:61.1-5: warning: useless associativity for HNOT, use %precedence [-Wprecedence] | |
1430 | input.y:68.1-5: warning: useless associativity for UNEAR, use %precedence [-Wprecedence] | |
db34f798 JD |
1431 | ]], |
1432 | ||
1433 | dnl LAST-STATE | |
1434 | [AT_COND_CASE([[canonical LR]], [[10425]], [[442]])], | |
817e9f41 | 1435 | |
db34f798 JD |
1436 | dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge. |
1437 | [], | |
817e9f41 | 1438 | |
db34f798 JD |
1439 | dnl OTHER-CHECKS |
1440 | [AT_COND_CASE([[canonical LR]], [[]], | |
1441 | [AT_CHECK([[grep '^State.*conflicts:' input.output]], [[0]], | |
a4b746ea PE |
1442 | [[State 64 conflicts: 14 shift/reduce |
1443 | State 164 conflicts: 1 shift/reduce | |
1444 | State 201 conflicts: 33 shift/reduce, 4 reduce/reduce | |
1445 | State 206 conflicts: 1 shift/reduce | |
1446 | State 240 conflicts: 1 shift/reduce | |
1447 | State 335 conflicts: 9 shift/reduce, 2 reduce/reduce | |
1448 | State 356 conflicts: 1 shift/reduce | |
1449 | State 360 conflicts: 9 shift/reduce, 2 reduce/reduce | |
1450 | State 427 conflicts: 9 shift/reduce, 2 reduce/reduce | |
db34f798 | 1451 | ]])])]) |
817e9f41 | 1452 | |
db34f798 JD |
1453 | ## -------------------------------- ## |
1454 | ## GNU pic (Groff 1.18.1) Grammar. ## | |
1455 | ## -------------------------------- ## | |
2740f169 PE |
1456 | |
1457 | # GNU pic, part of groff. | |
1458 | ||
1459 | # Bison once reported shift/reduce conflicts that it shouldn't have. | |
1460 | ||
db34f798 JD |
1461 | AT_TEST_EXISTING_GRAMMAR([[GNU pic (Groff 1.18.1) Grammar]], |
1462 | [[%error-verbose | |
affac613 AD |
1463 | |
1464 | %token LABEL | |
1465 | %token VARIABLE | |
1466 | %token NUMBER | |
1467 | %token TEXT | |
1468 | %token COMMAND_LINE | |
1469 | %token DELIMITED | |
1470 | %token ORDINAL | |
2740f169 PE |
1471 | %token TH |
1472 | %token LEFT_ARROW_HEAD | |
1473 | %token RIGHT_ARROW_HEAD | |
1474 | %token DOUBLE_ARROW_HEAD | |
1475 | %token LAST | |
1476 | %token UP | |
1477 | %token DOWN | |
1478 | %token LEFT | |
1479 | %token RIGHT | |
1480 | %token BOX | |
1481 | %token CIRCLE | |
1482 | %token ELLIPSE | |
1483 | %token ARC | |
1484 | %token LINE | |
1485 | %token ARROW | |
1486 | %token MOVE | |
1487 | %token SPLINE | |
1488 | %token HEIGHT | |
1489 | %token RADIUS | |
1490 | %token WIDTH | |
1491 | %token DIAMETER | |
1492 | %token FROM | |
1493 | %token TO | |
1494 | %token AT | |
1495 | %token WITH | |
1496 | %token BY | |
1497 | %token THEN | |
1498 | %token SOLID | |
1499 | %token DOTTED | |
1500 | %token DASHED | |
1501 | %token CHOP | |
1502 | %token SAME | |
1503 | %token INVISIBLE | |
1504 | %token LJUST | |
1505 | %token RJUST | |
1506 | %token ABOVE | |
1507 | %token BELOW | |
1508 | %token OF | |
1509 | %token THE | |
1510 | %token WAY | |
1511 | %token BETWEEN | |
1512 | %token AND | |
1513 | %token HERE | |
1514 | %token DOT_N | |
04098407 | 1515 | %token DOT_E |
2740f169 PE |
1516 | %token DOT_W |
1517 | %token DOT_S | |
1518 | %token DOT_NE | |
1519 | %token DOT_SE | |
1520 | %token DOT_NW | |
1521 | %token DOT_SW | |
1522 | %token DOT_C | |
1523 | %token DOT_START | |
1524 | %token DOT_END | |
1525 | %token DOT_X | |
1526 | %token DOT_Y | |
1527 | %token DOT_HT | |
1528 | %token DOT_WID | |
1529 | %token DOT_RAD | |
1530 | %token SIN | |
1531 | %token COS | |
1532 | %token ATAN2 | |
1533 | %token LOG | |
1534 | %token EXP | |
1535 | %token SQRT | |
1536 | %token K_MAX | |
1537 | %token K_MIN | |
1538 | %token INT | |
1539 | %token RAND | |
1540 | %token SRAND | |
1541 | %token COPY | |
cbdb6d91 | 1542 | %token THROUGH |
2740f169 PE |
1543 | %token TOP |
1544 | %token BOTTOM | |
1545 | %token UPPER | |
1546 | %token LOWER | |
1547 | %token SH | |
1548 | %token PRINT | |
1549 | %token CW | |
1550 | %token CCW | |
1551 | %token FOR | |
1552 | %token DO | |
1553 | %token IF | |
1554 | %token ELSE | |
1555 | %token ANDAND | |
1556 | %token OROR | |
1557 | %token NOTEQUAL | |
1558 | %token EQUALEQUAL | |
1559 | %token LESSEQUAL | |
1560 | %token GREATEREQUAL | |
1561 | %token LEFT_CORNER | |
1562 | %token RIGHT_CORNER | |
1563 | %token NORTH | |
1564 | %token SOUTH | |
1565 | %token EAST | |
1566 | %token WEST | |
1567 | %token CENTER | |
1568 | %token END | |
1569 | %token START | |
1570 | %token RESET | |
1571 | %token UNTIL | |
1572 | %token PLOT | |
1573 | %token THICKNESS | |
1574 | %token FILL | |
1575 | %token COLORED | |
1576 | %token OUTLINED | |
1577 | %token SHADED | |
1578 | %token ALIGNED | |
1579 | %token SPRINTF | |
1580 | %token COMMAND | |
1581 | ||
1582 | %left '.' | |
1583 | ||
1584 | /* this ensures that plot 17 "%g" parses as (plot 17 "%g") */ | |
1585 | %left PLOT | |
1586 | %left TEXT SPRINTF | |
1587 | ||
1588 | /* give text adjustments higher precedence than TEXT, so that | |
1589 | box "foo" above ljust == box ("foo" above ljust) | |
1590 | */ | |
1591 | ||
1592 | %left LJUST RJUST ABOVE BELOW | |
1593 | ||
1594 | %left LEFT RIGHT | |
1595 | /* Give attributes that take an optional expression a higher | |
4c9b8f13 | 1596 | precedence than left and right, so that eg 'line chop left' |
2740f169 PE |
1597 | parses properly. */ |
1598 | %left CHOP SOLID DASHED DOTTED UP DOWN FILL COLORED OUTLINED | |
1599 | %left LABEL | |
1600 | ||
04098407 | 1601 | %left VARIABLE NUMBER '(' SIN COS ATAN2 LOG EXP SQRT K_MAX K_MIN INT RAND SRAND LAST |
2740f169 PE |
1602 | %left ORDINAL HERE '`' |
1603 | ||
1604 | %left BOX CIRCLE ELLIPSE ARC LINE ARROW SPLINE '[' /* ] */ | |
1605 | ||
1606 | /* these need to be lower than '-' */ | |
1607 | %left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS | |
1608 | ||
4c9b8f13 | 1609 | /* these must have higher precedence than CHOP so that 'label %prec CHOP' |
2740f169 PE |
1610 | works */ |
1611 | %left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C | |
1612 | %left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER | |
1613 | %left UPPER LOWER NORTH SOUTH EAST WEST CENTER START END | |
1614 | ||
1615 | %left ',' | |
1616 | %left OROR | |
1617 | %left ANDAND | |
1618 | %left EQUALEQUAL NOTEQUAL | |
1619 | %left '<' '>' LESSEQUAL GREATEREQUAL | |
1620 | ||
1621 | %left BETWEEN OF | |
1622 | %left AND | |
1623 | ||
1624 | %left '+' '-' | |
1625 | %left '*' '/' '%' | |
1626 | %right '!' | |
1627 | %right '^' | |
db34f798 JD |
1628 | ]], |
1629 | [[ | |
2740f169 | 1630 | top: |
e9690142 JD |
1631 | optional_separator |
1632 | | element_list | |
1633 | ; | |
2740f169 | 1634 | |
2740f169 | 1635 | element_list: |
e9690142 JD |
1636 | optional_separator middle_element_list optional_separator |
1637 | ; | |
2740f169 PE |
1638 | |
1639 | middle_element_list: | |
e9690142 JD |
1640 | element |
1641 | | middle_element_list separator element | |
1642 | ; | |
2740f169 PE |
1643 | |
1644 | optional_separator: | |
e9690142 JD |
1645 | /* empty */ |
1646 | | separator | |
1647 | ; | |
2740f169 PE |
1648 | |
1649 | separator: | |
e9690142 JD |
1650 | ';' |
1651 | | separator ';' | |
1652 | ; | |
2740f169 PE |
1653 | |
1654 | placeless_element: | |
e9690142 JD |
1655 | VARIABLE '=' any_expr |
1656 | | VARIABLE ':' '=' any_expr | |
1657 | | UP | |
1658 | | DOWN | |
1659 | | LEFT | |
1660 | | RIGHT | |
1661 | | COMMAND_LINE | |
1662 | | COMMAND print_args | |
1663 | | PRINT print_args | |
1664 | | SH | |
1665 | {} | |
1666 | DELIMITED | |
1667 | | COPY TEXT | |
52718713 | 1668 | | COPY TEXT THROUGH |
e9690142 JD |
1669 | {} |
1670 | DELIMITED | |
1671 | {} | |
1672 | until | |
52718713 | 1673 | | COPY THROUGH |
e9690142 JD |
1674 | {} |
1675 | DELIMITED | |
1676 | {} | |
1677 | until | |
1678 | | FOR VARIABLE '=' expr TO expr optional_by DO | |
1679 | {} | |
1680 | DELIMITED | |
1681 | | simple_if | |
1682 | | simple_if ELSE | |
1683 | {} | |
1684 | DELIMITED | |
1685 | | reset_variables | |
1686 | | RESET | |
1687 | ; | |
2740f169 PE |
1688 | |
1689 | reset_variables: | |
e9690142 JD |
1690 | RESET VARIABLE |
1691 | | reset_variables VARIABLE | |
1692 | | reset_variables ',' VARIABLE | |
1693 | ; | |
2740f169 PE |
1694 | |
1695 | print_args: | |
e9690142 JD |
1696 | print_arg |
1697 | | print_args print_arg | |
1698 | ; | |
2740f169 PE |
1699 | |
1700 | print_arg: | |
e9690142 JD |
1701 | expr %prec ',' |
1702 | | text | |
1703 | | position %prec ',' | |
1704 | ; | |
2740f169 PE |
1705 | |
1706 | simple_if: | |
e9690142 JD |
1707 | IF any_expr THEN |
1708 | {} | |
1709 | DELIMITED | |
1710 | ; | |
2740f169 PE |
1711 | |
1712 | until: | |
e9690142 JD |
1713 | /* empty */ |
1714 | | UNTIL TEXT | |
1715 | ; | |
04098407 | 1716 | |
2740f169 | 1717 | any_expr: |
e9690142 JD |
1718 | expr |
1719 | | text_expr | |
1720 | ; | |
04098407 | 1721 | |
2740f169 | 1722 | text_expr: |
e9690142 JD |
1723 | text EQUALEQUAL text |
1724 | | text NOTEQUAL text | |
1725 | | text_expr ANDAND text_expr | |
1726 | | text_expr ANDAND expr | |
1727 | | expr ANDAND text_expr | |
1728 | | text_expr OROR text_expr | |
1729 | | text_expr OROR expr | |
1730 | | expr OROR text_expr | |
1731 | | '!' text_expr | |
1732 | ; | |
2740f169 | 1733 | |
2740f169 | 1734 | optional_by: |
e9690142 JD |
1735 | /* empty */ |
1736 | | BY expr | |
1737 | | BY '*' expr | |
1738 | ; | |
2740f169 PE |
1739 | |
1740 | element: | |
e9690142 JD |
1741 | object_spec |
1742 | | LABEL ':' optional_separator element | |
1743 | | LABEL ':' optional_separator position_not_place | |
1744 | | LABEL ':' optional_separator place | |
1745 | | '{' {} element_list '}' | |
1746 | {} | |
1747 | optional_element | |
1748 | | placeless_element | |
1749 | ; | |
2740f169 PE |
1750 | |
1751 | optional_element: | |
e9690142 JD |
1752 | /* empty */ |
1753 | | element | |
1754 | ; | |
2740f169 PE |
1755 | |
1756 | object_spec: | |
e9690142 JD |
1757 | BOX |
1758 | | CIRCLE | |
1759 | | ELLIPSE | |
1760 | | ARC | |
1761 | | LINE | |
1762 | | ARROW | |
1763 | | MOVE | |
1764 | | SPLINE | |
1765 | | text %prec TEXT | |
1766 | | PLOT expr | |
1767 | | PLOT expr text | |
1768 | | '[' | |
1769 | {} | |
1770 | element_list ']' | |
1771 | | object_spec HEIGHT expr | |
1772 | | object_spec RADIUS expr | |
1773 | | object_spec WIDTH expr | |
1774 | | object_spec DIAMETER expr | |
1775 | | object_spec expr %prec HEIGHT | |
1776 | | object_spec UP | |
1777 | | object_spec UP expr | |
1778 | | object_spec DOWN | |
1779 | | object_spec DOWN expr | |
1780 | | object_spec RIGHT | |
1781 | | object_spec RIGHT expr | |
1782 | | object_spec LEFT | |
1783 | | object_spec LEFT expr | |
1784 | | object_spec FROM position | |
1785 | | object_spec TO position | |
1786 | | object_spec AT position | |
1787 | | object_spec WITH path | |
1788 | | object_spec WITH position %prec ',' | |
1789 | | object_spec BY expr_pair | |
1790 | | object_spec THEN | |
1791 | | object_spec SOLID | |
1792 | | object_spec DOTTED | |
1793 | | object_spec DOTTED expr | |
1794 | | object_spec DASHED | |
1795 | | object_spec DASHED expr | |
1796 | | object_spec FILL | |
1797 | | object_spec FILL expr | |
1798 | | object_spec SHADED text | |
1799 | | object_spec COLORED text | |
1800 | | object_spec OUTLINED text | |
1801 | | object_spec CHOP | |
1802 | | object_spec CHOP expr | |
1803 | | object_spec SAME | |
1804 | | object_spec INVISIBLE | |
1805 | | object_spec LEFT_ARROW_HEAD | |
1806 | | object_spec RIGHT_ARROW_HEAD | |
1807 | | object_spec DOUBLE_ARROW_HEAD | |
1808 | | object_spec CW | |
1809 | | object_spec CCW | |
1810 | | object_spec text %prec TEXT | |
1811 | | object_spec LJUST | |
1812 | | object_spec RJUST | |
1813 | | object_spec ABOVE | |
1814 | | object_spec BELOW | |
1815 | | object_spec THICKNESS expr | |
1816 | | object_spec ALIGNED | |
1817 | ; | |
2740f169 PE |
1818 | |
1819 | text: | |
e9690142 JD |
1820 | TEXT |
1821 | | SPRINTF '(' TEXT sprintf_args ')' | |
1822 | ; | |
2740f169 PE |
1823 | |
1824 | sprintf_args: | |
e9690142 JD |
1825 | /* empty */ |
1826 | | sprintf_args ',' expr | |
1827 | ; | |
2740f169 PE |
1828 | |
1829 | position: | |
e9690142 JD |
1830 | position_not_place |
1831 | | place | |
1832 | ; | |
2740f169 PE |
1833 | |
1834 | position_not_place: | |
e9690142 JD |
1835 | expr_pair |
1836 | | position '+' expr_pair | |
1837 | | position '-' expr_pair | |
1838 | | '(' position ',' position ')' | |
1839 | | expr between position AND position | |
1840 | | expr '<' position ',' position '>' | |
1841 | ; | |
2740f169 PE |
1842 | |
1843 | between: | |
e9690142 JD |
1844 | BETWEEN |
1845 | | OF THE WAY BETWEEN | |
1846 | ; | |
2740f169 PE |
1847 | |
1848 | expr_pair: | |
e9690142 JD |
1849 | expr ',' expr |
1850 | | '(' expr_pair ')' | |
1851 | ; | |
2740f169 PE |
1852 | |
1853 | place: | |
e9690142 JD |
1854 | /* line at A left == line (at A) left */ |
1855 | label %prec CHOP | |
1856 | | label corner | |
1857 | | corner label | |
1858 | | corner OF label | |
1859 | | HERE | |
1860 | ; | |
2740f169 PE |
1861 | |
1862 | label: | |
e9690142 JD |
1863 | LABEL |
1864 | | nth_primitive | |
1865 | | label '.' LABEL | |
1866 | ; | |
2740f169 PE |
1867 | |
1868 | ordinal: | |
e9690142 JD |
1869 | ORDINAL |
1870 | | '`' any_expr TH | |
1871 | ; | |
2740f169 PE |
1872 | |
1873 | optional_ordinal_last: | |
e9690142 JD |
1874 | LAST |
1875 | | ordinal LAST | |
1876 | ; | |
2740f169 PE |
1877 | |
1878 | nth_primitive: | |
e9690142 JD |
1879 | ordinal object_type |
1880 | | optional_ordinal_last object_type | |
1881 | ; | |
2740f169 PE |
1882 | |
1883 | object_type: | |
e9690142 JD |
1884 | BOX |
1885 | | CIRCLE | |
1886 | | ELLIPSE | |
1887 | | ARC | |
1888 | | LINE | |
1889 | | ARROW | |
1890 | | SPLINE | |
1891 | | '[' ']' | |
1892 | | TEXT | |
1893 | ; | |
2740f169 PE |
1894 | |
1895 | label_path: | |
e9690142 JD |
1896 | '.' LABEL |
1897 | | label_path '.' LABEL | |
1898 | ; | |
2740f169 PE |
1899 | |
1900 | relative_path: | |
e9690142 JD |
1901 | corner %prec CHOP |
1902 | /* give this a lower precedence than LEFT and RIGHT so that | |
1903 | [A: box] with .A left == [A: box] with (.A left) */ | |
1904 | | label_path %prec TEXT | |
1905 | | label_path corner | |
1906 | ; | |
2740f169 PE |
1907 | |
1908 | path: | |
e9690142 JD |
1909 | relative_path |
1910 | | '(' relative_path ',' relative_path ')' | |
1911 | {} | |
1912 | /* The rest of these rules are a compatibility sop. */ | |
1913 | | ORDINAL LAST object_type relative_path | |
1914 | | LAST object_type relative_path | |
1915 | | ORDINAL object_type relative_path | |
1916 | | LABEL relative_path | |
1917 | ; | |
2740f169 PE |
1918 | |
1919 | corner: | |
e9690142 JD |
1920 | DOT_N |
1921 | | DOT_E | |
1922 | | DOT_W | |
1923 | | DOT_S | |
1924 | | DOT_NE | |
1925 | | DOT_SE | |
1926 | | DOT_NW | |
1927 | | DOT_SW | |
1928 | | DOT_C | |
1929 | | DOT_START | |
1930 | | DOT_END | |
1931 | | TOP | |
1932 | | BOTTOM | |
1933 | | LEFT | |
1934 | | RIGHT | |
1935 | | UPPER LEFT | |
1936 | | LOWER LEFT | |
1937 | | UPPER RIGHT | |
1938 | | LOWER RIGHT | |
1939 | | LEFT_CORNER | |
1940 | | RIGHT_CORNER | |
1941 | | UPPER LEFT_CORNER | |
1942 | | LOWER LEFT_CORNER | |
1943 | | UPPER RIGHT_CORNER | |
1944 | | LOWER RIGHT_CORNER | |
1945 | | NORTH | |
1946 | | SOUTH | |
1947 | | EAST | |
1948 | | WEST | |
1949 | | CENTER | |
1950 | | START | |
1951 | | END | |
1952 | ; | |
2740f169 PE |
1953 | |
1954 | expr: | |
e9690142 JD |
1955 | VARIABLE |
1956 | | NUMBER | |
1957 | | place DOT_X | |
1958 | | place DOT_Y | |
1959 | | place DOT_HT | |
1960 | | place DOT_WID | |
1961 | | place DOT_RAD | |
1962 | | expr '+' expr | |
1963 | | expr '-' expr | |
1964 | | expr '*' expr | |
1965 | | expr '/' expr | |
1966 | | expr '%' expr | |
1967 | | expr '^' expr | |
1968 | | '-' expr %prec '!' | |
1969 | | '(' any_expr ')' | |
1970 | | SIN '(' any_expr ')' | |
1971 | | COS '(' any_expr ')' | |
1972 | | ATAN2 '(' any_expr ',' any_expr ')' | |
1973 | | LOG '(' any_expr ')' | |
1974 | | EXP '(' any_expr ')' | |
1975 | | SQRT '(' any_expr ')' | |
1976 | | K_MAX '(' any_expr ',' any_expr ')' | |
1977 | | K_MIN '(' any_expr ',' any_expr ')' | |
1978 | | INT '(' any_expr ')' | |
1979 | | RAND '(' any_expr ')' | |
1980 | | RAND '(' ')' | |
1981 | | SRAND '(' any_expr ')' | |
1982 | | expr '<' expr | |
1983 | | expr LESSEQUAL expr | |
1984 | | expr '>' expr | |
1985 | | expr GREATEREQUAL expr | |
1986 | | expr EQUALEQUAL expr | |
1987 | | expr NOTEQUAL expr | |
1988 | | expr ANDAND expr | |
1989 | | expr OROR expr | |
1990 | | '!' expr | |
1991 | ; | |
db34f798 JD |
1992 | ]], |
1993 | ||
1994 | dnl INPUT | |
1995 | dnl | |
1996 | dnl For example, in pic: | |
1997 | dnl | |
1998 | dnl .PS | |
1999 | dnl A: circle "A" | |
2000 | dnl B: A left | |
2001 | dnl circle "B" at B | |
2002 | dnl .PE | |
2003 | dnl | |
2004 | dnl Even using groff 1.19.2, the 3rd line above is a syntax error. Change | |
2005 | dnl "left" to "right", and it still is. However, add "upper" or "lower" before | |
2006 | dnl "left or "right" and it's accepted to mean ".nw", ".ne", ".sw", or ".se". | |
2007 | dnl (There seem to be no aliases for "north" and "south" that can stand alone | |
2008 | dnl without being followed by "of".) | |
2009 | [[VARIABLE, '=', LABEL, LEFT, DOT_X]], | |
2010 | ||
2011 | dnl BISON-STDERR | |
f68a49ed AD |
2012 | [[input.y:202.19: warning: empty rule without %empty [-Wempty-rule] |
2013 | input.y:270.6: warning: empty rule without %empty [-Wempty-rule] | |
2014 | input.y:292.12: warning: empty rule without %empty [-Wempty-rule] | |
2015 | input.y:309.17: warning: empty rule without %empty [-Wempty-rule] | |
2016 | input.y:382.13: warning: empty rule without %empty [-Wempty-rule] | |
2017 | input.y:471.11-48: warning: rule useless in parser due to conflicts [-Wother] | |
d8ce7031 AD |
2018 | input.y:154.1-5: warning: useless associativity for LABEL, use %precedence [-Wprecedence] |
2019 | input.y:156.1-5: warning: useless associativity for VARIABLE, use %precedence [-Wprecedence] | |
2020 | input.y:156.1-5: warning: useless associativity for NUMBER, use %precedence [-Wprecedence] | |
2021 | input.y:141.1-5: warning: useless associativity for TEXT, use %precedence [-Wprecedence] | |
2022 | input.y:157.1-5: warning: useless associativity for ORDINAL, use %precedence [-Wprecedence] | |
2023 | input.y:156.1-5: warning: useless associativity for LAST, use %precedence [-Wprecedence] | |
2024 | input.y:153.1-5: warning: useless associativity for UP, use %precedence [-Wprecedence] | |
2025 | input.y:153.1-5: warning: useless associativity for DOWN, use %precedence [-Wprecedence] | |
2026 | input.y:159.1-5: warning: useless associativity for BOX, use %precedence [-Wprecedence] | |
2027 | input.y:159.1-5: warning: useless associativity for CIRCLE, use %precedence [-Wprecedence] | |
2028 | input.y:159.1-5: warning: useless associativity for ELLIPSE, use %precedence [-Wprecedence] | |
2029 | input.y:159.1-5: warning: useless associativity for ARC, use %precedence [-Wprecedence] | |
2030 | input.y:159.1-5: warning: useless associativity for LINE, use %precedence [-Wprecedence] | |
2031 | input.y:159.1-5: warning: useless associativity for ARROW, use %precedence [-Wprecedence] | |
2032 | input.y:159.1-5: warning: useless associativity for SPLINE, use %precedence [-Wprecedence] | |
2033 | input.y:162.1-5: warning: useless associativity for HEIGHT, use %precedence [-Wprecedence] | |
2034 | input.y:162.1-5: warning: useless associativity for RADIUS, use %precedence [-Wprecedence] | |
2035 | input.y:162.1-5: warning: useless associativity for WIDTH, use %precedence [-Wprecedence] | |
2036 | input.y:162.1-5: warning: useless associativity for DIAMETER, use %precedence [-Wprecedence] | |
2037 | input.y:162.1-5: warning: useless associativity for FROM, use %precedence [-Wprecedence] | |
2038 | input.y:162.1-5: warning: useless associativity for TO, use %precedence [-Wprecedence] | |
2039 | input.y:162.1-5: warning: useless associativity for AT, use %precedence [-Wprecedence] | |
2040 | input.y:153.1-5: warning: useless precedence and associativity for SOLID [-Wprecedence] | |
2041 | input.y:153.1-5: warning: useless associativity for DOTTED, use %precedence [-Wprecedence] | |
2042 | input.y:153.1-5: warning: useless associativity for DASHED, use %precedence [-Wprecedence] | |
2043 | input.y:153.1-5: warning: useless associativity for CHOP, use %precedence [-Wprecedence] | |
2044 | input.y:147.1-5: warning: useless precedence and associativity for LJUST [-Wprecedence] | |
2045 | input.y:147.1-5: warning: useless precedence and associativity for RJUST [-Wprecedence] | |
2046 | input.y:147.1-5: warning: useless precedence and associativity for ABOVE [-Wprecedence] | |
2047 | input.y:147.1-5: warning: useless precedence and associativity for BELOW [-Wprecedence] | |
2048 | input.y:176.1-5: warning: useless associativity for OF, use %precedence [-Wprecedence] | |
2049 | input.y:176.1-5: warning: useless associativity for BETWEEN, use %precedence [-Wprecedence] | |
2050 | input.y:177.1-5: warning: useless associativity for AND, use %precedence [-Wprecedence] | |
2051 | input.y:157.1-5: warning: useless associativity for HERE, use %precedence [-Wprecedence] | |
2052 | input.y:166.1-5: warning: useless associativity for DOT_N, use %precedence [-Wprecedence] | |
2053 | input.y:166.1-5: warning: useless associativity for DOT_E, use %precedence [-Wprecedence] | |
2054 | input.y:166.1-5: warning: useless associativity for DOT_W, use %precedence [-Wprecedence] | |
2055 | input.y:166.1-5: warning: useless associativity for DOT_S, use %precedence [-Wprecedence] | |
2056 | input.y:166.1-5: warning: useless associativity for DOT_NE, use %precedence [-Wprecedence] | |
2057 | input.y:166.1-5: warning: useless associativity for DOT_SE, use %precedence [-Wprecedence] | |
2058 | input.y:166.1-5: warning: useless associativity for DOT_NW, use %precedence [-Wprecedence] | |
2059 | input.y:166.1-5: warning: useless associativity for DOT_SW, use %precedence [-Wprecedence] | |
2060 | input.y:166.1-5: warning: useless associativity for DOT_C, use %precedence [-Wprecedence] | |
2061 | input.y:167.1-5: warning: useless associativity for DOT_START, use %precedence [-Wprecedence] | |
2062 | input.y:167.1-5: warning: useless associativity for DOT_END, use %precedence [-Wprecedence] | |
2063 | input.y:156.1-5: warning: useless associativity for SIN, use %precedence [-Wprecedence] | |
2064 | input.y:156.1-5: warning: useless associativity for COS, use %precedence [-Wprecedence] | |
2065 | input.y:156.1-5: warning: useless associativity for ATAN2, use %precedence [-Wprecedence] | |
2066 | input.y:156.1-5: warning: useless associativity for LOG, use %precedence [-Wprecedence] | |
2067 | input.y:156.1-5: warning: useless associativity for EXP, use %precedence [-Wprecedence] | |
2068 | input.y:156.1-5: warning: useless associativity for SQRT, use %precedence [-Wprecedence] | |
2069 | input.y:156.1-5: warning: useless associativity for K_MAX, use %precedence [-Wprecedence] | |
2070 | input.y:156.1-5: warning: useless associativity for K_MIN, use %precedence [-Wprecedence] | |
2071 | input.y:156.1-5: warning: useless associativity for INT, use %precedence [-Wprecedence] | |
2072 | input.y:156.1-5: warning: useless associativity for RAND, use %precedence [-Wprecedence] | |
2073 | input.y:156.1-5: warning: useless associativity for SRAND, use %precedence [-Wprecedence] | |
2074 | input.y:167.1-5: warning: useless associativity for TOP, use %precedence [-Wprecedence] | |
2075 | input.y:167.1-5: warning: useless associativity for BOTTOM, use %precedence [-Wprecedence] | |
2076 | input.y:168.1-5: warning: useless associativity for UPPER, use %precedence [-Wprecedence] | |
2077 | input.y:168.1-5: warning: useless associativity for LOWER, use %precedence [-Wprecedence] | |
2078 | input.y:167.1-5: warning: useless associativity for LEFT_CORNER, use %precedence [-Wprecedence] | |
2079 | input.y:167.1-5: warning: useless associativity for RIGHT_CORNER, use %precedence [-Wprecedence] | |
2080 | input.y:168.1-5: warning: useless associativity for NORTH, use %precedence [-Wprecedence] | |
2081 | input.y:168.1-5: warning: useless associativity for SOUTH, use %precedence [-Wprecedence] | |
2082 | input.y:168.1-5: warning: useless associativity for EAST, use %precedence [-Wprecedence] | |
2083 | input.y:168.1-5: warning: useless associativity for WEST, use %precedence [-Wprecedence] | |
2084 | input.y:168.1-5: warning: useless associativity for CENTER, use %precedence [-Wprecedence] | |
2085 | input.y:168.1-5: warning: useless associativity for END, use %precedence [-Wprecedence] | |
2086 | input.y:168.1-5: warning: useless associativity for START, use %precedence [-Wprecedence] | |
2087 | input.y:140.1-5: warning: useless associativity for PLOT, use %precedence [-Wprecedence] | |
2088 | input.y:162.1-5: warning: useless associativity for THICKNESS, use %precedence [-Wprecedence] | |
2089 | input.y:153.1-5: warning: useless associativity for FILL, use %precedence [-Wprecedence] | |
2090 | input.y:153.1-5: warning: useless precedence and associativity for COLORED [-Wprecedence] | |
2091 | input.y:153.1-5: warning: useless precedence and associativity for OUTLINED [-Wprecedence] | |
2092 | input.y:141.1-5: warning: useless associativity for SPRINTF, use %precedence [-Wprecedence] | |
2093 | input.y:137.1-5: warning: useless associativity for '.', use %precedence [-Wprecedence] | |
2094 | input.y:156.1-5: warning: useless associativity for '(', use %precedence [-Wprecedence] | |
2095 | input.y:157.1-5: warning: useless associativity for '`', use %precedence [-Wprecedence] | |
2096 | input.y:159.1-5: warning: useless associativity for '@<:@', use %precedence [-Wprecedence] | |
2097 | input.y:170.1-5: warning: useless associativity for ',', use %precedence [-Wprecedence] | |
2098 | input.y:181.1-6: warning: useless associativity for '!', use %precedence [-Wprecedence] | |
db34f798 JD |
2099 | ]], |
2100 | ||
2101 | dnl LAST-STATE | |
2102 | [AT_COND_CASE([[LALR]], [[422]], [[canonical LR]], [[4833]], [[427]])], | |
2103 | ||
2104 | dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge. | |
2105 | dnl Isocore map from LALR(1) state number to new state number plus descriptions | |
2106 | dnl of any change in the actions resulting in a change in accepted language: | |
2107 | dnl - 102 -> 423: reduce -> shift on LEFT and RIGHT | |
2108 | dnl - 237 -> 425 | |
2109 | dnl - 266 -> 424 | |
2110 | dnl - 339 -> 426 | |
2111 | dnl - 383 -> 427 | |
2112 | [AT_COND_CASE([[LALR]], [], | |
2113 | [[@@ -1223,7 +1223,7 @@ | |
2114 | text_expr go to state 112 | |
2115 | text go to state 113 | |
2116 | place go to state 114 | |
2117 | - label go to state 102 | |
2118 | + label go to state 423 | |
2119 | ordinal go to state 103 | |
2120 | optional_ordinal_last go to state 104 | |
2121 | nth_primitive go to state 105 | |
2122 | @@ -1377,7 +1377,7 @@ | |
2123 | '!' shift, and go to state 94 | |
2124 | ||
2125 | place go to state 114 | |
2126 | - label go to state 102 | |
2127 | + label go to state 423 | |
2128 | ordinal go to state 103 | |
2129 | optional_ordinal_last go to state 104 | |
2130 | nth_primitive go to state 105 | |
2131 | @@ -1854,7 +1854,7 @@ | |
2132 | ||
2133 | text go to state 162 | |
2134 | place go to state 114 | |
2135 | - label go to state 102 | |
2136 | + label go to state 423 | |
2137 | ordinal go to state 103 | |
2138 | optional_ordinal_last go to state 104 | |
2139 | nth_primitive go to state 105 | |
2140 | @@ -2047,7 +2047,7 @@ | |
2141 | text_expr go to state 112 | |
2142 | text go to state 113 | |
2143 | place go to state 114 | |
2144 | - label go to state 102 | |
2145 | + label go to state 423 | |
2146 | ordinal go to state 103 | |
2147 | optional_ordinal_last go to state 104 | |
2148 | nth_primitive go to state 105 | |
2149 | @@ -2571,7 +2571,7 @@ | |
2150 | position_not_place go to state 99 | |
2151 | expr_pair go to state 191 | |
2152 | place go to state 101 | |
2153 | - label go to state 102 | |
2154 | + label go to state 423 | |
2155 | ordinal go to state 103 | |
2156 | optional_ordinal_last go to state 104 | |
2157 | nth_primitive go to state 105 | |
2158 | @@ -2732,7 +2732,7 @@ | |
2159 | text_expr go to state 112 | |
2160 | text go to state 113 | |
2161 | place go to state 114 | |
2162 | - label go to state 102 | |
2163 | + label go to state 423 | |
2164 | ordinal go to state 103 | |
2165 | optional_ordinal_last go to state 104 | |
2166 | nth_primitive go to state 105 | |
2167 | @@ -2875,7 +2875,7 @@ | |
2168 | '!' shift, and go to state 94 | |
2169 | ||
2170 | place go to state 114 | |
2171 | - label go to state 102 | |
2172 | + label go to state 423 | |
2173 | ordinal go to state 103 | |
2174 | optional_ordinal_last go to state 104 | |
2175 | nth_primitive go to state 105 | |
2176 | @@ -3018,7 +3018,7 @@ | |
2177 | '!' shift, and go to state 94 | |
2178 | ||
2179 | place go to state 114 | |
2180 | - label go to state 102 | |
2181 | + label go to state 423 | |
2182 | ordinal go to state 103 | |
2183 | optional_ordinal_last go to state 104 | |
2184 | nth_primitive go to state 105 | |
2185 | @@ -3256,7 +3256,7 @@ | |
2186 | ||
d42fe46e | 2187 | State 102 |
db34f798 JD |
2188 | |
2189 | - 146 place: label . [$end, LABEL, VARIABLE, NUMBER, TEXT, ORDINAL, LEFT_ARROW_HEAD, RIGHT_ARROW_HEAD, DOUBLE_ARROW_HEAD, LAST, UP, DOWN, LEFT, RIGHT, HEIGHT, RADIUS, WIDTH, DIAMETER, FROM, TO, AT, WITH, BY, THEN, SOLID, DOTTED, DASHED, CHOP, SAME, INVISIBLE, LJUST, RJUST, ABOVE, BELOW, AND, HERE, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, SIN, COS, ATAN2, LOG, EXP, SQRT, K_MAX, K_MIN, INT, RAND, SRAND, CW, CCW, THICKNESS, FILL, COLORED, OUTLINED, SHADED, ALIGNED, SPRINTF, '(', '`', ',', '>', '+', '-', '!', ';', '}', '@:>@', ')'] | |
2190 | + 146 place: label . [$end, LABEL, VARIABLE, NUMBER, TEXT, ORDINAL, LEFT_ARROW_HEAD, RIGHT_ARROW_HEAD, DOUBLE_ARROW_HEAD, LAST, UP, DOWN, LEFT, RIGHT, HEIGHT, RADIUS, WIDTH, DIAMETER, FROM, TO, AT, WITH, BY, THEN, SOLID, DOTTED, DASHED, CHOP, SAME, INVISIBLE, LJUST, RJUST, ABOVE, BELOW, HERE, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, SIN, COS, ATAN2, LOG, EXP, SQRT, K_MAX, K_MIN, INT, RAND, SRAND, CW, CCW, THICKNESS, FILL, COLORED, OUTLINED, SHADED, ALIGNED, SPRINTF, '(', '`', '+', '-', '!', ';', '}', '@:>@'] | |
2191 | 147 | label . corner | |
2192 | 153 label: label . '.' LABEL | |
2193 | 180 corner: . DOT_N | |
2194 | @@ -3645,7 +3645,7 @@ | |
2195 | text_expr go to state 112 | |
2196 | text go to state 113 | |
2197 | place go to state 114 | |
2198 | - label go to state 102 | |
2199 | + label go to state 423 | |
2200 | ordinal go to state 103 | |
2201 | optional_ordinal_last go to state 104 | |
2202 | nth_primitive go to state 105 | |
2203 | @@ -3804,7 +3804,7 @@ | |
2204 | text_expr go to state 239 | |
2205 | text go to state 113 | |
2206 | place go to state 114 | |
2207 | - label go to state 102 | |
2208 | + label go to state 423 | |
2209 | ordinal go to state 103 | |
2210 | optional_ordinal_last go to state 104 | |
2211 | nth_primitive go to state 105 | |
2212 | @@ -4481,7 +4481,7 @@ | |
2213 | $default reduce using rule 89 (object_spec) | |
2214 | ||
2215 | place go to state 114 | |
2216 | - label go to state 102 | |
2217 | + label go to state 423 | |
2218 | ordinal go to state 103 | |
2219 | optional_ordinal_last go to state 104 | |
2220 | nth_primitive go to state 105 | |
2221 | @@ -4673,7 +4673,7 @@ | |
2222 | $default reduce using rule 91 (object_spec) | |
2223 | ||
2224 | place go to state 114 | |
2225 | - label go to state 102 | |
2226 | + label go to state 423 | |
2227 | ordinal go to state 103 | |
2228 | optional_ordinal_last go to state 104 | |
2229 | nth_primitive go to state 105 | |
2230 | @@ -4867,7 +4867,7 @@ | |
2231 | $default reduce using rule 95 (object_spec) | |
2232 | ||
2233 | place go to state 114 | |
2234 | - label go to state 102 | |
2235 | + label go to state 423 | |
2236 | ordinal go to state 103 | |
2237 | optional_ordinal_last go to state 104 | |
2238 | nth_primitive go to state 105 | |
2239 | @@ -5065,7 +5065,7 @@ | |
2240 | $default reduce using rule 93 (object_spec) | |
2241 | ||
2242 | place go to state 114 | |
2243 | - label go to state 102 | |
2244 | + label go to state 423 | |
2245 | ordinal go to state 103 | |
2246 | optional_ordinal_last go to state 104 | |
2247 | nth_primitive go to state 105 | |
2248 | @@ -5260,7 +5260,7 @@ | |
2249 | '!' shift, and go to state 94 | |
2250 | ||
2251 | place go to state 114 | |
2252 | - label go to state 102 | |
2253 | + label go to state 423 | |
2254 | ordinal go to state 103 | |
2255 | optional_ordinal_last go to state 104 | |
2256 | nth_primitive go to state 105 | |
2257 | @@ -5403,7 +5403,7 @@ | |
2258 | '!' shift, and go to state 94 | |
2259 | ||
2260 | place go to state 114 | |
2261 | - label go to state 102 | |
2262 | + label go to state 423 | |
2263 | ordinal go to state 103 | |
2264 | optional_ordinal_last go to state 104 | |
2265 | nth_primitive go to state 105 | |
2266 | @@ -5546,7 +5546,7 @@ | |
2267 | '!' shift, and go to state 94 | |
2268 | ||
2269 | place go to state 114 | |
2270 | - label go to state 102 | |
2271 | + label go to state 423 | |
2272 | ordinal go to state 103 | |
2273 | optional_ordinal_last go to state 104 | |
2274 | nth_primitive go to state 105 | |
2275 | @@ -5689,7 +5689,7 @@ | |
2276 | '!' shift, and go to state 94 | |
2277 | ||
2278 | place go to state 114 | |
2279 | - label go to state 102 | |
2280 | + label go to state 423 | |
2281 | ordinal go to state 103 | |
2282 | optional_ordinal_last go to state 104 | |
2283 | nth_primitive go to state 105 | |
2284 | @@ -6475,7 +6475,7 @@ | |
2285 | ||
2286 | expr_pair go to state 280 | |
2287 | place go to state 114 | |
2288 | - label go to state 102 | |
2289 | + label go to state 423 | |
2290 | ordinal go to state 103 | |
2291 | optional_ordinal_last go to state 104 | |
2292 | nth_primitive go to state 105 | |
2293 | @@ -6633,7 +6633,7 @@ | |
2294 | $default reduce using rule 105 (object_spec) | |
2295 | ||
2296 | place go to state 114 | |
2297 | - label go to state 102 | |
2298 | + label go to state 423 | |
2299 | ordinal go to state 103 | |
2300 | optional_ordinal_last go to state 104 | |
2301 | nth_primitive go to state 105 | |
2302 | @@ -6825,7 +6825,7 @@ | |
2303 | $default reduce using rule 107 (object_spec) | |
2304 | ||
2305 | place go to state 114 | |
2306 | - label go to state 102 | |
2307 | + label go to state 423 | |
2308 | ordinal go to state 103 | |
2309 | optional_ordinal_last go to state 104 | |
2310 | nth_primitive go to state 105 | |
2311 | @@ -7017,7 +7017,7 @@ | |
2312 | $default reduce using rule 114 (object_spec) | |
2313 | ||
2314 | place go to state 114 | |
2315 | - label go to state 102 | |
2316 | + label go to state 423 | |
2317 | ordinal go to state 103 | |
2318 | optional_ordinal_last go to state 104 | |
2319 | nth_primitive go to state 105 | |
2320 | @@ -7264,7 +7264,7 @@ | |
2321 | '!' shift, and go to state 94 | |
2322 | ||
2323 | place go to state 114 | |
2324 | - label go to state 102 | |
2325 | + label go to state 423 | |
2326 | ordinal go to state 103 | |
2327 | optional_ordinal_last go to state 104 | |
2328 | nth_primitive go to state 105 | |
2329 | @@ -7408,7 +7408,7 @@ | |
2330 | $default reduce using rule 109 (object_spec) | |
2331 | ||
2332 | place go to state 114 | |
2333 | - label go to state 102 | |
2334 | + label go to state 423 | |
2335 | ordinal go to state 103 | |
2336 | optional_ordinal_last go to state 104 | |
2337 | nth_primitive go to state 105 | |
2338 | @@ -7819,12 +7819,12 @@ | |
2339 | position_not_place go to state 296 | |
2340 | expr_pair go to state 100 | |
2341 | place go to state 297 | |
2342 | - label go to state 102 | |
2343 | + label go to state 423 | |
2344 | ordinal go to state 103 | |
2345 | optional_ordinal_last go to state 104 | |
2346 | nth_primitive go to state 105 | |
2347 | corner go to state 106 | |
2348 | - expr go to state 266 | |
2349 | + expr go to state 424 | |
2350 | ||
2351 | ||
d42fe46e | 2352 | State 165 |
db34f798 JD |
2353 | @@ -7987,7 +7987,7 @@ |
2354 | text_expr go to state 112 | |
2355 | text go to state 113 | |
2356 | place go to state 114 | |
2357 | - label go to state 102 | |
2358 | + label go to state 423 | |
2359 | ordinal go to state 103 | |
2360 | optional_ordinal_last go to state 104 | |
2361 | nth_primitive go to state 105 | |
2362 | @@ -8172,7 +8172,7 @@ | |
2363 | text_expr go to state 112 | |
2364 | text go to state 113 | |
2365 | place go to state 114 | |
2366 | - label go to state 102 | |
2367 | + label go to state 423 | |
2368 | ordinal go to state 103 | |
2369 | optional_ordinal_last go to state 104 | |
2370 | nth_primitive go to state 105 | |
2371 | @@ -8333,7 +8333,7 @@ | |
2372 | text_expr go to state 112 | |
2373 | text go to state 113 | |
2374 | place go to state 114 | |
2375 | - label go to state 102 | |
2376 | + label go to state 423 | |
2377 | ordinal go to state 103 | |
2378 | optional_ordinal_last go to state 104 | |
2379 | nth_primitive go to state 105 | |
2380 | @@ -8494,7 +8494,7 @@ | |
2381 | text_expr go to state 112 | |
2382 | text go to state 113 | |
2383 | place go to state 114 | |
2384 | - label go to state 102 | |
2385 | + label go to state 423 | |
2386 | ordinal go to state 103 | |
2387 | optional_ordinal_last go to state 104 | |
2388 | nth_primitive go to state 105 | |
2389 | @@ -8655,7 +8655,7 @@ | |
2390 | text_expr go to state 112 | |
2391 | text go to state 113 | |
2392 | place go to state 114 | |
2393 | - label go to state 102 | |
2394 | + label go to state 423 | |
2395 | ordinal go to state 103 | |
2396 | optional_ordinal_last go to state 104 | |
2397 | nth_primitive go to state 105 | |
2398 | @@ -8816,7 +8816,7 @@ | |
2399 | text_expr go to state 112 | |
2400 | text go to state 113 | |
2401 | place go to state 114 | |
2402 | - label go to state 102 | |
2403 | + label go to state 423 | |
2404 | ordinal go to state 103 | |
2405 | optional_ordinal_last go to state 104 | |
2406 | nth_primitive go to state 105 | |
2407 | @@ -8977,7 +8977,7 @@ | |
2408 | text_expr go to state 112 | |
2409 | text go to state 113 | |
2410 | place go to state 114 | |
2411 | - label go to state 102 | |
2412 | + label go to state 423 | |
2413 | ordinal go to state 103 | |
2414 | optional_ordinal_last go to state 104 | |
2415 | nth_primitive go to state 105 | |
2416 | @@ -9138,7 +9138,7 @@ | |
2417 | text_expr go to state 112 | |
2418 | text go to state 113 | |
2419 | place go to state 114 | |
2420 | - label go to state 102 | |
2421 | + label go to state 423 | |
2422 | ordinal go to state 103 | |
2423 | optional_ordinal_last go to state 104 | |
2424 | nth_primitive go to state 105 | |
2425 | @@ -9299,7 +9299,7 @@ | |
2426 | text_expr go to state 112 | |
2427 | text go to state 113 | |
2428 | place go to state 114 | |
2429 | - label go to state 102 | |
2430 | + label go to state 423 | |
2431 | ordinal go to state 103 | |
2432 | optional_ordinal_last go to state 104 | |
2433 | nth_primitive go to state 105 | |
2434 | @@ -9460,7 +9460,7 @@ | |
2435 | text_expr go to state 112 | |
2436 | text go to state 113 | |
2437 | place go to state 114 | |
2438 | - label go to state 102 | |
2439 | + label go to state 423 | |
2440 | ordinal go to state 103 | |
2441 | optional_ordinal_last go to state 104 | |
2442 | nth_primitive go to state 105 | |
2443 | @@ -9623,7 +9623,7 @@ | |
2444 | text_expr go to state 112 | |
2445 | text go to state 113 | |
2446 | place go to state 114 | |
2447 | - label go to state 102 | |
2448 | + label go to state 423 | |
2449 | ordinal go to state 103 | |
2450 | optional_ordinal_last go to state 104 | |
2451 | nth_primitive go to state 105 | |
2452 | @@ -9784,7 +9784,7 @@ | |
2453 | text_expr go to state 112 | |
2454 | text go to state 113 | |
2455 | place go to state 114 | |
2456 | - label go to state 102 | |
2457 | + label go to state 423 | |
2458 | ordinal go to state 103 | |
2459 | optional_ordinal_last go to state 104 | |
2460 | nth_primitive go to state 105 | |
2461 | @@ -9921,7 +9921,7 @@ | |
2462 | ||
2463 | $default reduce using rule 47 (any_expr) | |
2464 | ||
2465 | - between go to state 237 | |
2466 | + between go to state 425 | |
2467 | ||
2468 | ||
d42fe46e | 2469 | State 193 |
db34f798 JD |
2470 | @@ -10152,7 +10152,7 @@ |
2471 | ||
2472 | expr_pair go to state 317 | |
2473 | place go to state 114 | |
2474 | - label go to state 102 | |
2475 | + label go to state 423 | |
2476 | ordinal go to state 103 | |
2477 | optional_ordinal_last go to state 104 | |
2478 | nth_primitive go to state 105 | |
2479 | @@ -10298,7 +10298,7 @@ | |
2480 | ||
2481 | expr_pair go to state 318 | |
2482 | place go to state 114 | |
2483 | - label go to state 102 | |
2484 | + label go to state 423 | |
2485 | ordinal go to state 103 | |
2486 | optional_ordinal_last go to state 104 | |
2487 | nth_primitive go to state 105 | |
2488 | @@ -10622,7 +10622,7 @@ | |
2489 | '!' shift, and go to state 94 | |
2490 | ||
2491 | place go to state 114 | |
2492 | - label go to state 102 | |
2493 | + label go to state 423 | |
2494 | ordinal go to state 103 | |
2495 | optional_ordinal_last go to state 104 | |
2496 | nth_primitive go to state 105 | |
2497 | @@ -10765,7 +10765,7 @@ | |
2498 | '!' shift, and go to state 94 | |
2499 | ||
2500 | place go to state 114 | |
2501 | - label go to state 102 | |
2502 | + label go to state 423 | |
2503 | ordinal go to state 103 | |
2504 | optional_ordinal_last go to state 104 | |
2505 | nth_primitive go to state 105 | |
2506 | @@ -10908,7 +10908,7 @@ | |
2507 | '!' shift, and go to state 94 | |
2508 | ||
2509 | place go to state 114 | |
2510 | - label go to state 102 | |
2511 | + label go to state 423 | |
2512 | ordinal go to state 103 | |
2513 | optional_ordinal_last go to state 104 | |
2514 | nth_primitive go to state 105 | |
2515 | @@ -11051,7 +11051,7 @@ | |
2516 | '!' shift, and go to state 94 | |
2517 | ||
2518 | place go to state 114 | |
2519 | - label go to state 102 | |
2520 | + label go to state 423 | |
2521 | ordinal go to state 103 | |
2522 | optional_ordinal_last go to state 104 | |
2523 | nth_primitive go to state 105 | |
2524 | @@ -11194,7 +11194,7 @@ | |
2525 | '!' shift, and go to state 94 | |
2526 | ||
2527 | place go to state 114 | |
2528 | - label go to state 102 | |
2529 | + label go to state 423 | |
2530 | ordinal go to state 103 | |
2531 | optional_ordinal_last go to state 104 | |
2532 | nth_primitive go to state 105 | |
2533 | @@ -11337,7 +11337,7 @@ | |
2534 | '!' shift, and go to state 94 | |
2535 | ||
2536 | place go to state 114 | |
2537 | - label go to state 102 | |
2538 | + label go to state 423 | |
2539 | ordinal go to state 103 | |
2540 | optional_ordinal_last go to state 104 | |
2541 | nth_primitive go to state 105 | |
2542 | @@ -11480,7 +11480,7 @@ | |
2543 | '!' shift, and go to state 94 | |
2544 | ||
2545 | place go to state 114 | |
2546 | - label go to state 102 | |
2547 | + label go to state 423 | |
2548 | ordinal go to state 103 | |
2549 | optional_ordinal_last go to state 104 | |
2550 | nth_primitive go to state 105 | |
2551 | @@ -11637,7 +11637,7 @@ | |
2552 | position_not_place go to state 99 | |
2553 | expr_pair go to state 100 | |
2554 | place go to state 101 | |
2555 | - label go to state 102 | |
2556 | + label go to state 423 | |
2557 | ordinal go to state 103 | |
2558 | optional_ordinal_last go to state 104 | |
2559 | nth_primitive go to state 105 | |
2560 | @@ -11780,7 +11780,7 @@ | |
2561 | '!' shift, and go to state 94 | |
2562 | ||
2563 | place go to state 114 | |
2564 | - label go to state 102 | |
2565 | + label go to state 423 | |
2566 | ordinal go to state 103 | |
2567 | optional_ordinal_last go to state 104 | |
2568 | nth_primitive go to state 105 | |
2569 | @@ -11923,7 +11923,7 @@ | |
2570 | '!' shift, and go to state 94 | |
2571 | ||
2572 | place go to state 114 | |
2573 | - label go to state 102 | |
2574 | + label go to state 423 | |
2575 | ordinal go to state 103 | |
2576 | optional_ordinal_last go to state 104 | |
2577 | nth_primitive go to state 105 | |
2578 | @@ -12066,7 +12066,7 @@ | |
2579 | '!' shift, and go to state 94 | |
2580 | ||
2581 | place go to state 114 | |
2582 | - label go to state 102 | |
2583 | + label go to state 423 | |
2584 | ordinal go to state 103 | |
2585 | optional_ordinal_last go to state 104 | |
2586 | nth_primitive go to state 105 | |
2587 | @@ -12209,7 +12209,7 @@ | |
2588 | '!' shift, and go to state 94 | |
2589 | ||
2590 | place go to state 114 | |
2591 | - label go to state 102 | |
2592 | + label go to state 423 | |
2593 | ordinal go to state 103 | |
2594 | optional_ordinal_last go to state 104 | |
2595 | nth_primitive go to state 105 | |
2596 | @@ -12352,7 +12352,7 @@ | |
2597 | '!' shift, and go to state 94 | |
2598 | ||
2599 | place go to state 114 | |
2600 | - label go to state 102 | |
2601 | + label go to state 423 | |
2602 | ordinal go to state 103 | |
2603 | optional_ordinal_last go to state 104 | |
2604 | nth_primitive go to state 105 | |
2605 | @@ -12495,7 +12495,7 @@ | |
2606 | '!' shift, and go to state 94 | |
2607 | ||
2608 | place go to state 114 | |
2609 | - label go to state 102 | |
2610 | + label go to state 423 | |
2611 | ordinal go to state 103 | |
2612 | optional_ordinal_last go to state 104 | |
2613 | nth_primitive go to state 105 | |
2614 | @@ -12638,7 +12638,7 @@ | |
2615 | '!' shift, and go to state 94 | |
2616 | ||
2617 | place go to state 114 | |
2618 | - label go to state 102 | |
2619 | + label go to state 423 | |
2620 | ordinal go to state 103 | |
2621 | optional_ordinal_last go to state 104 | |
2622 | nth_primitive go to state 105 | |
2623 | @@ -12794,12 +12794,12 @@ | |
2624 | position_not_place go to state 99 | |
2625 | expr_pair go to state 100 | |
2626 | place go to state 101 | |
2627 | - label go to state 102 | |
2628 | + label go to state 423 | |
2629 | ordinal go to state 103 | |
2630 | optional_ordinal_last go to state 104 | |
2631 | nth_primitive go to state 105 | |
2632 | corner go to state 106 | |
2633 | - expr go to state 266 | |
2634 | + expr go to state 424 | |
2635 | ||
2636 | ||
d42fe46e | 2637 | State 238 |
db34f798 JD |
2638 | @@ -12937,7 +12937,7 @@ |
2639 | '!' shift, and go to state 94 | |
2640 | ||
2641 | place go to state 114 | |
2642 | - label go to state 102 | |
2643 | + label go to state 423 | |
2644 | ordinal go to state 103 | |
2645 | optional_ordinal_last go to state 104 | |
2646 | nth_primitive go to state 105 | |
2647 | @@ -13160,7 +13160,7 @@ | |
2648 | text_expr go to state 342 | |
2649 | text go to state 113 | |
2650 | place go to state 114 | |
2651 | - label go to state 102 | |
2652 | + label go to state 423 | |
2653 | ordinal go to state 103 | |
2654 | optional_ordinal_last go to state 104 | |
2655 | nth_primitive go to state 105 | |
2656 | @@ -13319,7 +13319,7 @@ | |
2657 | text_expr go to state 344 | |
2658 | text go to state 113 | |
2659 | place go to state 114 | |
2660 | - label go to state 102 | |
2661 | + label go to state 423 | |
2662 | ordinal go to state 103 | |
2663 | optional_ordinal_last go to state 104 | |
2664 | nth_primitive go to state 105 | |
2665 | @@ -13502,7 +13502,7 @@ | |
2666 | text_expr go to state 348 | |
2667 | text go to state 113 | |
2668 | place go to state 114 | |
2669 | - label go to state 102 | |
2670 | + label go to state 423 | |
2671 | ordinal go to state 103 | |
2672 | optional_ordinal_last go to state 104 | |
2673 | nth_primitive go to state 105 | |
2674 | @@ -13661,7 +13661,7 @@ | |
2675 | text_expr go to state 350 | |
2676 | text go to state 113 | |
2677 | place go to state 114 | |
2678 | - label go to state 102 | |
2679 | + label go to state 423 | |
2680 | ordinal go to state 103 | |
2681 | optional_ordinal_last go to state 104 | |
2682 | nth_primitive go to state 105 | |
2683 | @@ -13804,7 +13804,7 @@ | |
2684 | '!' shift, and go to state 94 | |
2685 | ||
2686 | place go to state 114 | |
2687 | - label go to state 102 | |
2688 | + label go to state 423 | |
2689 | ordinal go to state 103 | |
2690 | optional_ordinal_last go to state 104 | |
2691 | nth_primitive go to state 105 | |
2692 | @@ -14747,7 +14747,7 @@ | |
2693 | position_not_place go to state 99 | |
2694 | expr_pair go to state 191 | |
2695 | place go to state 101 | |
2696 | - label go to state 102 | |
2697 | + label go to state 423 | |
2698 | ordinal go to state 103 | |
2699 | optional_ordinal_last go to state 104 | |
2700 | nth_primitive go to state 105 | |
2701 | @@ -15074,7 +15074,7 @@ | |
2702 | text go to state 113 | |
2703 | expr_pair go to state 365 | |
2704 | place go to state 114 | |
2705 | - label go to state 102 | |
2706 | + label go to state 423 | |
2707 | ordinal go to state 103 | |
2708 | optional_ordinal_last go to state 104 | |
2709 | nth_primitive go to state 105 | |
2710 | @@ -15693,12 +15693,12 @@ | |
2711 | position_not_place go to state 99 | |
2712 | expr_pair go to state 100 | |
2713 | place go to state 101 | |
2714 | - label go to state 102 | |
2715 | + label go to state 423 | |
2716 | ordinal go to state 103 | |
2717 | optional_ordinal_last go to state 104 | |
2718 | nth_primitive go to state 105 | |
2719 | corner go to state 106 | |
2720 | - expr go to state 266 | |
2721 | + expr go to state 424 | |
2722 | ||
2723 | ||
d42fe46e | 2724 | State 315 |
db34f798 JD |
2725 | @@ -16124,7 +16124,7 @@ |
2726 | ||
2727 | $default reduce using rule 239 (expr) | |
2728 | ||
2729 | - between go to state 237 | |
2730 | + between go to state 425 | |
2731 | ||
2732 | Conflict between rule 239 and token OF resolved as shift ('<' < OF). | |
2733 | Conflict between rule 239 and token BETWEEN resolved as shift ('<' < BETWEEN). | |
2734 | @@ -17234,7 +17234,7 @@ | |
2735 | text_expr go to state 112 | |
2736 | text go to state 113 | |
2737 | place go to state 114 | |
2738 | - label go to state 102 | |
2739 | + label go to state 423 | |
2740 | ordinal go to state 103 | |
2741 | optional_ordinal_last go to state 104 | |
2742 | nth_primitive go to state 105 | |
2743 | @@ -17416,7 +17416,7 @@ | |
2744 | text_expr go to state 112 | |
2745 | text go to state 113 | |
2746 | place go to state 114 | |
2747 | - label go to state 102 | |
2748 | + label go to state 423 | |
2749 | ordinal go to state 103 | |
2750 | optional_ordinal_last go to state 104 | |
2751 | nth_primitive go to state 105 | |
2752 | @@ -17577,7 +17577,7 @@ | |
2753 | text_expr go to state 112 | |
2754 | text go to state 113 | |
2755 | place go to state 114 | |
2756 | - label go to state 102 | |
2757 | + label go to state 423 | |
2758 | ordinal go to state 103 | |
2759 | optional_ordinal_last go to state 104 | |
2760 | nth_primitive go to state 105 | |
2761 | @@ -17772,12 +17772,12 @@ | |
2762 | position_not_place go to state 99 | |
2763 | expr_pair go to state 100 | |
2764 | place go to state 101 | |
2765 | - label go to state 102 | |
2766 | + label go to state 423 | |
2767 | ordinal go to state 103 | |
2768 | optional_ordinal_last go to state 104 | |
2769 | nth_primitive go to state 105 | |
2770 | corner go to state 106 | |
2771 | - expr go to state 266 | |
2772 | + expr go to state 424 | |
2773 | ||
2774 | ||
d42fe46e | 2775 | State 383 |
db34f798 JD |
2776 | @@ -18071,7 +18071,7 @@ |
2777 | '!' shift, and go to state 94 | |
2778 | ||
2779 | place go to state 114 | |
2780 | - label go to state 102 | |
2781 | + label go to state 423 | |
2782 | ordinal go to state 103 | |
2783 | optional_ordinal_last go to state 104 | |
2784 | nth_primitive go to state 105 | |
2785 | @@ -18221,7 +18221,7 @@ | |
2786 | '!' shift, and go to state 94 | |
2787 | ||
2788 | place go to state 114 | |
2789 | - label go to state 102 | |
2790 | + label go to state 423 | |
2791 | ordinal go to state 103 | |
2792 | optional_ordinal_last go to state 104 | |
2793 | nth_primitive go to state 105 | |
2794 | @@ -18830,7 +18830,7 @@ | |
2795 | '!' shift, and go to state 94 | |
2796 | ||
2797 | place go to state 114 | |
2798 | - label go to state 102 | |
2799 | + label go to state 423 | |
2800 | ordinal go to state 103 | |
2801 | optional_ordinal_last go to state 104 | |
2802 | nth_primitive go to state 105 | |
2803 | @@ -18987,7 +18987,7 @@ | |
2804 | '!' shift, and go to state 94 | |
2805 | ||
2806 | place go to state 114 | |
2807 | - label go to state 102 | |
2808 | + label go to state 423 | |
2809 | ordinal go to state 103 | |
2810 | optional_ordinal_last go to state 104 | |
2811 | nth_primitive go to state 105 | |
2812 | @@ -19089,3 +19089,440 @@ | |
2813 | 29 placeless_element: FOR VARIABLE '=' expr TO expr optional_by DO $@6 DELIMITED . | |
2814 | ||
2815 | $default reduce using rule 29 (placeless_element) | |
2816 | + | |
2817 | + | |
d42fe46e | 2818 | +State 423 |
db34f798 JD |
2819 | + |
2820 | + 146 place: label . [$end, AND, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, ',', '>', '+', '-', ';', '}', '@:>@', ')'] | |
2821 | + 147 | label . corner | |
2822 | + 153 label: label . '.' LABEL | |
2823 | + 180 corner: . DOT_N | |
2824 | + 181 | . DOT_E | |
2825 | + 182 | . DOT_W | |
2826 | + 183 | . DOT_S | |
2827 | + 184 | . DOT_NE | |
2828 | + 185 | . DOT_SE | |
2829 | + 186 | . DOT_NW | |
2830 | + 187 | . DOT_SW | |
2831 | + 188 | . DOT_C | |
2832 | + 189 | . DOT_START | |
2833 | + 190 | . DOT_END | |
2834 | + 191 | . TOP | |
2835 | + 192 | . BOTTOM | |
2836 | + 193 | . LEFT | |
2837 | + 194 | . RIGHT | |
2838 | + 195 | . UPPER LEFT | |
2839 | + 196 | . LOWER LEFT | |
2840 | + 197 | . UPPER RIGHT | |
2841 | + 198 | . LOWER RIGHT | |
2842 | + 199 | . LEFT_CORNER | |
2843 | + 200 | . RIGHT_CORNER | |
2844 | + 201 | . UPPER LEFT_CORNER | |
2845 | + 202 | . LOWER LEFT_CORNER | |
2846 | + 203 | . UPPER RIGHT_CORNER | |
2847 | + 204 | . LOWER RIGHT_CORNER | |
2848 | + 205 | . NORTH | |
2849 | + 206 | . SOUTH | |
2850 | + 207 | . EAST | |
2851 | + 208 | . WEST | |
2852 | + 209 | . CENTER | |
2853 | + 210 | . START | |
2854 | + 211 | . END | |
2855 | + | |
2856 | + LEFT shift, and go to state 53 | |
2857 | + RIGHT shift, and go to state 54 | |
2858 | + DOT_N shift, and go to state 56 | |
2859 | + DOT_E shift, and go to state 57 | |
2860 | + DOT_W shift, and go to state 58 | |
2861 | + DOT_S shift, and go to state 59 | |
2862 | + DOT_NE shift, and go to state 60 | |
2863 | + DOT_SE shift, and go to state 61 | |
2864 | + DOT_NW shift, and go to state 62 | |
2865 | + DOT_SW shift, and go to state 63 | |
2866 | + DOT_C shift, and go to state 64 | |
2867 | + DOT_START shift, and go to state 65 | |
2868 | + DOT_END shift, and go to state 66 | |
2869 | + TOP shift, and go to state 78 | |
2870 | + BOTTOM shift, and go to state 79 | |
2871 | + UPPER shift, and go to state 80 | |
2872 | + LOWER shift, and go to state 81 | |
2873 | + LEFT_CORNER shift, and go to state 82 | |
2874 | + RIGHT_CORNER shift, and go to state 83 | |
2875 | + NORTH shift, and go to state 84 | |
2876 | + SOUTH shift, and go to state 85 | |
2877 | + EAST shift, and go to state 86 | |
2878 | + WEST shift, and go to state 87 | |
2879 | + CENTER shift, and go to state 88 | |
2880 | + END shift, and go to state 89 | |
2881 | + START shift, and go to state 90 | |
2882 | + '.' shift, and go to state 204 | |
2883 | + | |
2884 | + $default reduce using rule 146 (place) | |
2885 | + | |
2886 | + corner go to state 205 | |
2887 | + | |
2888 | + | |
d42fe46e | 2889 | +State 424 |
db34f798 JD |
2890 | + |
2891 | + 140 position_not_place: expr . between position AND position | |
2892 | + 141 | expr . '<' position ',' position '>' | |
2893 | + 142 between: . BETWEEN | |
2894 | + 143 | . OF THE WAY BETWEEN | |
2895 | + 144 expr_pair: expr . ',' expr | |
2896 | + 219 expr: expr . '+' expr | |
2897 | + 220 | expr . '-' expr | |
2898 | + 221 | expr . '*' expr | |
2899 | + 222 | expr . '/' expr | |
2900 | + 223 | expr . '%' expr | |
2901 | + 224 | expr . '^' expr | |
2902 | + 239 | expr . '<' expr | |
2903 | + 240 | expr . LESSEQUAL expr | |
2904 | + 241 | expr . '>' expr | |
2905 | + 242 | expr . GREATEREQUAL expr | |
2906 | + 243 | expr . EQUALEQUAL expr | |
2907 | + 244 | expr . NOTEQUAL expr | |
2908 | + 245 | expr . ANDAND expr | |
2909 | + 246 | expr . OROR expr | |
2910 | + | |
2911 | + OF shift, and go to state 220 | |
2912 | + BETWEEN shift, and go to state 221 | |
2913 | + ANDAND shift, and go to state 222 | |
2914 | + OROR shift, and go to state 223 | |
2915 | + NOTEQUAL shift, and go to state 224 | |
2916 | + EQUALEQUAL shift, and go to state 225 | |
2917 | + LESSEQUAL shift, and go to state 226 | |
2918 | + GREATEREQUAL shift, and go to state 227 | |
2919 | + ',' shift, and go to state 228 | |
2920 | + '<' shift, and go to state 229 | |
2921 | + '>' shift, and go to state 230 | |
2922 | + '+' shift, and go to state 231 | |
2923 | + '-' shift, and go to state 232 | |
2924 | + '*' shift, and go to state 233 | |
2925 | + '/' shift, and go to state 234 | |
2926 | + '%' shift, and go to state 235 | |
2927 | + '^' shift, and go to state 236 | |
2928 | + | |
2929 | + between go to state 425 | |
2930 | + | |
2931 | + | |
d42fe46e | 2932 | +State 425 |
db34f798 JD |
2933 | + |
2934 | + 134 position: . position_not_place | |
2935 | + 135 | . place | |
2936 | + 136 position_not_place: . expr_pair | |
2937 | + 137 | . position '+' expr_pair | |
2938 | + 138 | . position '-' expr_pair | |
2939 | + 139 | . '(' position ',' position ')' | |
2940 | + 140 | . expr between position AND position | |
2941 | + 140 | expr between . position AND position | |
2942 | + 141 | . expr '<' position ',' position '>' | |
2943 | + 144 expr_pair: . expr ',' expr | |
2944 | + 145 | . '(' expr_pair ')' | |
2945 | + 146 place: . label | |
2946 | + 147 | . label corner | |
2947 | + 148 | . corner label | |
2948 | + 149 | . corner OF label | |
2949 | + 150 | . HERE | |
2950 | + 151 label: . LABEL | |
2951 | + 152 | . nth_primitive | |
2952 | + 153 | . label '.' LABEL | |
2953 | + 154 ordinal: . ORDINAL | |
2954 | + 155 | . '`' any_expr TH | |
2955 | + 156 optional_ordinal_last: . LAST | |
2956 | + 157 | . ordinal LAST | |
2957 | + 158 nth_primitive: . ordinal object_type | |
2958 | + 159 | . optional_ordinal_last object_type | |
2959 | + 180 corner: . DOT_N | |
2960 | + 181 | . DOT_E | |
2961 | + 182 | . DOT_W | |
2962 | + 183 | . DOT_S | |
2963 | + 184 | . DOT_NE | |
2964 | + 185 | . DOT_SE | |
2965 | + 186 | . DOT_NW | |
2966 | + 187 | . DOT_SW | |
2967 | + 188 | . DOT_C | |
2968 | + 189 | . DOT_START | |
2969 | + 190 | . DOT_END | |
2970 | + 191 | . TOP | |
2971 | + 192 | . BOTTOM | |
2972 | + 193 | . LEFT | |
2973 | + 194 | . RIGHT | |
2974 | + 195 | . UPPER LEFT | |
2975 | + 196 | . LOWER LEFT | |
2976 | + 197 | . UPPER RIGHT | |
2977 | + 198 | . LOWER RIGHT | |
2978 | + 199 | . LEFT_CORNER | |
2979 | + 200 | . RIGHT_CORNER | |
2980 | + 201 | . UPPER LEFT_CORNER | |
2981 | + 202 | . LOWER LEFT_CORNER | |
2982 | + 203 | . UPPER RIGHT_CORNER | |
2983 | + 204 | . LOWER RIGHT_CORNER | |
2984 | + 205 | . NORTH | |
2985 | + 206 | . SOUTH | |
2986 | + 207 | . EAST | |
2987 | + 208 | . WEST | |
2988 | + 209 | . CENTER | |
2989 | + 210 | . START | |
2990 | + 211 | . END | |
2991 | + 212 expr: . VARIABLE | |
2992 | + 213 | . NUMBER | |
2993 | + 214 | . place DOT_X | |
2994 | + 215 | . place DOT_Y | |
2995 | + 216 | . place DOT_HT | |
2996 | + 217 | . place DOT_WID | |
2997 | + 218 | . place DOT_RAD | |
2998 | + 219 | . expr '+' expr | |
2999 | + 220 | . expr '-' expr | |
3000 | + 221 | . expr '*' expr | |
3001 | + 222 | . expr '/' expr | |
3002 | + 223 | . expr '%' expr | |
3003 | + 224 | . expr '^' expr | |
3004 | + 225 | . '-' expr | |
3005 | + 226 | . '(' any_expr ')' | |
3006 | + 227 | . SIN '(' any_expr ')' | |
3007 | + 228 | . COS '(' any_expr ')' | |
3008 | + 229 | . ATAN2 '(' any_expr ',' any_expr ')' | |
3009 | + 230 | . LOG '(' any_expr ')' | |
3010 | + 231 | . EXP '(' any_expr ')' | |
3011 | + 232 | . SQRT '(' any_expr ')' | |
3012 | + 233 | . K_MAX '(' any_expr ',' any_expr ')' | |
3013 | + 234 | . K_MIN '(' any_expr ',' any_expr ')' | |
3014 | + 235 | . INT '(' any_expr ')' | |
3015 | + 236 | . RAND '(' any_expr ')' | |
3016 | + 237 | . RAND '(' ')' | |
3017 | + 238 | . SRAND '(' any_expr ')' | |
3018 | + 239 | . expr '<' expr | |
3019 | + 240 | . expr LESSEQUAL expr | |
3020 | + 241 | . expr '>' expr | |
3021 | + 242 | . expr GREATEREQUAL expr | |
3022 | + 243 | . expr EQUALEQUAL expr | |
3023 | + 244 | . expr NOTEQUAL expr | |
3024 | + 245 | . expr ANDAND expr | |
3025 | + 246 | . expr OROR expr | |
3026 | + 247 | . '!' expr | |
3027 | + | |
3028 | + LABEL shift, and go to state 48 | |
3029 | + VARIABLE shift, and go to state 49 | |
3030 | + NUMBER shift, and go to state 50 | |
3031 | + ORDINAL shift, and go to state 51 | |
3032 | + LAST shift, and go to state 52 | |
3033 | + LEFT shift, and go to state 53 | |
3034 | + RIGHT shift, and go to state 54 | |
3035 | + HERE shift, and go to state 55 | |
3036 | + DOT_N shift, and go to state 56 | |
3037 | + DOT_E shift, and go to state 57 | |
3038 | + DOT_W shift, and go to state 58 | |
3039 | + DOT_S shift, and go to state 59 | |
3040 | + DOT_NE shift, and go to state 60 | |
3041 | + DOT_SE shift, and go to state 61 | |
3042 | + DOT_NW shift, and go to state 62 | |
3043 | + DOT_SW shift, and go to state 63 | |
3044 | + DOT_C shift, and go to state 64 | |
3045 | + DOT_START shift, and go to state 65 | |
3046 | + DOT_END shift, and go to state 66 | |
3047 | + SIN shift, and go to state 67 | |
3048 | + COS shift, and go to state 68 | |
3049 | + ATAN2 shift, and go to state 69 | |
3050 | + LOG shift, and go to state 70 | |
3051 | + EXP shift, and go to state 71 | |
3052 | + SQRT shift, and go to state 72 | |
3053 | + K_MAX shift, and go to state 73 | |
3054 | + K_MIN shift, and go to state 74 | |
3055 | + INT shift, and go to state 75 | |
3056 | + RAND shift, and go to state 76 | |
3057 | + SRAND shift, and go to state 77 | |
3058 | + TOP shift, and go to state 78 | |
3059 | + BOTTOM shift, and go to state 79 | |
3060 | + UPPER shift, and go to state 80 | |
3061 | + LOWER shift, and go to state 81 | |
3062 | + LEFT_CORNER shift, and go to state 82 | |
3063 | + RIGHT_CORNER shift, and go to state 83 | |
3064 | + NORTH shift, and go to state 84 | |
3065 | + SOUTH shift, and go to state 85 | |
3066 | + EAST shift, and go to state 86 | |
3067 | + WEST shift, and go to state 87 | |
3068 | + CENTER shift, and go to state 88 | |
3069 | + END shift, and go to state 89 | |
3070 | + START shift, and go to state 90 | |
3071 | + '(' shift, and go to state 91 | |
3072 | + '`' shift, and go to state 92 | |
3073 | + '-' shift, and go to state 93 | |
3074 | + '!' shift, and go to state 94 | |
3075 | + | |
3076 | + position go to state 426 | |
3077 | + position_not_place go to state 99 | |
3078 | + expr_pair go to state 100 | |
3079 | + place go to state 101 | |
3080 | + label go to state 423 | |
3081 | + ordinal go to state 103 | |
3082 | + optional_ordinal_last go to state 104 | |
3083 | + nth_primitive go to state 105 | |
3084 | + corner go to state 106 | |
3085 | + expr go to state 424 | |
3086 | + | |
3087 | + | |
d42fe46e | 3088 | +State 426 |
db34f798 JD |
3089 | + |
3090 | + 137 position_not_place: position . '+' expr_pair | |
3091 | + 138 | position . '-' expr_pair | |
3092 | + 140 | expr between position . AND position | |
3093 | + | |
3094 | + AND shift, and go to state 427 | |
3095 | + '+' shift, and go to state 197 | |
3096 | + '-' shift, and go to state 198 | |
3097 | + | |
3098 | + | |
d42fe46e | 3099 | +State 427 |
db34f798 JD |
3100 | + |
3101 | + 134 position: . position_not_place | |
3102 | + 135 | . place | |
3103 | + 136 position_not_place: . expr_pair | |
3104 | + 137 | . position '+' expr_pair | |
3105 | + 138 | . position '-' expr_pair | |
3106 | + 139 | . '(' position ',' position ')' | |
3107 | + 140 | . expr between position AND position | |
3108 | + 140 | expr between position AND . position | |
3109 | + 141 | . expr '<' position ',' position '>' | |
3110 | + 144 expr_pair: . expr ',' expr | |
3111 | + 145 | . '(' expr_pair ')' | |
3112 | + 146 place: . label | |
3113 | + 147 | . label corner | |
3114 | + 148 | . corner label | |
3115 | + 149 | . corner OF label | |
3116 | + 150 | . HERE | |
3117 | + 151 label: . LABEL | |
3118 | + 152 | . nth_primitive | |
3119 | + 153 | . label '.' LABEL | |
3120 | + 154 ordinal: . ORDINAL | |
3121 | + 155 | . '`' any_expr TH | |
3122 | + 156 optional_ordinal_last: . LAST | |
3123 | + 157 | . ordinal LAST | |
3124 | + 158 nth_primitive: . ordinal object_type | |
3125 | + 159 | . optional_ordinal_last object_type | |
3126 | + 180 corner: . DOT_N | |
3127 | + 181 | . DOT_E | |
3128 | + 182 | . DOT_W | |
3129 | + 183 | . DOT_S | |
3130 | + 184 | . DOT_NE | |
3131 | + 185 | . DOT_SE | |
3132 | + 186 | . DOT_NW | |
3133 | + 187 | . DOT_SW | |
3134 | + 188 | . DOT_C | |
3135 | + 189 | . DOT_START | |
3136 | + 190 | . DOT_END | |
3137 | + 191 | . TOP | |
3138 | + 192 | . BOTTOM | |
3139 | + 193 | . LEFT | |
3140 | + 194 | . RIGHT | |
3141 | + 195 | . UPPER LEFT | |
3142 | + 196 | . LOWER LEFT | |
3143 | + 197 | . UPPER RIGHT | |
3144 | + 198 | . LOWER RIGHT | |
3145 | + 199 | . LEFT_CORNER | |
3146 | + 200 | . RIGHT_CORNER | |
3147 | + 201 | . UPPER LEFT_CORNER | |
3148 | + 202 | . LOWER LEFT_CORNER | |
3149 | + 203 | . UPPER RIGHT_CORNER | |
3150 | + 204 | . LOWER RIGHT_CORNER | |
3151 | + 205 | . NORTH | |
3152 | + 206 | . SOUTH | |
3153 | + 207 | . EAST | |
3154 | + 208 | . WEST | |
3155 | + 209 | . CENTER | |
3156 | + 210 | . START | |
3157 | + 211 | . END | |
3158 | + 212 expr: . VARIABLE | |
3159 | + 213 | . NUMBER | |
3160 | + 214 | . place DOT_X | |
3161 | + 215 | . place DOT_Y | |
3162 | + 216 | . place DOT_HT | |
3163 | + 217 | . place DOT_WID | |
3164 | + 218 | . place DOT_RAD | |
3165 | + 219 | . expr '+' expr | |
3166 | + 220 | . expr '-' expr | |
3167 | + 221 | . expr '*' expr | |
3168 | + 222 | . expr '/' expr | |
3169 | + 223 | . expr '%' expr | |
3170 | + 224 | . expr '^' expr | |
3171 | + 225 | . '-' expr | |
3172 | + 226 | . '(' any_expr ')' | |
3173 | + 227 | . SIN '(' any_expr ')' | |
3174 | + 228 | . COS '(' any_expr ')' | |
3175 | + 229 | . ATAN2 '(' any_expr ',' any_expr ')' | |
3176 | + 230 | . LOG '(' any_expr ')' | |
3177 | + 231 | . EXP '(' any_expr ')' | |
3178 | + 232 | . SQRT '(' any_expr ')' | |
3179 | + 233 | . K_MAX '(' any_expr ',' any_expr ')' | |
3180 | + 234 | . K_MIN '(' any_expr ',' any_expr ')' | |
3181 | + 235 | . INT '(' any_expr ')' | |
3182 | + 236 | . RAND '(' any_expr ')' | |
3183 | + 237 | . RAND '(' ')' | |
3184 | + 238 | . SRAND '(' any_expr ')' | |
3185 | + 239 | . expr '<' expr | |
3186 | + 240 | . expr LESSEQUAL expr | |
3187 | + 241 | . expr '>' expr | |
3188 | + 242 | . expr GREATEREQUAL expr | |
3189 | + 243 | . expr EQUALEQUAL expr | |
3190 | + 244 | . expr NOTEQUAL expr | |
3191 | + 245 | . expr ANDAND expr | |
3192 | + 246 | . expr OROR expr | |
3193 | + 247 | . '!' expr | |
3194 | + | |
3195 | + LABEL shift, and go to state 48 | |
3196 | + VARIABLE shift, and go to state 49 | |
3197 | + NUMBER shift, and go to state 50 | |
3198 | + ORDINAL shift, and go to state 51 | |
3199 | + LAST shift, and go to state 52 | |
3200 | + LEFT shift, and go to state 53 | |
3201 | + RIGHT shift, and go to state 54 | |
3202 | + HERE shift, and go to state 55 | |
3203 | + DOT_N shift, and go to state 56 | |
3204 | + DOT_E shift, and go to state 57 | |
3205 | + DOT_W shift, and go to state 58 | |
3206 | + DOT_S shift, and go to state 59 | |
3207 | + DOT_NE shift, and go to state 60 | |
3208 | + DOT_SE shift, and go to state 61 | |
3209 | + DOT_NW shift, and go to state 62 | |
3210 | + DOT_SW shift, and go to state 63 | |
3211 | + DOT_C shift, and go to state 64 | |
3212 | + DOT_START shift, and go to state 65 | |
3213 | + DOT_END shift, and go to state 66 | |
3214 | + SIN shift, and go to state 67 | |
3215 | + COS shift, and go to state 68 | |
3216 | + ATAN2 shift, and go to state 69 | |
3217 | + LOG shift, and go to state 70 | |
3218 | + EXP shift, and go to state 71 | |
3219 | + SQRT shift, and go to state 72 | |
3220 | + K_MAX shift, and go to state 73 | |
3221 | + K_MIN shift, and go to state 74 | |
3222 | + INT shift, and go to state 75 | |
3223 | + RAND shift, and go to state 76 | |
3224 | + SRAND shift, and go to state 77 | |
3225 | + TOP shift, and go to state 78 | |
3226 | + BOTTOM shift, and go to state 79 | |
3227 | + UPPER shift, and go to state 80 | |
3228 | + LOWER shift, and go to state 81 | |
3229 | + LEFT_CORNER shift, and go to state 82 | |
3230 | + RIGHT_CORNER shift, and go to state 83 | |
3231 | + NORTH shift, and go to state 84 | |
3232 | + SOUTH shift, and go to state 85 | |
3233 | + EAST shift, and go to state 86 | |
3234 | + WEST shift, and go to state 87 | |
3235 | + CENTER shift, and go to state 88 | |
3236 | + END shift, and go to state 89 | |
3237 | + START shift, and go to state 90 | |
3238 | + '(' shift, and go to state 91 | |
3239 | + '`' shift, and go to state 92 | |
3240 | + '-' shift, and go to state 93 | |
3241 | + '!' shift, and go to state 94 | |
3242 | + | |
3243 | + position go to state 402 | |
3244 | + position_not_place go to state 99 | |
3245 | + expr_pair go to state 100 | |
3246 | + place go to state 101 | |
3247 | + label go to state 423 | |
3248 | + ordinal go to state 103 | |
3249 | + optional_ordinal_last go to state 104 | |
3250 | + nth_primitive go to state 105 | |
3251 | + corner go to state 106 | |
3252 | + expr go to state 424 | |
3253 | ]])], | |
3254 | ||
3255 | dnl OTHER-CHECKS | |
3256 | [], | |
3257 | ||
3258 | dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR | |
3259 | [AT_COND_CASE([[LALR]], [[1]], [[0]])], | |
3260 | [], | |
3261 | [AT_COND_CASE([[LALR]], | |
3262 | [[syntax error, unexpected LEFT | |
3263 | ]])]) |