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