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