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