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