1 # Exercising Bison on actual grammars. -*- Autotest -*-
3 # Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2013 Free Software
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.
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.
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/>.
19 AT_BANNER([[Existing Grammars.]])
21 # AT_TEST_EXISTING_GRAMMAR(DESCRIPTION,
22 # DECLS, GRAMMAR, INPUT,
23 # BISON-STDERR, LAST-STATE, LALR1-DIFF,
25 # [PARSER-EXIT-VALUE],
26 # [PARSER-STDOUT], [PARSER-STDERR])
27 # --------------------------------------------------------------
28 m4_define([AT_TEST_EXISTING_GRAMMAR], [_AT_TEST_EXISTING_GRAMMAR([$][1], $@)])
30 m4_define([_AT_TEST_EXISTING_GRAMMAR],
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])
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/^ $//']],
47 AT_TEST_TABLES_AND_PARSE([$2[: LALR(1)]], [[LALR]], [[last-state]],
48 [[%define lr.type lalr
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
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
61 [$4], [$5], [$6], [$7],
62 [$9], [$10], [$11], [$12])
64 m4_popdef([AT_LALR1_DIFF_CHECK])
69 ## ----------------------- ##
70 ## GNU AWK 3.1.0 Grammar. ##
71 ## ----------------------- ##
73 # We have been careful to strip all the actions excepts the
76 # There are 65 SR conflicts. Bison was once wrong, due to an incorrect
77 # computation of nullable. It reported 485 SR conflicts!
79 AT_TEST_EXISTING_GRAMMAR([[GNU AWK 3.1.0 Grammar]],
82 %token FUNC_CALL NAME REGEXP
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
92 %token LEX_AND LEX_OR INCREMENT DECREMENT
93 %token LEX_BUILTIN LEX_LENGTH
95 /* Lowest to highest */
102 %left FUNC_CALL LEX_BUILTIN LEX_LENGTH
105 %nonassoc RELOP '<' '>' '|' APPEND_OP TWOWAYIO
107 %left YSTRING YNUMBER
112 %left INCREMENT DECREMENT
118 : opt_nls program opt_nls
130 : LEX_BEGIN {} action
132 | LEX_BEGIN statement_term
133 | LEX_END statement_term
136 | pattern statement_term
137 | function_prologue function_body
152 : LEX_FUNCTION {} func_name '(' opt_param_list r_paren opt_nls
156 : l_brace statements r_brace opt_semi opt_nls
157 | l_brace r_brace opt_semi opt_nls
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.
174 : l_brace statements r_brace opt_semi opt_nls
175 | l_brace r_brace opt_semi opt_nls
180 | statements statement
193 | l_brace statements r_brace
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
219 : LEX_IF '(' exp r_paren opt_nls statement
220 | LEX_IF '(' exp r_paren opt_nls statement
221 LEX_ELSE opt_nls statement
254 | param_list comma NAME
257 | param_list comma error
260 /* optional expression, as in for loop */
273 | rexpression_list comma rexp
275 | rexpression_list error
276 | rexpression_list error rexp
277 | rexpression_list comma error
287 | expression_list comma exp
289 | expression_list error
290 | expression_list error exp
291 | expression_list comma error
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
304 | '!' regexp %prec UNARY
309 | exp '?' exp ':' exp
311 | exp simp_exp %prec CONCAT_OP
315 : variable ASSIGNOP {} rexp
318 | LEX_GETLINE opt_variable input_redir
320 | '!' regexp %prec UNARY
324 | rexp '?' rexp ':' rexp
326 | rexp simp_exp %prec CONCAT_OP
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
343 : '!' simp_exp %prec UNARY
346 '(' opt_expression_list r_paren
347 | LEX_LENGTH '(' opt_expression_list r_paren
349 | FUNC_CALL '(' opt_expression_list r_paren
355 | '-' simp_exp %prec UNARY
356 | '+' simp_exp %prec UNARY
366 | NAME '[' expression_list ']'
367 | '$' non_post_simp_exp
397 dnl For example, in AWK:
401 dnl The grammar below (from GNU AWK 3.1.0) using canonical LR(1) or IELR(1)
406 dnl That is, they shift '*' immediately and make it part of the getline
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.
413 dnl GNU AWK 3.1.2, 3.1.3, 3.1.4, and 3.1.5 parse it as:
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:
422 dnl http://www.opengroup.org/pubs/online/7908799/xcu/awk.html
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, ';']],
429 [AT_COND_CASE([[canonical LR]],
430 [[input.y:66.10: warning: empty rule without %empty [-Wempty-rule]
431 input.y:169.8: warning: empty rule without %empty [-Wempty-rule]
432 input.y:174.12: warning: empty rule without %empty [-Wempty-rule]
433 input.y:179.13: warning: empty rule without %empty [-Wempty-rule]
434 input.y:187.15: warning: empty rule without %empty [-Wempty-rule]
435 input.y:201.8: warning: empty rule without %empty [-Wempty-rule]
436 input.y:206.21: warning: empty rule without %empty [-Wempty-rule]
437 input.y:220.20: warning: empty rule without %empty [-Wempty-rule]
438 input.y:299.13: warning: empty rule without %empty [-Wempty-rule]
439 input.y:322.9: warning: empty rule without %empty [-Wempty-rule]
440 input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]
441 input.y:19.8-16: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence]
442 input.y:21.8-14: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence]
443 input.y:21.16-22: warning: useless associativity for YSTRING, use %precedence [-Wprecedence]
444 input.y:22.14-22: warning: useless precedence and associativity for APPEND_OP [-Wprecedence]
445 input.y:23.8-15: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence]
446 input.y:23.33-41: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence]
447 input.y:27.8-18: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence]
448 input.y:28.8-13: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence]
449 input.y:29.23-31: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence]
450 input.y:29.33-41: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence]
451 input.y:30.8-18: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence]
452 input.y:30.20-29: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence]
453 input.y:40.11-13: warning: useless precedence and associativity for ',' [-Wprecedence]
454 input.y:47.8-10: warning: useless associativity for '!', use %precedence [-Wprecedence]
455 input.y:47.12-16: warning: useless associativity for UNARY, use %precedence [-Wprecedence]
456 input.y:50.7-9: warning: useless associativity for '$', use %precedence [-Wprecedence]
457 input.y:51.7-9: warning: useless associativity for '(', use %precedence [-Wprecedence]
458 input.y:51.11-13: warning: useless precedence and associativity for ')' [-Wprecedence]]],
459 [[input.y:66.10: warning: empty rule without %empty [-Wempty-rule]
460 input.y:169.8: warning: empty rule without %empty [-Wempty-rule]
461 input.y:174.12: warning: empty rule without %empty [-Wempty-rule]
462 input.y:179.13: warning: empty rule without %empty [-Wempty-rule]
463 input.y:187.15: warning: empty rule without %empty [-Wempty-rule]
464 input.y:201.8: warning: empty rule without %empty [-Wempty-rule]
465 input.y:206.21: warning: empty rule without %empty [-Wempty-rule]
466 input.y:220.20: warning: empty rule without %empty [-Wempty-rule]
467 input.y:299.13: warning: empty rule without %empty [-Wempty-rule]
468 input.y:322.9: warning: empty rule without %empty [-Wempty-rule]
469 input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]
470 input.y:19.8-16: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence]
471 input.y:21.8-14: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence]
472 input.y:21.16-22: warning: useless associativity for YSTRING, use %precedence [-Wprecedence]
473 input.y:22.14-22: warning: useless precedence and associativity for APPEND_OP [-Wprecedence]
474 input.y:23.8-15: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence]
475 input.y:23.33-41: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence]
476 input.y:27.8-18: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence]
477 input.y:28.8-13: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence]
478 input.y:29.23-31: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence]
479 input.y:29.33-41: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence]
480 input.y:30.8-18: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence]
481 input.y:30.20-29: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence]
482 input.y:40.11-13: warning: useless precedence and associativity for ',' [-Wprecedence]
483 input.y:47.8-10: warning: useless associativity for '!', use %precedence [-Wprecedence]
484 input.y:47.12-16: warning: useless associativity for UNARY, use %precedence [-Wprecedence]
485 input.y:50.7-9: warning: useless associativity for '$', use %precedence [-Wprecedence]
486 input.y:51.7-9: warning: useless associativity for '(', use %precedence [-Wprecedence]
487 input.y:51.11-13: warning: useless precedence and associativity for ')' [-Wprecedence]]])[
491 [AT_COND_CASE([[LALR]], [[319]], [[canonical LR]], [[2358]], [[328]])],
493 dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge.
494 dnl Isocore map from LALR(1) state number to new state number plus descriptions
495 dnl of any change in the actions resulting in a change in accepted language:
502 dnl - 56 -> 326: reduce -> shift on '*', '/', and '%'
503 dnl - 58 -> 327: reduce -> shift on '*', '/', and '%'
504 dnl - 61 -> 328: reduce -> shift on '*', '/', and '%'
505 [AT_COND_CASE([[LALR]], [],
506 [[@@ -712,7 +712,7 @@
507 156 | . '$' non_post_simp_exp
509 NAME shift, and go to state 9
510 - '$' shift, and go to state 24
511 + '$' shift, and go to state 320
513 NAME [reduce using rule 152 (opt_variable)]
514 '$' [reduce using rule 152 (opt_variable)]
515 @@ -5379,7 +5379,7 @@
516 156 | . '$' non_post_simp_exp
518 NAME shift, and go to state 9
519 - '$' shift, and go to state 24
520 + '$' shift, and go to state 320
522 NAME [reduce using rule 152 (opt_variable)]
523 '$' [reduce using rule 152 (opt_variable)]
524 @@ -5399,7 +5399,7 @@
525 156 | . '$' non_post_simp_exp
527 NAME shift, and go to state 9
528 - '$' shift, and go to state 24
529 + '$' shift, and go to state 320
531 NAME [reduce using rule 152 (opt_variable)]
532 '$' [reduce using rule 152 (opt_variable)]
533 @@ -6214,7 +6214,7 @@
534 156 | . '$' non_post_simp_exp
536 NAME shift, and go to state 9
537 - '$' shift, and go to state 24
538 + '$' shift, and go to state 320
540 NAME [reduce using rule 152 (opt_variable)]
541 '$' [reduce using rule 152 (opt_variable)]
542 @@ -11099,3 +11099,274 @@
543 45 statement: LEX_FOR '(' opt_exp semi opt_nls exp semi opt_nls opt_exp r_paren opt_nls statement .
545 $default reduce using rule 45 (statement)
550 + 139 non_post_simp_exp: . '!' simp_exp
551 + 140 | . '(' exp r_paren
552 + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren
553 + 142 | . LEX_LENGTH '(' opt_expression_list r_paren
555 + 144 | . FUNC_CALL '(' opt_expression_list r_paren
557 + 146 | . INCREMENT variable
558 + 147 | . DECREMENT variable
561 + 150 | . '-' simp_exp
562 + 151 | . '+' simp_exp
563 + 154 variable: . NAME
564 + 155 | . NAME '[' expression_list ']'
565 + 156 | . '$' non_post_simp_exp
566 + 156 | '$' . non_post_simp_exp
568 + FUNC_CALL shift, and go to state 8
569 + NAME shift, and go to state 9
570 + YNUMBER shift, and go to state 10
571 + YSTRING shift, and go to state 11
572 + INCREMENT shift, and go to state 321
573 + DECREMENT shift, and go to state 322
574 + LEX_BUILTIN shift, and go to state 18
575 + LEX_LENGTH shift, and go to state 19
576 + '+' shift, and go to state 323
577 + '-' shift, and go to state 324
578 + '!' shift, and go to state 325
579 + '$' shift, and go to state 320
580 + '(' shift, and go to state 55
582 + non_post_simp_exp go to state 62
583 + variable go to state 63
588 + 146 non_post_simp_exp: INCREMENT . variable
589 + 154 variable: . NAME
590 + 155 | . NAME '[' expression_list ']'
591 + 156 | . '$' non_post_simp_exp
593 + NAME shift, and go to state 9
594 + '$' shift, and go to state 320
596 + variable go to state 50
601 + 147 non_post_simp_exp: DECREMENT . variable
602 + 154 variable: . NAME
603 + 155 | . NAME '[' expression_list ']'
604 + 156 | . '$' non_post_simp_exp
606 + NAME shift, and go to state 9
607 + '$' shift, and go to state 320
609 + variable go to state 51
614 + 130 simp_exp: . non_post_simp_exp
615 + 131 | . simp_exp '^' simp_exp
616 + 132 | . simp_exp '*' simp_exp
617 + 133 | . simp_exp '/' simp_exp
618 + 134 | . simp_exp '%' simp_exp
619 + 135 | . simp_exp '+' simp_exp
620 + 136 | . simp_exp '-' simp_exp
621 + 137 | . variable INCREMENT
622 + 138 | . variable DECREMENT
623 + 139 non_post_simp_exp: . '!' simp_exp
624 + 140 | . '(' exp r_paren
625 + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren
626 + 142 | . LEX_LENGTH '(' opt_expression_list r_paren
628 + 144 | . FUNC_CALL '(' opt_expression_list r_paren
630 + 146 | . INCREMENT variable
631 + 147 | . DECREMENT variable
634 + 150 | . '-' simp_exp
635 + 151 | . '+' simp_exp
636 + 151 | '+' . simp_exp
637 + 154 variable: . NAME
638 + 155 | . NAME '[' expression_list ']'
639 + 156 | . '$' non_post_simp_exp
641 + FUNC_CALL shift, and go to state 8
642 + NAME shift, and go to state 9
643 + YNUMBER shift, and go to state 10
644 + YSTRING shift, and go to state 11
645 + INCREMENT shift, and go to state 16
646 + DECREMENT shift, and go to state 17
647 + LEX_BUILTIN shift, and go to state 18
648 + LEX_LENGTH shift, and go to state 19
649 + '+' shift, and go to state 20
650 + '-' shift, and go to state 21
651 + '!' shift, and go to state 54
652 + '$' shift, and go to state 24
653 + '(' shift, and go to state 55
655 + simp_exp go to state 326
656 + non_post_simp_exp go to state 35
657 + variable go to state 57
662 + 130 simp_exp: . non_post_simp_exp
663 + 131 | . simp_exp '^' simp_exp
664 + 132 | . simp_exp '*' simp_exp
665 + 133 | . simp_exp '/' simp_exp
666 + 134 | . simp_exp '%' simp_exp
667 + 135 | . simp_exp '+' simp_exp
668 + 136 | . simp_exp '-' simp_exp
669 + 137 | . variable INCREMENT
670 + 138 | . variable DECREMENT
671 + 139 non_post_simp_exp: . '!' simp_exp
672 + 140 | . '(' exp r_paren
673 + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren
674 + 142 | . LEX_LENGTH '(' opt_expression_list r_paren
676 + 144 | . FUNC_CALL '(' opt_expression_list r_paren
678 + 146 | . INCREMENT variable
679 + 147 | . DECREMENT variable
682 + 150 | . '-' simp_exp
683 + 150 | '-' . simp_exp
684 + 151 | . '+' simp_exp
685 + 154 variable: . NAME
686 + 155 | . NAME '[' expression_list ']'
687 + 156 | . '$' non_post_simp_exp
689 + FUNC_CALL shift, and go to state 8
690 + NAME shift, and go to state 9
691 + YNUMBER shift, and go to state 10
692 + YSTRING shift, and go to state 11
693 + INCREMENT shift, and go to state 16
694 + DECREMENT shift, and go to state 17
695 + LEX_BUILTIN shift, and go to state 18
696 + LEX_LENGTH shift, and go to state 19
697 + '+' shift, and go to state 20
698 + '-' shift, and go to state 21
699 + '!' shift, and go to state 54
700 + '$' shift, and go to state 24
701 + '(' shift, and go to state 55
703 + simp_exp go to state 327
704 + non_post_simp_exp go to state 35
705 + variable go to state 57
710 + 130 simp_exp: . non_post_simp_exp
711 + 131 | . simp_exp '^' simp_exp
712 + 132 | . simp_exp '*' simp_exp
713 + 133 | . simp_exp '/' simp_exp
714 + 134 | . simp_exp '%' simp_exp
715 + 135 | . simp_exp '+' simp_exp
716 + 136 | . simp_exp '-' simp_exp
717 + 137 | . variable INCREMENT
718 + 138 | . variable DECREMENT
719 + 139 non_post_simp_exp: . '!' simp_exp
720 + 139 | '!' . simp_exp
721 + 140 | . '(' exp r_paren
722 + 141 | . LEX_BUILTIN '(' opt_expression_list r_paren
723 + 142 | . LEX_LENGTH '(' opt_expression_list r_paren
725 + 144 | . FUNC_CALL '(' opt_expression_list r_paren
727 + 146 | . INCREMENT variable
728 + 147 | . DECREMENT variable
731 + 150 | . '-' simp_exp
732 + 151 | . '+' simp_exp
733 + 154 variable: . NAME
734 + 155 | . NAME '[' expression_list ']'
735 + 156 | . '$' non_post_simp_exp
737 + FUNC_CALL shift, and go to state 8
738 + NAME shift, and go to state 9
739 + YNUMBER shift, and go to state 10
740 + YSTRING shift, and go to state 11
741 + INCREMENT shift, and go to state 16
742 + DECREMENT shift, and go to state 17
743 + LEX_BUILTIN shift, and go to state 18
744 + LEX_LENGTH shift, and go to state 19
745 + '+' shift, and go to state 20
746 + '-' shift, and go to state 21
747 + '!' shift, and go to state 54
748 + '$' shift, and go to state 24
749 + '(' shift, and go to state 55
751 + simp_exp go to state 328
752 + non_post_simp_exp go to state 35
753 + variable go to state 57
758 + 131 simp_exp: simp_exp . '^' simp_exp
759 + 132 | simp_exp . '*' simp_exp
760 + 133 | simp_exp . '/' simp_exp
761 + 134 | simp_exp . '%' simp_exp
762 + 135 | simp_exp . '+' simp_exp
763 + 136 | simp_exp . '-' simp_exp
764 + 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, '+', '-', '!', '$', '(', ')', '@:>@', '{', ';']
766 + '*' shift, and go to state 89
767 + '/' shift, and go to state 90
768 + '%' shift, and go to state 91
769 + '^' shift, and go to state 92
771 + $default reduce using rule 151 (non_post_simp_exp)
773 + Conflict between rule 151 and token '+' resolved as reduce ('+' < UNARY).
774 + Conflict between rule 151 and token '-' resolved as reduce ('-' < UNARY).
779 + 131 simp_exp: simp_exp . '^' simp_exp
780 + 132 | simp_exp . '*' simp_exp
781 + 133 | simp_exp . '/' simp_exp
782 + 134 | simp_exp . '%' simp_exp
783 + 135 | simp_exp . '+' simp_exp
784 + 136 | simp_exp . '-' simp_exp
785 + 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, '+', '-', '!', '$', '(', ')', '@:>@', '{', ';']
787 + '*' shift, and go to state 89
788 + '/' shift, and go to state 90
789 + '%' shift, and go to state 91
790 + '^' shift, and go to state 92
792 + $default reduce using rule 150 (non_post_simp_exp)
794 + Conflict between rule 150 and token '+' resolved as reduce ('+' < UNARY).
795 + Conflict between rule 150 and token '-' resolved as reduce ('-' < UNARY).
800 + 131 simp_exp: simp_exp . '^' simp_exp
801 + 132 | simp_exp . '*' simp_exp
802 + 133 | simp_exp . '/' simp_exp
803 + 134 | simp_exp . '%' simp_exp
804 + 135 | simp_exp . '+' simp_exp
805 + 136 | simp_exp . '-' simp_exp
806 + 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, '+', '-', '!', '$', '(', ')', '@:>@', '{', ';']
808 + '*' shift, and go to state 89
809 + '/' shift, and go to state 90
810 + '%' shift, and go to state 91
811 + '^' shift, and go to state 92
813 + $default reduce using rule 139 (non_post_simp_exp)
815 + Conflict between rule 139 and token '+' resolved as reduce ('+' < UNARY).
816 + Conflict between rule 139 and token '-' resolved as reduce ('-' < UNARY).
822 dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR
823 dnl In the case of the syntax error, the parser recovers, so it returns 0.
826 [AT_COND_CASE([[LALR]],
827 [[syntax error, unexpected '*', expecting NEWLINE or '{' or ';'
830 ## ----------------- ##
831 ## GNU Cim Grammar. ##
832 ## ----------------- ##
834 # GNU Cim, the GNU Simula 87 Compiler.
836 # Bison was once wrong, due to an incorrect computation of the RR conflicts.
837 # It reported 80 SR && 99 RR conflicts instead of 78/10!!!
839 AT_TEST_EXISTING_GRAMMAR([[GNU Cim Grammar]],
842 HACTIVATE HAFTER /*HAND*/ HARRAY HAT
843 HBEFORE HBEGIN HBOOLEAN
844 HCHARACTER HCLASS /*HCOMMENT*/ HCONC
846 HELSE HEND HEQ /*HEQV*/ HEXTERNAL
850 HIF /*HIMP*/ HIN HINNER HINSPECT HINTEGER HIS
852 HNAME HNE HNEW HNONE /*HNOT*/ HNOTEXT
854 HPRIOR HPROCEDURE HPROTECTED
856 HREACTIVATE HREAL HREF
858 HTEXT HTHEN HTHIS HTO
863 HASSIGNVALUE HASSIGNREF
864 /*HDOT*/ HPAREXPSEPARATOR HLABELSEPARATOR HSTATEMENTSEPARATOR
867 HADD HSUB HMUL HDIV HINTDIV HEXP
871 %token HBOOLEANKONST HINTEGERKONST HCHARACTERKONST
886 %left HVALRELOPERATOR HREFRELOPERATOR HOBJRELOPERATOR
892 %left HFACTOROPERATOR
893 %left HPRIMARYOPERATOR
902 /* GRAMATIKK FOR PROGRAM MODULES */
905 | error HSTATEMENTSEPARATOR MBEE_DECLSTMS
907 EXT_DECLARATION : HEXTERNAL
925 EXTERNAL_KIND_ITEM: EXT_IDENT
938 MBEE_REST_EXT_LIST: /* EMPTY
939 | HPAREXPSEPARATOR EXT_KIND_LIST
941 EXT_KIND_LIST : EXT_KIND_ITEM
942 | EXT_KIND_LIST HPAREXPSEPARATOR EXT_KIND_ITEM
944 EXT_KIND_ITEM : HIDENTIFIER
948 EMPTY_BLOCK : /*EMPT*/
952 | EXT_LIST HPAREXPSEPARATOR EXT_ITEM
954 EXT_ITEM : HIDENTIFIER
957 EXT_IDENT : /* EMPTY */
961 /* GRAMATIKK FOR TYPER */
980 /* GRAMATIKK FOR DEL AV SETNINGER */
981 MBEE_ELSE_PART : /*EMPT*/
991 FOR_LIST : FOR_LIST_ELEMENT
996 FOR_LIST_ELEMENT: EXPRESSION
999 MBEE_F_L_EL_R_PT: /*EMPT*/
1011 CONN_STATE_R_PT : WHEN_CLAUSE_LIST
1015 WHEN_CLAUSE_LIST: HWHEN
1025 MBEE_OTWI_CLAUS : /*EMPT*/
1030 ACTIVATOR : HACTIVATE
1034 | ATDELAY EXPRESSION {}
1042 BEFOREAFTER : HBEFORE
1048 /* GRAMATIKK FOR SETNINGER OG DEKLARASJONER */
1049 MODULSTATEMENT : HWHILE
1083 | EXPRESSION_SIMP HBEGIN error HSTATEMENTSEPARATOR
1085 | EXPRESSION_SIMP HBEGIN error HEND
1087 | ACTIVATOR EXPRESSION SCHEDULE
1092 | MBEE_TYPE HPROCEDURE
1116 DECLSTATEMENT : MODULSTATEMENT
1134 BLOCK : DECLSTATEMENT
1135 | HBEGIN MBEE_DECLSTMS HEND
1136 | HBEGIN error HSTATEMENTSEPARATOR MBEE_DECLSTMS HEND
1139 MBEE_DECLSTMS : MBEE_DECLSTMSU
1141 MBEE_DECLSTMSU : DECLSTATEMENT
1146 MODULS : MODULSTATEMENT
1147 | MODULS HSTATEMENTSEPARATOR MODULSTATEMENT
1149 /* GRAMATIKK FOR DEL AV DEKLARASJONER */
1150 ARR_SEGMENT_LIST: ARR_SEGMENT
1155 ARR_SEGMENT : ARRAY_SEGMENT
1157 BAUND_PAIR_LIST HENDPAR
1159 ARRAY_SEGMENT : ARRAY_SEGMENT_EL {}
1165 ARRAY_SEGMENT_EL: HIDENTIFIER
1167 BAUND_PAIR_LIST : BAUND_PAIR
1172 BAUND_PAIR : EXPRESSION
1176 SWITCH_LIST : EXPRESSION
1181 HEADING : MBEE_FMAL_PAR_P HSTATEMENTSEPARATOR {}
1187 MBEE_FMAL_PAR_P : /*EMPT*/
1190 FMAL_PAR_PART : HBEGPAR NO_TYPE
1193 MBEE_LISTV : /*EMPT*/
1197 | FPP_CATEG HDOTDOTDOT
1199 HPAREXPSEPARATOR LISTV
1202 HPAREXPSEPARATOR LISTV
1204 FPP_HEADING : HBEGPAR NO_TYPE
1205 FPP_MBEE_LISTV HENDPAR
1207 FPP_MBEE_LISTV : /*EMPT*/
1210 FPP_LISTV : FPP_CATEG HDOTDOTDOT
1213 HPAREXPSEPARATOR LISTV
1215 FPP_SPEC : FPP_CATEG SPECIFIER HIDENTIFIER
1216 | FPP_CATEG FPP_PROC_DECL_IN_SPEC
1218 FPP_CATEG : HNAME HLABELSEPARATOR
1219 | HVALUE HLABELSEPARATOR
1220 | HVAR HLABELSEPARATOR
1223 FPP_PROC_DECL_IN_SPEC: MBEE_TYPE HPROCEDURE
1226 FPP_HEADING {} { /* Yes, two "final" actions. */ }
1228 IDENTIFIER_LISTV: HIDENTIFIER
1231 HPAREXPSEPARATOR IDENTIFIER_LISTV
1233 MBEE_MODE_PART : /*EMPT*/
1236 MODE_PART : NAME_PART
1239 | NAME_PART VALUE_PART
1240 | VALUE_PART NAME_PART
1241 | NAME_PART VAR_PART
1242 | VAR_PART NAME_PART
1243 | VALUE_PART VAR_PART
1244 | VAR_PART VALUE_PART
1245 | VAR_PART NAME_PART VALUE_PART
1246 | NAME_PART VAR_PART VALUE_PART
1247 | NAME_PART VALUE_PART VAR_PART
1248 | VAR_PART VALUE_PART NAME_PART
1249 | VALUE_PART VAR_PART NAME_PART
1250 | VALUE_PART NAME_PART VAR_PART
1252 NAME_PART : HNAME {}
1260 VALUE_PART : HVALUE {}
1261 IDENTIFIER_LISTV HSTATEMENTSEPARATOR
1263 MBEE_SPEC_PART : /*EMPT*/
1266 SPEC_PART : ONE_SPEC
1267 | SPEC_PART ONE_SPEC
1269 ONE_SPEC : SPECIFIER IDENTIFIER_LIST HSTATEMENTSEPARATOR
1270 | NO_TYPE HPROCEDURE HIDENTIFIER HOBJRELOPERATOR
1272 PROC_DECL_IN_SPEC HSTATEMENTSEPARATOR
1273 | FPP_PROC_DECL_IN_SPEC HSTATEMENTSEPARATOR
1274 | MBEE_TYPE HPROCEDURE HIDENTIFIER HSTATEMENTSEPARATOR
1275 | MBEE_TYPE HPROCEDURE HIDENTIFIER HPAREXPSEPARATOR
1276 IDENTIFIER_LIST HSTATEMENTSEPARATOR
1284 PROC_DECL_IN_SPEC: MBEE_TYPE HPROCEDURE
1291 MBEE_BEGIN_END : /* EMPTY */
1294 MBEE_PROT_PART : /*EMPT*/
1297 PROTECTION_PART : PROT_SPECIFIER IDENTIFIER_LIST
1299 | PROTECTION_PART PROT_SPECIFIER
1300 IDENTIFIER_LIST HSTATEMENTSEPARATOR
1302 PROT_SPECIFIER : HHIDDEN
1309 MBEE_VIRT_PART : /*EMPT*/
1312 VIRTUAL_PART : HVIRTUAL
1316 IDENTIFIER_LIST : HIDENTIFIER
1317 | IDENTIFIER_LIST HPAREXPSEPARATOR
1320 IDENTIFIER_LISTC: HIDENTIFIER
1322 | IDENTIFIER_LISTC HPAREXPSEPARATOR
1326 MBEE_CONSTANT : /* EMPTY */
1332 /* GRAMATIKK FOR UTTRYKK */
1333 EXPRESSION : EXPRESSION_SIMP
1341 EXPRESSION_SIMP : EXPRESSION_SIMP
1349 | EXPRESSION_SIMP HOR
1353 | EXPRESSION_SIMP HAND
1358 HEQV EXPRESSION_SIMP
1360 HIMP EXPRESSION_SIMP
1364 HAND EXPRESSION_SIMP
1365 | HNOT EXPRESSION_SIMP
1376 EXPRESSION_SIMP %prec UNEAR
1407 ARG_R_PT : /*EMPTY*/
1409 ARGUMENT_LIST HENDPAR
1411 MBEE_ARG_R_PT : /*EMPTY*/
1413 ARGUMENT_LIST HENDPAR
1415 ARGUMENT_LIST : EXPRESSION
1426 [AT_COND_CASE([[canonical LR]],
1427 [[input.y:128.12: warning: empty rule without %empty [-Wempty-rule]
1428 input.y:137.10: warning: empty rule without %empty [-Wempty-rule]
1429 input.y:142.8: warning: empty rule without %empty [-Wempty-rule]
1430 input.y:161.15: warning: empty rule without %empty [-Wempty-rule]
1431 input.y:179.17: warning: empty rule without %empty [-Wempty-rule]
1432 input.y:205.16: warning: empty rule without %empty [-Wempty-rule]
1433 input.y:213.9: warning: empty rule without %empty [-Wempty-rule]
1434 input.y:225.6: warning: empty rule without %empty [-Wempty-rule]
1435 input.y:292.18: warning: empty rule without %empty [-Wempty-rule]
1436 input.y:294.19: warning: empty rule without %empty [-Wempty-rule]
1437 input.y:367.16: warning: empty rule without %empty [-Wempty-rule]
1438 input.y:373.11: warning: empty rule without %empty [-Wempty-rule]
1439 input.y:387.15: warning: empty rule without %empty [-Wempty-rule]
1440 input.y:401.18: warning: empty rule without %empty [-Wempty-rule]
1441 input.y:413.15: warning: empty rule without %empty [-Wempty-rule]
1442 input.y:443.15: warning: empty rule without %empty [-Wempty-rule]
1443 input.y:471.15: warning: empty rule without %empty [-Wempty-rule]
1444 input.y:474.15: warning: empty rule without %empty [-Wempty-rule]
1445 input.y:489.15: warning: empty rule without %empty [-Wempty-rule]
1446 input.y:506.14: warning: empty rule without %empty [-Wempty-rule]
1447 input.y:587.9: warning: empty rule without %empty [-Wempty-rule]
1448 input.y:591.14: warning: empty rule without %empty [-Wempty-rule]
1449 input.y: warning: 1876 shift/reduce conflicts [-Wconflicts-sr]
1450 input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]
1451 input.y:32.9-12: warning: useless associativity for HQUA, use %precedence [-Wprecedence]
1452 input.y:53.8-14: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence]
1453 input.y:54.9-15: warning: useless associativity for HORELSE, use %precedence [-Wprecedence]
1454 input.y:55.9-16: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence]
1455 input.y:61.9-12: warning: useless associativity for HNOT, use %precedence [-Wprecedence]
1456 input.y:68.7-11: warning: useless associativity for UNEAR, use %precedence [-Wprecedence]]],
1457 [[input.y:128.12: warning: empty rule without %empty [-Wempty-rule]
1458 input.y:137.10: warning: empty rule without %empty [-Wempty-rule]
1459 input.y:142.8: warning: empty rule without %empty [-Wempty-rule]
1460 input.y:161.15: warning: empty rule without %empty [-Wempty-rule]
1461 input.y:179.17: warning: empty rule without %empty [-Wempty-rule]
1462 input.y:205.16: warning: empty rule without %empty [-Wempty-rule]
1463 input.y:213.9: warning: empty rule without %empty [-Wempty-rule]
1464 input.y:225.6: warning: empty rule without %empty [-Wempty-rule]
1465 input.y:292.18: warning: empty rule without %empty [-Wempty-rule]
1466 input.y:294.19: warning: empty rule without %empty [-Wempty-rule]
1467 input.y:367.16: warning: empty rule without %empty [-Wempty-rule]
1468 input.y:373.11: warning: empty rule without %empty [-Wempty-rule]
1469 input.y:387.15: warning: empty rule without %empty [-Wempty-rule]
1470 input.y:401.18: warning: empty rule without %empty [-Wempty-rule]
1471 input.y:413.15: warning: empty rule without %empty [-Wempty-rule]
1472 input.y:443.15: warning: empty rule without %empty [-Wempty-rule]
1473 input.y:471.15: warning: empty rule without %empty [-Wempty-rule]
1474 input.y:474.15: warning: empty rule without %empty [-Wempty-rule]
1475 input.y:489.15: warning: empty rule without %empty [-Wempty-rule]
1476 input.y:506.14: warning: empty rule without %empty [-Wempty-rule]
1477 input.y:587.9: warning: empty rule without %empty [-Wempty-rule]
1478 input.y:591.14: warning: empty rule without %empty [-Wempty-rule]
1479 input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr]
1480 input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]
1481 input.y:32.9-12: warning: useless associativity for HQUA, use %precedence [-Wprecedence]
1482 input.y:53.8-14: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence]
1483 input.y:54.9-15: warning: useless associativity for HORELSE, use %precedence [-Wprecedence]
1484 input.y:55.9-16: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence]
1485 input.y:61.9-12: warning: useless associativity for HNOT, use %precedence [-Wprecedence]
1486 input.y:68.7-11: warning: useless associativity for UNEAR, use %precedence [-Wprecedence]]])[
1490 [AT_COND_CASE([[canonical LR]], [[10425]], [[442]])],
1492 dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge.
1496 [AT_COND_CASE([[canonical LR]], [[]],
1497 [AT_CHECK([[grep '^State.*conflicts:' input.output]], [[0]],
1498 [[State 64 conflicts: 14 shift/reduce
1499 State 164 conflicts: 1 shift/reduce
1500 State 201 conflicts: 33 shift/reduce, 4 reduce/reduce
1501 State 206 conflicts: 1 shift/reduce
1502 State 240 conflicts: 1 shift/reduce
1503 State 335 conflicts: 9 shift/reduce, 2 reduce/reduce
1504 State 356 conflicts: 1 shift/reduce
1505 State 360 conflicts: 9 shift/reduce, 2 reduce/reduce
1506 State 427 conflicts: 9 shift/reduce, 2 reduce/reduce
1509 ## -------------------------------- ##
1510 ## GNU pic (Groff 1.18.1) Grammar. ##
1511 ## -------------------------------- ##
1513 # GNU pic, part of groff.
1515 # Bison once reported shift/reduce conflicts that it shouldn't have.
1517 AT_TEST_EXISTING_GRAMMAR([[GNU pic (Groff 1.18.1) Grammar]],
1528 %token LEFT_ARROW_HEAD
1529 %token RIGHT_ARROW_HEAD
1530 %token DOUBLE_ARROW_HEAD
1640 /* this ensures that plot 17 "%g" parses as (plot 17 "%g") */
1644 /* give text adjustments higher precedence than TEXT, so that
1645 box "foo" above ljust == box ("foo" above ljust)
1648 %left LJUST RJUST ABOVE BELOW
1651 /* Give attributes that take an optional expression a higher
1652 precedence than left and right, so that eg 'line chop left'
1654 %left CHOP SOLID DASHED DOTTED UP DOWN FILL COLORED OUTLINED
1657 %left VARIABLE NUMBER '(' SIN COS ATAN2 LOG EXP SQRT K_MAX K_MIN INT RAND SRAND LAST
1658 %left ORDINAL HERE '`'
1660 %left BOX CIRCLE ELLIPSE ARC LINE ARROW SPLINE '[' /* ] */
1662 /* these need to be lower than '-' */
1663 %left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS
1665 /* these must have higher precedence than CHOP so that 'label %prec CHOP'
1667 %left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C
1668 %left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER
1669 %left UPPER LOWER NORTH SOUTH EAST WEST CENTER START END
1674 %left EQUALEQUAL NOTEQUAL
1675 %left '<' '>' LESSEQUAL GREATEREQUAL
1692 optional_separator middle_element_list optional_separator
1695 middle_element_list:
1697 | middle_element_list separator element
1711 VARIABLE '=' any_expr
1712 | VARIABLE ':' '=' any_expr
1718 | COMMAND print_args
1734 | FOR VARIABLE '=' expr TO expr optional_by DO
1747 | reset_variables VARIABLE
1748 | reset_variables ',' VARIABLE
1753 | print_args print_arg
1759 | position %prec ','
1779 text EQUALEQUAL text
1780 | text NOTEQUAL text
1781 | text_expr ANDAND text_expr
1782 | text_expr ANDAND expr
1783 | expr ANDAND text_expr
1784 | text_expr OROR text_expr
1785 | text_expr OROR expr
1786 | expr OROR text_expr
1798 | LABEL ':' optional_separator element
1799 | LABEL ':' optional_separator position_not_place
1800 | LABEL ':' optional_separator place
1801 | '{' {} element_list '}'
1827 | object_spec HEIGHT expr
1828 | object_spec RADIUS expr
1829 | object_spec WIDTH expr
1830 | object_spec DIAMETER expr
1831 | object_spec expr %prec HEIGHT
1833 | object_spec UP expr
1835 | object_spec DOWN expr
1837 | object_spec RIGHT expr
1839 | object_spec LEFT expr
1840 | object_spec FROM position
1841 | object_spec TO position
1842 | object_spec AT position
1843 | object_spec WITH path
1844 | object_spec WITH position %prec ','
1845 | object_spec BY expr_pair
1848 | object_spec DOTTED
1849 | object_spec DOTTED expr
1850 | object_spec DASHED
1851 | object_spec DASHED expr
1853 | object_spec FILL expr
1854 | object_spec SHADED text
1855 | object_spec COLORED text
1856 | object_spec OUTLINED text
1858 | object_spec CHOP expr
1860 | object_spec INVISIBLE
1861 | object_spec LEFT_ARROW_HEAD
1862 | object_spec RIGHT_ARROW_HEAD
1863 | object_spec DOUBLE_ARROW_HEAD
1866 | object_spec text %prec TEXT
1871 | object_spec THICKNESS expr
1872 | object_spec ALIGNED
1877 | SPRINTF '(' TEXT sprintf_args ')'
1882 | sprintf_args ',' expr
1892 | position '+' expr_pair
1893 | position '-' expr_pair
1894 | '(' position ',' position ')'
1895 | expr between position AND position
1896 | expr '<' position ',' position '>'
1901 | OF THE WAY BETWEEN
1910 /* line at A left == line (at A) left */
1929 optional_ordinal_last:
1936 | optional_ordinal_last object_type
1953 | label_path '.' LABEL
1958 /* give this a lower precedence than LEFT and RIGHT so that
1959 [A: box] with .A left == [A: box] with (.A left) */
1960 | label_path %prec TEXT
1966 | '(' relative_path ',' relative_path ')'
1968 /* The rest of these rules are a compatibility sop. */
1969 | ORDINAL LAST object_type relative_path
1970 | LAST object_type relative_path
1971 | ORDINAL object_type relative_path
1972 | LABEL relative_path
1999 | UPPER RIGHT_CORNER
2000 | LOWER RIGHT_CORNER
2024 | '-' expr %prec '!'
2026 | SIN '(' any_expr ')'
2027 | COS '(' any_expr ')'
2028 | ATAN2 '(' any_expr ',' any_expr ')'
2029 | LOG '(' any_expr ')'
2030 | EXP '(' any_expr ')'
2031 | SQRT '(' any_expr ')'
2032 | K_MAX '(' any_expr ',' any_expr ')'
2033 | K_MIN '(' any_expr ',' any_expr ')'
2034 | INT '(' any_expr ')'
2035 | RAND '(' any_expr ')'
2037 | SRAND '(' any_expr ')'
2039 | expr LESSEQUAL expr
2041 | expr GREATEREQUAL expr
2042 | expr EQUALEQUAL expr
2043 | expr NOTEQUAL expr
2052 dnl For example, in pic:
2060 dnl Even using groff 1.19.2, the 3rd line above is a syntax error. Change
2061 dnl "left" to "right", and it still is. However, add "upper" or "lower" before
2062 dnl "left or "right" and it's accepted to mean ".nw", ".ne", ".sw", or ".se".
2063 dnl (There seem to be no aliases for "north" and "south" that can stand alone
2064 dnl without being followed by "of".)
2065 [[VARIABLE, '=', LABEL, LEFT, DOT_X]],
2068 [[input.y:202.19: warning: empty rule without %empty [-Wempty-rule]
2069 input.y:270.6: warning: empty rule without %empty [-Wempty-rule]
2070 input.y:292.12: warning: empty rule without %empty [-Wempty-rule]
2071 input.y:309.17: warning: empty rule without %empty [-Wempty-rule]
2072 input.y:382.13: warning: empty rule without %empty [-Wempty-rule]
2073 input.y:471.11-48: warning: rule useless in parser due to conflicts [-Wother]
2074 input.y:19.8-12: warning: useless associativity for LABEL, use %precedence [-Wprecedence]
2075 input.y:20.8-15: warning: useless associativity for VARIABLE, use %precedence [-Wprecedence]
2076 input.y:21.8-13: warning: useless associativity for NUMBER, use %precedence [-Wprecedence]
2077 input.y:22.8-11: warning: useless associativity for TEXT, use %precedence [-Wprecedence]
2078 input.y:25.8-14: warning: useless associativity for ORDINAL, use %precedence [-Wprecedence]
2079 input.y:30.8-11: warning: useless associativity for LAST, use %precedence [-Wprecedence]
2080 input.y:31.8-9: warning: useless associativity for UP, use %precedence [-Wprecedence]
2081 input.y:32.8-11: warning: useless associativity for DOWN, use %precedence [-Wprecedence]
2082 input.y:35.8-10: warning: useless associativity for BOX, use %precedence [-Wprecedence]
2083 input.y:36.8-13: warning: useless associativity for CIRCLE, use %precedence [-Wprecedence]
2084 input.y:37.8-14: warning: useless associativity for ELLIPSE, use %precedence [-Wprecedence]
2085 input.y:38.8-10: warning: useless associativity for ARC, use %precedence [-Wprecedence]
2086 input.y:39.8-11: warning: useless associativity for LINE, use %precedence [-Wprecedence]
2087 input.y:40.8-12: warning: useless associativity for ARROW, use %precedence [-Wprecedence]
2088 input.y:42.8-13: warning: useless associativity for SPLINE, use %precedence [-Wprecedence]
2089 input.y:43.8-13: warning: useless associativity for HEIGHT, use %precedence [-Wprecedence]
2090 input.y:44.8-13: warning: useless associativity for RADIUS, use %precedence [-Wprecedence]
2091 input.y:45.8-12: warning: useless associativity for WIDTH, use %precedence [-Wprecedence]
2092 input.y:46.8-15: warning: useless associativity for DIAMETER, use %precedence [-Wprecedence]
2093 input.y:47.8-11: warning: useless associativity for FROM, use %precedence [-Wprecedence]
2094 input.y:48.8-9: warning: useless associativity for TO, use %precedence [-Wprecedence]
2095 input.y:49.8-9: warning: useless associativity for AT, use %precedence [-Wprecedence]
2096 input.y:53.8-12: warning: useless precedence and associativity for SOLID [-Wprecedence]
2097 input.y:54.8-13: warning: useless associativity for DOTTED, use %precedence [-Wprecedence]
2098 input.y:55.8-13: warning: useless associativity for DASHED, use %precedence [-Wprecedence]
2099 input.y:56.8-11: warning: useless associativity for CHOP, use %precedence [-Wprecedence]
2100 input.y:59.8-12: warning: useless precedence and associativity for LJUST [-Wprecedence]
2101 input.y:60.8-12: warning: useless precedence and associativity for RJUST [-Wprecedence]
2102 input.y:61.8-12: warning: useless precedence and associativity for ABOVE [-Wprecedence]
2103 input.y:62.8-12: warning: useless precedence and associativity for BELOW [-Wprecedence]
2104 input.y:63.8-9: warning: useless associativity for OF, use %precedence [-Wprecedence]
2105 input.y:66.8-14: warning: useless associativity for BETWEEN, use %precedence [-Wprecedence]
2106 input.y:67.8-10: warning: useless associativity for AND, use %precedence [-Wprecedence]
2107 input.y:68.8-11: warning: useless associativity for HERE, use %precedence [-Wprecedence]
2108 input.y:69.8-12: warning: useless associativity for DOT_N, use %precedence [-Wprecedence]
2109 input.y:70.8-12: warning: useless associativity for DOT_E, use %precedence [-Wprecedence]
2110 input.y:71.8-12: warning: useless associativity for DOT_W, use %precedence [-Wprecedence]
2111 input.y:72.8-12: warning: useless associativity for DOT_S, use %precedence [-Wprecedence]
2112 input.y:73.8-13: warning: useless associativity for DOT_NE, use %precedence [-Wprecedence]
2113 input.y:74.8-13: warning: useless associativity for DOT_SE, use %precedence [-Wprecedence]
2114 input.y:75.8-13: warning: useless associativity for DOT_NW, use %precedence [-Wprecedence]
2115 input.y:76.8-13: warning: useless associativity for DOT_SW, use %precedence [-Wprecedence]
2116 input.y:77.8-12: warning: useless associativity for DOT_C, use %precedence [-Wprecedence]
2117 input.y:78.8-16: warning: useless associativity for DOT_START, use %precedence [-Wprecedence]
2118 input.y:79.8-14: warning: useless associativity for DOT_END, use %precedence [-Wprecedence]
2119 input.y:85.8-10: warning: useless associativity for SIN, use %precedence [-Wprecedence]
2120 input.y:86.8-10: warning: useless associativity for COS, use %precedence [-Wprecedence]
2121 input.y:87.8-12: warning: useless associativity for ATAN2, use %precedence [-Wprecedence]
2122 input.y:88.8-10: warning: useless associativity for LOG, use %precedence [-Wprecedence]
2123 input.y:89.8-10: warning: useless associativity for EXP, use %precedence [-Wprecedence]
2124 input.y:90.8-11: warning: useless associativity for SQRT, use %precedence [-Wprecedence]
2125 input.y:91.8-12: warning: useless associativity for K_MAX, use %precedence [-Wprecedence]
2126 input.y:92.8-12: warning: useless associativity for K_MIN, use %precedence [-Wprecedence]
2127 input.y:93.8-10: warning: useless associativity for INT, use %precedence [-Wprecedence]
2128 input.y:94.8-11: warning: useless associativity for RAND, use %precedence [-Wprecedence]
2129 input.y:95.8-12: warning: useless associativity for SRAND, use %precedence [-Wprecedence]
2130 input.y:98.8-10: warning: useless associativity for TOP, use %precedence [-Wprecedence]
2131 input.y:99.8-13: warning: useless associativity for BOTTOM, use %precedence [-Wprecedence]
2132 input.y:100.8-12: warning: useless associativity for UPPER, use %precedence [-Wprecedence]
2133 input.y:101.8-12: warning: useless associativity for LOWER, use %precedence [-Wprecedence]
2134 input.y:116.8-18: warning: useless associativity for LEFT_CORNER, use %precedence [-Wprecedence]
2135 input.y:117.8-19: warning: useless associativity for RIGHT_CORNER, use %precedence [-Wprecedence]
2136 input.y:118.8-12: warning: useless associativity for NORTH, use %precedence [-Wprecedence]
2137 input.y:119.8-12: warning: useless associativity for SOUTH, use %precedence [-Wprecedence]
2138 input.y:120.8-11: warning: useless associativity for EAST, use %precedence [-Wprecedence]
2139 input.y:121.8-11: warning: useless associativity for WEST, use %precedence [-Wprecedence]
2140 input.y:122.8-13: warning: useless associativity for CENTER, use %precedence [-Wprecedence]
2141 input.y:123.8-10: warning: useless associativity for END, use %precedence [-Wprecedence]
2142 input.y:124.8-12: warning: useless associativity for START, use %precedence [-Wprecedence]
2143 input.y:127.8-11: warning: useless associativity for PLOT, use %precedence [-Wprecedence]
2144 input.y:128.8-16: warning: useless associativity for THICKNESS, use %precedence [-Wprecedence]
2145 input.y:129.8-11: warning: useless associativity for FILL, use %precedence [-Wprecedence]
2146 input.y:130.8-14: warning: useless precedence and associativity for COLORED [-Wprecedence]
2147 input.y:131.8-15: warning: useless precedence and associativity for OUTLINED [-Wprecedence]
2148 input.y:134.8-14: warning: useless associativity for SPRINTF, use %precedence [-Wprecedence]
2149 input.y:137.7-9: warning: useless associativity for '.', use %precedence [-Wprecedence]
2150 input.y:156.23-25: warning: useless associativity for '(', use %precedence [-Wprecedence]
2151 input.y:157.20-22: warning: useless associativity for '`', use %precedence [-Wprecedence]
2152 input.y:159.48-50: warning: useless associativity for '@<:@', use %precedence [-Wprecedence]
2153 input.y:170.7-9: warning: useless associativity for ',', use %precedence [-Wprecedence]
2154 input.y:181.8-10: warning: useless associativity for '!', use %precedence [-Wprecedence]
2158 [AT_COND_CASE([[LALR]], [[422]], [[canonical LR]], [[4833]], [[427]])],
2160 dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge.
2161 dnl Isocore map from LALR(1) state number to new state number plus descriptions
2162 dnl of any change in the actions resulting in a change in accepted language:
2163 dnl - 102 -> 423: reduce -> shift on LEFT and RIGHT
2168 [AT_COND_CASE([[LALR]], [],
2169 [[@@ -1223,7 +1223,7 @@
2170 text_expr go to state 112
2171 text go to state 113
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 @@ -1377,7 +1377,7 @@
2179 '!' shift, and go to state 94
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 @@ -1854,7 +1854,7 @@
2189 text go to state 162
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 @@ -2047,7 +2047,7 @@
2197 text_expr go to state 112
2198 text go to state 113
2199 place go to state 114
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 @@ -2571,7 +2571,7 @@
2206 position_not_place go to state 99
2207 expr_pair go to state 191
2208 place go to state 101
2209 - label go to state 102
2210 + label go to state 423
2211 ordinal go to state 103
2212 optional_ordinal_last go to state 104
2213 nth_primitive go to state 105
2214 @@ -2732,7 +2732,7 @@
2215 text_expr go to state 112
2216 text go to state 113
2217 place go to state 114
2218 - label go to state 102
2219 + label go to state 423
2220 ordinal go to state 103
2221 optional_ordinal_last go to state 104
2222 nth_primitive go to state 105
2223 @@ -2875,7 +2875,7 @@
2224 '!' shift, and go to state 94
2226 place go to state 114
2227 - label go to state 102
2228 + label go to state 423
2229 ordinal go to state 103
2230 optional_ordinal_last go to state 104
2231 nth_primitive go to state 105
2232 @@ -3018,7 +3018,7 @@
2233 '!' shift, and go to state 94
2235 place go to state 114
2236 - label go to state 102
2237 + label go to state 423
2238 ordinal go to state 103
2239 optional_ordinal_last go to state 104
2240 nth_primitive go to state 105
2241 @@ -3256,7 +3256,7 @@
2245 - 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, '(', '`', ',', '>', '+', '-', '!', ';', '}', '@:>@', ')']
2246 + 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, '(', '`', '+', '-', '!', ';', '}', '@:>@']
2247 147 | label . corner
2248 153 label: label . '.' LABEL
2250 @@ -3645,7 +3645,7 @@
2251 text_expr go to state 112
2252 text go to state 113
2253 place go to state 114
2254 - label go to state 102
2255 + label go to state 423
2256 ordinal go to state 103
2257 optional_ordinal_last go to state 104
2258 nth_primitive go to state 105
2259 @@ -3804,7 +3804,7 @@
2260 text_expr go to state 239
2261 text go to state 113
2262 place go to state 114
2263 - label go to state 102
2264 + label go to state 423
2265 ordinal go to state 103
2266 optional_ordinal_last go to state 104
2267 nth_primitive go to state 105
2268 @@ -4481,7 +4481,7 @@
2269 $default reduce using rule 89 (object_spec)
2271 place go to state 114
2272 - label go to state 102
2273 + label go to state 423
2274 ordinal go to state 103
2275 optional_ordinal_last go to state 104
2276 nth_primitive go to state 105
2277 @@ -4673,7 +4673,7 @@
2278 $default reduce using rule 91 (object_spec)
2280 place go to state 114
2281 - label go to state 102
2282 + label go to state 423
2283 ordinal go to state 103
2284 optional_ordinal_last go to state 104
2285 nth_primitive go to state 105
2286 @@ -4867,7 +4867,7 @@
2287 $default reduce using rule 95 (object_spec)
2289 place go to state 114
2290 - label go to state 102
2291 + label go to state 423
2292 ordinal go to state 103
2293 optional_ordinal_last go to state 104
2294 nth_primitive go to state 105
2295 @@ -5065,7 +5065,7 @@
2296 $default reduce using rule 93 (object_spec)
2298 place go to state 114
2299 - label go to state 102
2300 + label go to state 423
2301 ordinal go to state 103
2302 optional_ordinal_last go to state 104
2303 nth_primitive go to state 105
2304 @@ -5260,7 +5260,7 @@
2305 '!' shift, and go to state 94
2307 place go to state 114
2308 - label go to state 102
2309 + label go to state 423
2310 ordinal go to state 103
2311 optional_ordinal_last go to state 104
2312 nth_primitive go to state 105
2313 @@ -5403,7 +5403,7 @@
2314 '!' shift, and go to state 94
2316 place go to state 114
2317 - label go to state 102
2318 + label go to state 423
2319 ordinal go to state 103
2320 optional_ordinal_last go to state 104
2321 nth_primitive go to state 105
2322 @@ -5546,7 +5546,7 @@
2323 '!' shift, and go to state 94
2325 place go to state 114
2326 - label go to state 102
2327 + label go to state 423
2328 ordinal go to state 103
2329 optional_ordinal_last go to state 104
2330 nth_primitive go to state 105
2331 @@ -5689,7 +5689,7 @@
2332 '!' shift, and go to state 94
2334 place go to state 114
2335 - label go to state 102
2336 + label go to state 423
2337 ordinal go to state 103
2338 optional_ordinal_last go to state 104
2339 nth_primitive go to state 105
2340 @@ -6475,7 +6475,7 @@
2342 expr_pair go to state 280
2343 place go to state 114
2344 - label go to state 102
2345 + label go to state 423
2346 ordinal go to state 103
2347 optional_ordinal_last go to state 104
2348 nth_primitive go to state 105
2349 @@ -6633,7 +6633,7 @@
2350 $default reduce using rule 105 (object_spec)
2352 place go to state 114
2353 - label go to state 102
2354 + label go to state 423
2355 ordinal go to state 103
2356 optional_ordinal_last go to state 104
2357 nth_primitive go to state 105
2358 @@ -6825,7 +6825,7 @@
2359 $default reduce using rule 107 (object_spec)
2361 place go to state 114
2362 - label go to state 102
2363 + label go to state 423
2364 ordinal go to state 103
2365 optional_ordinal_last go to state 104
2366 nth_primitive go to state 105
2367 @@ -7017,7 +7017,7 @@
2368 $default reduce using rule 114 (object_spec)
2370 place go to state 114
2371 - label go to state 102
2372 + label go to state 423
2373 ordinal go to state 103
2374 optional_ordinal_last go to state 104
2375 nth_primitive go to state 105
2376 @@ -7264,7 +7264,7 @@
2377 '!' shift, and go to state 94
2379 place go to state 114
2380 - label go to state 102
2381 + label go to state 423
2382 ordinal go to state 103
2383 optional_ordinal_last go to state 104
2384 nth_primitive go to state 105
2385 @@ -7408,7 +7408,7 @@
2386 $default reduce using rule 109 (object_spec)
2388 place go to state 114
2389 - label go to state 102
2390 + label go to state 423
2391 ordinal go to state 103
2392 optional_ordinal_last go to state 104
2393 nth_primitive go to state 105
2394 @@ -7819,12 +7819,12 @@
2395 position_not_place go to state 296
2396 expr_pair go to state 100
2397 place go to state 297
2398 - label go to state 102
2399 + label go to state 423
2400 ordinal go to state 103
2401 optional_ordinal_last go to state 104
2402 nth_primitive go to state 105
2403 corner go to state 106
2404 - expr go to state 266
2405 + expr go to state 424
2409 @@ -7987,7 +7987,7 @@
2410 text_expr go to state 112
2411 text go to state 113
2412 place go to state 114
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 @@ -8172,7 +8172,7 @@
2419 text_expr go to state 112
2420 text go to state 113
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 @@ -8333,7 +8333,7 @@
2428 text_expr go to state 112
2429 text go to state 113
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 @@ -8494,7 +8494,7 @@
2437 text_expr go to state 112
2438 text go to state 113
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 @@ -8655,7 +8655,7 @@
2446 text_expr go to state 112
2447 text go to state 113
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 @@ -8816,7 +8816,7 @@
2455 text_expr go to state 112
2456 text go to state 113
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 @@ -8977,7 +8977,7 @@
2464 text_expr go to state 112
2465 text go to state 113
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 @@ -9138,7 +9138,7 @@
2473 text_expr go to state 112
2474 text go to state 113
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 @@ -9299,7 +9299,7 @@
2482 text_expr go to state 112
2483 text go to state 113
2484 place go to state 114
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 @@ -9460,7 +9460,7 @@
2491 text_expr go to state 112
2492 text go to state 113
2493 place go to state 114
2494 - label go to state 102
2495 + label go to state 423
2496 ordinal go to state 103
2497 optional_ordinal_last go to state 104
2498 nth_primitive go to state 105
2499 @@ -9623,7 +9623,7 @@
2500 text_expr go to state 112
2501 text go to state 113
2502 place go to state 114
2503 - label go to state 102
2504 + label go to state 423
2505 ordinal go to state 103
2506 optional_ordinal_last go to state 104
2507 nth_primitive go to state 105
2508 @@ -9784,7 +9784,7 @@
2509 text_expr go to state 112
2510 text go to state 113
2511 place go to state 114
2512 - label go to state 102
2513 + label go to state 423
2514 ordinal go to state 103
2515 optional_ordinal_last go to state 104
2516 nth_primitive go to state 105
2517 @@ -9921,7 +9921,7 @@
2519 $default reduce using rule 47 (any_expr)
2521 - between go to state 237
2522 + between go to state 425
2526 @@ -10152,7 +10152,7 @@
2528 expr_pair go to state 317
2529 place go to state 114
2530 - label go to state 102
2531 + label go to state 423
2532 ordinal go to state 103
2533 optional_ordinal_last go to state 104
2534 nth_primitive go to state 105
2535 @@ -10298,7 +10298,7 @@
2537 expr_pair go to state 318
2538 place go to state 114
2539 - label go to state 102
2540 + label go to state 423
2541 ordinal go to state 103
2542 optional_ordinal_last go to state 104
2543 nth_primitive go to state 105
2544 @@ -10622,7 +10622,7 @@
2545 '!' shift, and go to state 94
2547 place go to state 114
2548 - label go to state 102
2549 + label go to state 423
2550 ordinal go to state 103
2551 optional_ordinal_last go to state 104
2552 nth_primitive go to state 105
2553 @@ -10765,7 +10765,7 @@
2554 '!' shift, and go to state 94
2556 place go to state 114
2557 - label go to state 102
2558 + label go to state 423
2559 ordinal go to state 103
2560 optional_ordinal_last go to state 104
2561 nth_primitive go to state 105
2562 @@ -10908,7 +10908,7 @@
2563 '!' shift, and go to state 94
2565 place go to state 114
2566 - label go to state 102
2567 + label go to state 423
2568 ordinal go to state 103
2569 optional_ordinal_last go to state 104
2570 nth_primitive go to state 105
2571 @@ -11051,7 +11051,7 @@
2572 '!' shift, and go to state 94
2574 place go to state 114
2575 - label go to state 102
2576 + label go to state 423
2577 ordinal go to state 103
2578 optional_ordinal_last go to state 104
2579 nth_primitive go to state 105
2580 @@ -11194,7 +11194,7 @@
2581 '!' shift, and go to state 94
2583 place go to state 114
2584 - label go to state 102
2585 + label go to state 423
2586 ordinal go to state 103
2587 optional_ordinal_last go to state 104
2588 nth_primitive go to state 105
2589 @@ -11337,7 +11337,7 @@
2590 '!' shift, and go to state 94
2592 place go to state 114
2593 - label go to state 102
2594 + label go to state 423
2595 ordinal go to state 103
2596 optional_ordinal_last go to state 104
2597 nth_primitive go to state 105
2598 @@ -11480,7 +11480,7 @@
2599 '!' shift, and go to state 94
2601 place go to state 114
2602 - label go to state 102
2603 + label go to state 423
2604 ordinal go to state 103
2605 optional_ordinal_last go to state 104
2606 nth_primitive go to state 105
2607 @@ -11637,7 +11637,7 @@
2608 position_not_place go to state 99
2609 expr_pair go to state 100
2610 place go to state 101
2611 - label go to state 102
2612 + label go to state 423
2613 ordinal go to state 103
2614 optional_ordinal_last go to state 104
2615 nth_primitive go to state 105
2616 @@ -11780,7 +11780,7 @@
2617 '!' shift, and go to state 94
2619 place go to state 114
2620 - label go to state 102
2621 + label go to state 423
2622 ordinal go to state 103
2623 optional_ordinal_last go to state 104
2624 nth_primitive go to state 105
2625 @@ -11923,7 +11923,7 @@
2626 '!' shift, and go to state 94
2628 place go to state 114
2629 - label go to state 102
2630 + label go to state 423
2631 ordinal go to state 103
2632 optional_ordinal_last go to state 104
2633 nth_primitive go to state 105
2634 @@ -12066,7 +12066,7 @@
2635 '!' shift, and go to state 94
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 @@ -12209,7 +12209,7 @@
2644 '!' shift, and go to state 94
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 @@ -12352,7 +12352,7 @@
2653 '!' shift, and go to state 94
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 @@ -12495,7 +12495,7 @@
2662 '!' shift, and go to state 94
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 @@ -12638,7 +12638,7 @@
2671 '!' shift, and go to state 94
2673 place go to state 114
2674 - label go to state 102
2675 + label go to state 423
2676 ordinal go to state 103
2677 optional_ordinal_last go to state 104
2678 nth_primitive go to state 105
2679 @@ -12794,12 +12794,12 @@
2680 position_not_place go to state 99
2681 expr_pair go to state 100
2682 place go to state 101
2683 - label go to state 102
2684 + label go to state 423
2685 ordinal go to state 103
2686 optional_ordinal_last go to state 104
2687 nth_primitive go to state 105
2688 corner go to state 106
2689 - expr go to state 266
2690 + expr go to state 424
2694 @@ -12937,7 +12937,7 @@
2695 '!' shift, and go to state 94
2697 place go to state 114
2698 - label go to state 102
2699 + label go to state 423
2700 ordinal go to state 103
2701 optional_ordinal_last go to state 104
2702 nth_primitive go to state 105
2703 @@ -13160,7 +13160,7 @@
2704 text_expr go to state 342
2705 text go to state 113
2706 place go to state 114
2707 - label go to state 102
2708 + label go to state 423
2709 ordinal go to state 103
2710 optional_ordinal_last go to state 104
2711 nth_primitive go to state 105
2712 @@ -13319,7 +13319,7 @@
2713 text_expr go to state 344
2714 text go to state 113
2715 place go to state 114
2716 - label go to state 102
2717 + label go to state 423
2718 ordinal go to state 103
2719 optional_ordinal_last go to state 104
2720 nth_primitive go to state 105
2721 @@ -13502,7 +13502,7 @@
2722 text_expr go to state 348
2723 text go to state 113
2724 place go to state 114
2725 - label go to state 102
2726 + label go to state 423
2727 ordinal go to state 103
2728 optional_ordinal_last go to state 104
2729 nth_primitive go to state 105
2730 @@ -13661,7 +13661,7 @@
2731 text_expr go to state 350
2732 text go to state 113
2733 place go to state 114
2734 - label go to state 102
2735 + label go to state 423
2736 ordinal go to state 103
2737 optional_ordinal_last go to state 104
2738 nth_primitive go to state 105
2739 @@ -13804,7 +13804,7 @@
2740 '!' shift, and go to state 94
2742 place go to state 114
2743 - label go to state 102
2744 + label go to state 423
2745 ordinal go to state 103
2746 optional_ordinal_last go to state 104
2747 nth_primitive go to state 105
2748 @@ -14747,7 +14747,7 @@
2749 position_not_place go to state 99
2750 expr_pair go to state 191
2751 place go to state 101
2752 - label go to state 102
2753 + label go to state 423
2754 ordinal go to state 103
2755 optional_ordinal_last go to state 104
2756 nth_primitive go to state 105
2757 @@ -15074,7 +15074,7 @@
2758 text go to state 113
2759 expr_pair go to state 365
2760 place go to state 114
2761 - label go to state 102
2762 + label go to state 423
2763 ordinal go to state 103
2764 optional_ordinal_last go to state 104
2765 nth_primitive go to state 105
2766 @@ -15693,12 +15693,12 @@
2767 position_not_place go to state 99
2768 expr_pair go to state 100
2769 place go to state 101
2770 - label go to state 102
2771 + label go to state 423
2772 ordinal go to state 103
2773 optional_ordinal_last go to state 104
2774 nth_primitive go to state 105
2775 corner go to state 106
2776 - expr go to state 266
2777 + expr go to state 424
2781 @@ -16124,7 +16124,7 @@
2783 $default reduce using rule 239 (expr)
2785 - between go to state 237
2786 + between go to state 425
2788 Conflict between rule 239 and token OF resolved as shift ('<' < OF).
2789 Conflict between rule 239 and token BETWEEN resolved as shift ('<' < BETWEEN).
2790 @@ -17234,7 +17234,7 @@
2791 text_expr go to state 112
2792 text go to state 113
2793 place go to state 114
2794 - label go to state 102
2795 + label go to state 423
2796 ordinal go to state 103
2797 optional_ordinal_last go to state 104
2798 nth_primitive go to state 105
2799 @@ -17416,7 +17416,7 @@
2800 text_expr go to state 112
2801 text go to state 113
2802 place go to state 114
2803 - label go to state 102
2804 + label go to state 423
2805 ordinal go to state 103
2806 optional_ordinal_last go to state 104
2807 nth_primitive go to state 105
2808 @@ -17577,7 +17577,7 @@
2809 text_expr go to state 112
2810 text go to state 113
2811 place go to state 114
2812 - label go to state 102
2813 + label go to state 423
2814 ordinal go to state 103
2815 optional_ordinal_last go to state 104
2816 nth_primitive go to state 105
2817 @@ -17772,12 +17772,12 @@
2818 position_not_place go to state 99
2819 expr_pair go to state 100
2820 place go to state 101
2821 - label go to state 102
2822 + label go to state 423
2823 ordinal go to state 103
2824 optional_ordinal_last go to state 104
2825 nth_primitive go to state 105
2826 corner go to state 106
2827 - expr go to state 266
2828 + expr go to state 424
2832 @@ -18071,7 +18071,7 @@
2833 '!' shift, and go to state 94
2835 place go to state 114
2836 - label go to state 102
2837 + label go to state 423
2838 ordinal go to state 103
2839 optional_ordinal_last go to state 104
2840 nth_primitive go to state 105
2841 @@ -18221,7 +18221,7 @@
2842 '!' shift, and go to state 94
2844 place go to state 114
2845 - label go to state 102
2846 + label go to state 423
2847 ordinal go to state 103
2848 optional_ordinal_last go to state 104
2849 nth_primitive go to state 105
2850 @@ -18830,7 +18830,7 @@
2851 '!' shift, and go to state 94
2853 place go to state 114
2854 - label go to state 102
2855 + label go to state 423
2856 ordinal go to state 103
2857 optional_ordinal_last go to state 104
2858 nth_primitive go to state 105
2859 @@ -18987,7 +18987,7 @@
2860 '!' shift, and go to state 94
2862 place go to state 114
2863 - label go to state 102
2864 + label go to state 423
2865 ordinal go to state 103
2866 optional_ordinal_last go to state 104
2867 nth_primitive go to state 105
2868 @@ -19089,3 +19089,440 @@
2869 29 placeless_element: FOR VARIABLE '=' expr TO expr optional_by DO $@6 DELIMITED .
2871 $default reduce using rule 29 (placeless_element)
2876 + 146 place: label . [$end, AND, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, ',', '>', '+', '-', ';', '}', '@:>@', ')']
2877 + 147 | label . corner
2878 + 153 label: label . '.' LABEL
2879 + 180 corner: . DOT_N
2894 + 195 | . UPPER LEFT
2895 + 196 | . LOWER LEFT
2896 + 197 | . UPPER RIGHT
2897 + 198 | . LOWER RIGHT
2898 + 199 | . LEFT_CORNER
2899 + 200 | . RIGHT_CORNER
2900 + 201 | . UPPER LEFT_CORNER
2901 + 202 | . LOWER LEFT_CORNER
2902 + 203 | . UPPER RIGHT_CORNER
2903 + 204 | . LOWER RIGHT_CORNER
2912 + LEFT shift, and go to state 53
2913 + RIGHT shift, and go to state 54
2914 + DOT_N shift, and go to state 56
2915 + DOT_E shift, and go to state 57
2916 + DOT_W shift, and go to state 58
2917 + DOT_S shift, and go to state 59
2918 + DOT_NE shift, and go to state 60
2919 + DOT_SE shift, and go to state 61
2920 + DOT_NW shift, and go to state 62
2921 + DOT_SW shift, and go to state 63
2922 + DOT_C shift, and go to state 64
2923 + DOT_START shift, and go to state 65
2924 + DOT_END shift, and go to state 66
2925 + TOP shift, and go to state 78
2926 + BOTTOM shift, and go to state 79
2927 + UPPER shift, and go to state 80
2928 + LOWER shift, and go to state 81
2929 + LEFT_CORNER shift, and go to state 82
2930 + RIGHT_CORNER shift, and go to state 83
2931 + NORTH shift, and go to state 84
2932 + SOUTH shift, and go to state 85
2933 + EAST shift, and go to state 86
2934 + WEST shift, and go to state 87
2935 + CENTER shift, and go to state 88
2936 + END shift, and go to state 89
2937 + START shift, and go to state 90
2938 + '.' shift, and go to state 204
2940 + $default reduce using rule 146 (place)
2942 + corner go to state 205
2947 + 140 position_not_place: expr . between position AND position
2948 + 141 | expr . '<' position ',' position '>'
2949 + 142 between: . BETWEEN
2950 + 143 | . OF THE WAY BETWEEN
2951 + 144 expr_pair: expr . ',' expr
2952 + 219 expr: expr . '+' expr
2953 + 220 | expr . '-' expr
2954 + 221 | expr . '*' expr
2955 + 222 | expr . '/' expr
2956 + 223 | expr . '%' expr
2957 + 224 | expr . '^' expr
2958 + 239 | expr . '<' expr
2959 + 240 | expr . LESSEQUAL expr
2960 + 241 | expr . '>' expr
2961 + 242 | expr . GREATEREQUAL expr
2962 + 243 | expr . EQUALEQUAL expr
2963 + 244 | expr . NOTEQUAL expr
2964 + 245 | expr . ANDAND expr
2965 + 246 | expr . OROR expr
2967 + OF shift, and go to state 220
2968 + BETWEEN shift, and go to state 221
2969 + ANDAND shift, and go to state 222
2970 + OROR shift, and go to state 223
2971 + NOTEQUAL shift, and go to state 224
2972 + EQUALEQUAL shift, and go to state 225
2973 + LESSEQUAL shift, and go to state 226
2974 + GREATEREQUAL shift, and go to state 227
2975 + ',' shift, and go to state 228
2976 + '<' shift, and go to state 229
2977 + '>' shift, and go to state 230
2978 + '+' shift, and go to state 231
2979 + '-' shift, and go to state 232
2980 + '*' shift, and go to state 233
2981 + '/' shift, and go to state 234
2982 + '%' shift, and go to state 235
2983 + '^' shift, and go to state 236
2985 + between go to state 425
2990 + 134 position: . position_not_place
2992 + 136 position_not_place: . expr_pair
2993 + 137 | . position '+' expr_pair
2994 + 138 | . position '-' expr_pair
2995 + 139 | . '(' position ',' position ')'
2996 + 140 | . expr between position AND position
2997 + 140 | expr between . position AND position
2998 + 141 | . expr '<' position ',' position '>'
2999 + 144 expr_pair: . expr ',' expr
3000 + 145 | . '(' expr_pair ')'
3001 + 146 place: . label
3002 + 147 | . label corner
3003 + 148 | . corner label
3004 + 149 | . corner OF label
3006 + 151 label: . LABEL
3007 + 152 | . nth_primitive
3008 + 153 | . label '.' LABEL
3009 + 154 ordinal: . ORDINAL
3010 + 155 | . '`' any_expr TH
3011 + 156 optional_ordinal_last: . LAST
3012 + 157 | . ordinal LAST
3013 + 158 nth_primitive: . ordinal object_type
3014 + 159 | . optional_ordinal_last object_type
3015 + 180 corner: . DOT_N
3030 + 195 | . UPPER LEFT
3031 + 196 | . LOWER LEFT
3032 + 197 | . UPPER RIGHT
3033 + 198 | . LOWER RIGHT
3034 + 199 | . LEFT_CORNER
3035 + 200 | . RIGHT_CORNER
3036 + 201 | . UPPER LEFT_CORNER
3037 + 202 | . LOWER LEFT_CORNER
3038 + 203 | . UPPER RIGHT_CORNER
3039 + 204 | . LOWER RIGHT_CORNER
3047 + 212 expr: . VARIABLE
3049 + 214 | . place DOT_X
3050 + 215 | . place DOT_Y
3051 + 216 | . place DOT_HT
3052 + 217 | . place DOT_WID
3053 + 218 | . place DOT_RAD
3054 + 219 | . expr '+' expr
3055 + 220 | . expr '-' expr
3056 + 221 | . expr '*' expr
3057 + 222 | . expr '/' expr
3058 + 223 | . expr '%' expr
3059 + 224 | . expr '^' expr
3061 + 226 | . '(' any_expr ')'
3062 + 227 | . SIN '(' any_expr ')'
3063 + 228 | . COS '(' any_expr ')'
3064 + 229 | . ATAN2 '(' any_expr ',' any_expr ')'
3065 + 230 | . LOG '(' any_expr ')'
3066 + 231 | . EXP '(' any_expr ')'
3067 + 232 | . SQRT '(' any_expr ')'
3068 + 233 | . K_MAX '(' any_expr ',' any_expr ')'
3069 + 234 | . K_MIN '(' any_expr ',' any_expr ')'
3070 + 235 | . INT '(' any_expr ')'
3071 + 236 | . RAND '(' any_expr ')'
3072 + 237 | . RAND '(' ')'
3073 + 238 | . SRAND '(' any_expr ')'
3074 + 239 | . expr '<' expr
3075 + 240 | . expr LESSEQUAL expr
3076 + 241 | . expr '>' expr
3077 + 242 | . expr GREATEREQUAL expr
3078 + 243 | . expr EQUALEQUAL expr
3079 + 244 | . expr NOTEQUAL expr
3080 + 245 | . expr ANDAND expr
3081 + 246 | . expr OROR expr
3084 + LABEL shift, and go to state 48
3085 + VARIABLE shift, and go to state 49
3086 + NUMBER shift, and go to state 50
3087 + ORDINAL shift, and go to state 51
3088 + LAST shift, and go to state 52
3089 + LEFT shift, and go to state 53
3090 + RIGHT shift, and go to state 54
3091 + HERE shift, and go to state 55
3092 + DOT_N shift, and go to state 56
3093 + DOT_E shift, and go to state 57
3094 + DOT_W shift, and go to state 58
3095 + DOT_S shift, and go to state 59
3096 + DOT_NE shift, and go to state 60
3097 + DOT_SE shift, and go to state 61
3098 + DOT_NW shift, and go to state 62
3099 + DOT_SW shift, and go to state 63
3100 + DOT_C shift, and go to state 64
3101 + DOT_START shift, and go to state 65
3102 + DOT_END shift, and go to state 66
3103 + SIN shift, and go to state 67
3104 + COS shift, and go to state 68
3105 + ATAN2 shift, and go to state 69
3106 + LOG shift, and go to state 70
3107 + EXP shift, and go to state 71
3108 + SQRT shift, and go to state 72
3109 + K_MAX shift, and go to state 73
3110 + K_MIN shift, and go to state 74
3111 + INT shift, and go to state 75
3112 + RAND shift, and go to state 76
3113 + SRAND shift, and go to state 77
3114 + TOP shift, and go to state 78
3115 + BOTTOM shift, and go to state 79
3116 + UPPER shift, and go to state 80
3117 + LOWER shift, and go to state 81
3118 + LEFT_CORNER shift, and go to state 82
3119 + RIGHT_CORNER shift, and go to state 83
3120 + NORTH shift, and go to state 84
3121 + SOUTH shift, and go to state 85
3122 + EAST shift, and go to state 86
3123 + WEST shift, and go to state 87
3124 + CENTER shift, and go to state 88
3125 + END shift, and go to state 89
3126 + START shift, and go to state 90
3127 + '(' shift, and go to state 91
3128 + '`' shift, and go to state 92
3129 + '-' shift, and go to state 93
3130 + '!' shift, and go to state 94
3132 + position go to state 426
3133 + position_not_place go to state 99
3134 + expr_pair go to state 100
3135 + place go to state 101
3136 + label go to state 423
3137 + ordinal go to state 103
3138 + optional_ordinal_last go to state 104
3139 + nth_primitive go to state 105
3140 + corner go to state 106
3141 + expr go to state 424
3146 + 137 position_not_place: position . '+' expr_pair
3147 + 138 | position . '-' expr_pair
3148 + 140 | expr between position . AND position
3150 + AND shift, and go to state 427
3151 + '+' shift, and go to state 197
3152 + '-' shift, and go to state 198
3157 + 134 position: . position_not_place
3159 + 136 position_not_place: . expr_pair
3160 + 137 | . position '+' expr_pair
3161 + 138 | . position '-' expr_pair
3162 + 139 | . '(' position ',' position ')'
3163 + 140 | . expr between position AND position
3164 + 140 | expr between position AND . position
3165 + 141 | . expr '<' position ',' position '>'
3166 + 144 expr_pair: . expr ',' expr
3167 + 145 | . '(' expr_pair ')'
3168 + 146 place: . label
3169 + 147 | . label corner
3170 + 148 | . corner label
3171 + 149 | . corner OF label
3173 + 151 label: . LABEL
3174 + 152 | . nth_primitive
3175 + 153 | . label '.' LABEL
3176 + 154 ordinal: . ORDINAL
3177 + 155 | . '`' any_expr TH
3178 + 156 optional_ordinal_last: . LAST
3179 + 157 | . ordinal LAST
3180 + 158 nth_primitive: . ordinal object_type
3181 + 159 | . optional_ordinal_last object_type
3182 + 180 corner: . DOT_N
3197 + 195 | . UPPER LEFT
3198 + 196 | . LOWER LEFT
3199 + 197 | . UPPER RIGHT
3200 + 198 | . LOWER RIGHT
3201 + 199 | . LEFT_CORNER
3202 + 200 | . RIGHT_CORNER
3203 + 201 | . UPPER LEFT_CORNER
3204 + 202 | . LOWER LEFT_CORNER
3205 + 203 | . UPPER RIGHT_CORNER
3206 + 204 | . LOWER RIGHT_CORNER
3214 + 212 expr: . VARIABLE
3216 + 214 | . place DOT_X
3217 + 215 | . place DOT_Y
3218 + 216 | . place DOT_HT
3219 + 217 | . place DOT_WID
3220 + 218 | . place DOT_RAD
3221 + 219 | . expr '+' expr
3222 + 220 | . expr '-' expr
3223 + 221 | . expr '*' expr
3224 + 222 | . expr '/' expr
3225 + 223 | . expr '%' expr
3226 + 224 | . expr '^' expr
3228 + 226 | . '(' any_expr ')'
3229 + 227 | . SIN '(' any_expr ')'
3230 + 228 | . COS '(' any_expr ')'
3231 + 229 | . ATAN2 '(' any_expr ',' any_expr ')'
3232 + 230 | . LOG '(' any_expr ')'
3233 + 231 | . EXP '(' any_expr ')'
3234 + 232 | . SQRT '(' any_expr ')'
3235 + 233 | . K_MAX '(' any_expr ',' any_expr ')'
3236 + 234 | . K_MIN '(' any_expr ',' any_expr ')'
3237 + 235 | . INT '(' any_expr ')'
3238 + 236 | . RAND '(' any_expr ')'
3239 + 237 | . RAND '(' ')'
3240 + 238 | . SRAND '(' any_expr ')'
3241 + 239 | . expr '<' expr
3242 + 240 | . expr LESSEQUAL expr
3243 + 241 | . expr '>' expr
3244 + 242 | . expr GREATEREQUAL expr
3245 + 243 | . expr EQUALEQUAL expr
3246 + 244 | . expr NOTEQUAL expr
3247 + 245 | . expr ANDAND expr
3248 + 246 | . expr OROR expr
3251 + LABEL shift, and go to state 48
3252 + VARIABLE shift, and go to state 49
3253 + NUMBER shift, and go to state 50
3254 + ORDINAL shift, and go to state 51
3255 + LAST shift, and go to state 52
3256 + LEFT shift, and go to state 53
3257 + RIGHT shift, and go to state 54
3258 + HERE shift, and go to state 55
3259 + DOT_N shift, and go to state 56
3260 + DOT_E shift, and go to state 57
3261 + DOT_W shift, and go to state 58
3262 + DOT_S shift, and go to state 59
3263 + DOT_NE shift, and go to state 60
3264 + DOT_SE shift, and go to state 61
3265 + DOT_NW shift, and go to state 62
3266 + DOT_SW shift, and go to state 63
3267 + DOT_C shift, and go to state 64
3268 + DOT_START shift, and go to state 65
3269 + DOT_END shift, and go to state 66
3270 + SIN shift, and go to state 67
3271 + COS shift, and go to state 68
3272 + ATAN2 shift, and go to state 69
3273 + LOG shift, and go to state 70
3274 + EXP shift, and go to state 71
3275 + SQRT shift, and go to state 72
3276 + K_MAX shift, and go to state 73
3277 + K_MIN shift, and go to state 74
3278 + INT shift, and go to state 75
3279 + RAND shift, and go to state 76
3280 + SRAND shift, and go to state 77
3281 + TOP shift, and go to state 78
3282 + BOTTOM shift, and go to state 79
3283 + UPPER shift, and go to state 80
3284 + LOWER shift, and go to state 81
3285 + LEFT_CORNER shift, and go to state 82
3286 + RIGHT_CORNER shift, and go to state 83
3287 + NORTH shift, and go to state 84
3288 + SOUTH shift, and go to state 85
3289 + EAST shift, and go to state 86
3290 + WEST shift, and go to state 87
3291 + CENTER shift, and go to state 88
3292 + END shift, and go to state 89
3293 + START shift, and go to state 90
3294 + '(' shift, and go to state 91
3295 + '`' shift, and go to state 92
3296 + '-' shift, and go to state 93
3297 + '!' shift, and go to state 94
3299 + position go to state 402
3300 + position_not_place go to state 99
3301 + expr_pair go to state 100
3302 + place go to state 101
3303 + label go to state 423
3304 + ordinal go to state 103
3305 + optional_ordinal_last go to state 104
3306 + nth_primitive go to state 105
3307 + corner go to state 106
3308 + expr go to state 424
3314 dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR
3315 [AT_COND_CASE([[LALR]], [[1]], [[0]])],
3317 [AT_COND_CASE([[LALR]],
3318 [[syntax error, unexpected LEFT