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