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