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