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