]> git.saurik.com Git - bison.git/blame - tests/existing.at
warnings: use the regular interface for s/r and r/r conflicts
[bison.git] / tests / existing.at
CommitLineData
817e9f41 1# Exercising Bison on actual grammars. -*- Autotest -*-
2740f169 2
34136e65 3# Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2012 Free Software
575619af 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
db34f798
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]],
cf499cff 45 [[%define lr.type lalr
db34f798
JD
46]$3],
47 [$4], [$5], [$6], [$7],
c4be5517 48 [AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12])
db34f798 49AT_TEST_TABLES_AND_PARSE([$2[: IELR(1)]], [[IELR]], [[last-state]],
cf499cff 50 [[%define lr.type ielr
db34f798
JD
51]$3],
52 [$4], [$5], [$6], [$7],
c4be5517 53 [AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12])
db34f798
JD
54AT_TEST_TABLES_AND_PARSE([$2[: Canonical LR(1)]], [[canonical LR]],
55 [[last-state,no-xml]],
cf499cff 56 [[%define lr.type canonical-lr
db34f798
JD
57]$3],
58 [$4], [$5], [$6], [$7],
c4be5517 59 [$9], [$10], [$11], [$12])
db34f798
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
db34f798 71# mid-rule actions.
817e9f41 72#
db34f798
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
db34f798
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 '(' ')'
db34f798
JD
112]],
113[[
817e9f41 114start
e9690142
JD
115 : opt_nls program opt_nls
116 ;
817e9f41
AD
117
118program
e9690142
JD
119 : rule
120 | program rule
121 | error
122 | program error
123 | /* empty */
124 ;
817e9f41
AD
125
126rule
e9690142
JD
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 ;
817e9f41
AD
136
137func_name
e9690142
JD
138 : NAME
139 | FUNC_CALL
140 | lex_builtin
141 ;
817e9f41
AD
142
143lex_builtin
e9690142
JD
144 : LEX_BUILTIN
145 | LEX_LENGTH
146 ;
817e9f41
AD
147
148function_prologue
e9690142
JD
149 : LEX_FUNCTION {} func_name '(' opt_param_list r_paren opt_nls
150 ;
817e9f41
AD
151
152function_body
e9690142
JD
153 : l_brace statements r_brace opt_semi opt_nls
154 | l_brace r_brace opt_semi opt_nls
155 ;
817e9f41 156
817e9f41 157pattern
e9690142
JD
158 : exp
159 | exp ',' exp
160 ;
817e9f41
AD
161
162regexp
e9690142
JD
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 ;
817e9f41
AD
169
170action
e9690142
JD
171 : l_brace statements r_brace opt_semi opt_nls
172 | l_brace r_brace opt_semi opt_nls
173 ;
817e9f41
AD
174
175statements
e9690142
JD
176 : statement
177 | statements statement
178 | error
179 | statements error
180 ;
817e9f41
AD
181
182statement_term
e9690142
JD
183 : nls
184 | semi opt_nls
185 ;
817e9f41
AD
186
187statement
e9690142
JD
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 ;
817e9f41
AD
209
210print
e9690142
JD
211 : LEX_PRINT
212 | LEX_PRINTF
213 ;
817e9f41
AD
214
215if_statement
e9690142
JD
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 ;
817e9f41
AD
220
221nls
e9690142
JD
222 : NEWLINE
223 | nls NEWLINE
224 ;
817e9f41
AD
225
226opt_nls
e9690142
JD
227 : /* empty */
228 | nls
229 ;
817e9f41
AD
230
231input_redir
e9690142
JD
232 : /* empty */
233 | '<' simp_exp
234 ;
817e9f41
AD
235
236output_redir
e9690142
JD
237 : /* empty */
238 | '>' exp
239 | APPEND_OP exp
240 | '|' exp
241 | TWOWAYIO exp
242 ;
817e9f41
AD
243
244opt_param_list
e9690142
JD
245 : /* empty */
246 | param_list
247 ;
817e9f41
AD
248
249param_list
e9690142
JD
250 : NAME
251 | param_list comma NAME
252 | error
253 | param_list error
254 | param_list comma error
255 ;
817e9f41
AD
256
257/* optional expression, as in for loop */
258opt_exp
e9690142
JD
259 : /* empty */
260 | exp
261 ;
817e9f41
AD
262
263opt_rexpression_list
e9690142
JD
264 : /* empty */
265 | rexpression_list
266 ;
817e9f41
AD
267
268rexpression_list
e9690142
JD
269 : rexp
270 | rexpression_list comma rexp
271 | error
272 | rexpression_list error
273 | rexpression_list error rexp
274 | rexpression_list comma error
275 ;
817e9f41
AD
276
277opt_expression_list
e9690142
JD
278 : /* empty */
279 | expression_list
280 ;
817e9f41
AD
281
282expression_list
e9690142
JD
283 : exp
284 | expression_list comma exp
285 | error
286 | expression_list error
287 | expression_list error exp
288 | expression_list comma error
289 ;
817e9f41
AD
290
291/* Expressions, not including the comma operator. */
e9690142
JD
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 ;
817e9f41
AD
310
311rexp
e9690142
JD
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 ;
817e9f41
AD
325
326simp_exp
e9690142
JD
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 ;
817e9f41
AD
338
339non_post_simp_exp
e9690142
JD
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 ;
817e9f41
AD
355
356opt_variable
e9690142
JD
357 : /* empty */
358 | variable
359 ;
817e9f41
AD
360
361variable
e9690142
JD
362 : NAME
363 | NAME '[' expression_list ']'
364 | '$' non_post_simp_exp
365 ;
817e9f41
AD
366
367l_brace
e9690142
JD
368 : '{' opt_nls
369 ;
817e9f41
AD
370
371r_brace
e9690142
JD
372 : '}' opt_nls
373 ;
817e9f41
AD
374
375r_paren
e9690142
JD
376 : ')'
377 ;
817e9f41
AD
378
379opt_semi
e9690142
JD
380 : /* empty */
381 | semi
382 ;
817e9f41
AD
383
384semi
e9690142
JD
385 : ';'
386 ;
817e9f41 387
e9690142
JD
388comma : ',' opt_nls
389 ;
db34f798
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]],
d87ea54c
AD
427[[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]]],
428[[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]]])[
db34f798
JD
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
db34f798 780AT_TEST_EXISTING_GRAMMAR([[GNU Cim Grammar]],
765e1bd4 781[[
817e9f41 782%token
e9690142
JD
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
817e9f41 810
affac613
AD
811%token HIDENTIFIER
812%token HBOOLEANKONST HINTEGERKONST HCHARACTERKONST
813%token HREALKONST
814%token HTEXTKONST
817e9f41 815
817e9f41 816
affac613 817%right HASSIGN
817e9f41
AD
818%left HORELSE
819%left HANDTHEN
820%left HEQV
821%left HIMP
822%left HOR
823%left HAND
824
825%left HNOT
826
affac613 827%left HVALRELOPERATOR HREFRELOPERATOR HOBJRELOPERATOR
817e9f41 828
e9690142 829%left HCONC
817e9f41 830
affac613
AD
831%left HTERMOPERATOR
832%left UNEAR
833%left HFACTOROPERATOR
817e9f41
AD
834%left HPRIMARYOPERATOR
835
836%left HQUA
837
838%left HDOT
839
840%start MAIN_MODULE
db34f798
JD
841]],
842[[
817e9f41 843/* GRAMATIKK FOR PROGRAM MODULES */
affac613 844MAIN_MODULE : {}
e9690142
JD
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 ;
817e9f41 902/* GRAMATIKK FOR TYPER */
affac613 903NO_TYPE : /*EMPT*/
e9690142 904 ;
817e9f41 905MBEE_TYPE : NO_TYPE
e9690142
JD
906 | TYPE
907 ;
817e9f41 908TYPE : HREF HBEGPAR
e9690142
JD
909 HIDENTIFIER
910 {}
911 HENDPAR
912 | HTEXT
913 | HBOOLEAN
914 | HCHARACTER
915 | HSHORT HINTEGER
916 | HINTEGER
917 | HREAL
918 | HLONG HREAL
919 ;
817e9f41
AD
920
921/* GRAMATIKK FOR DEL AV SETNINGER */
922MBEE_ELSE_PART : /*EMPT*/
e9690142
JD
923/* | HELSE
924 HIF
925 EXPRESSION
926 HTHEN {}
927 BLOCK {}
928 MBEE_ELSE_PART {}*/
929 | HELSE {}
930 BLOCK
931 ;
affac613 932FOR_LIST : FOR_LIST_ELEMENT
e9690142
JD
933 | FOR_LIST_ELEMENT
934 HPAREXPSEPARATOR
935 FOR_LIST
936 ;
817e9f41 937FOR_LIST_ELEMENT: EXPRESSION
e9690142
JD
938 MBEE_F_L_EL_R_PT
939 ;
817e9f41 940MBEE_F_L_EL_R_PT: /*EMPT*/
e9690142
JD
941 | HWHILE
942 EXPRESSION
943 | HSTEP
944 EXPRESSION
945 HUNTIL
946 EXPRESSION
947 ;
817e9f41 948GOTO : HGO
e9690142
JD
949 HTO
950 | HGOTO
951 ;
817e9f41 952CONN_STATE_R_PT : WHEN_CLAUSE_LIST
e9690142
JD
953 | HDO {}
954 BLOCK
955 ;
817e9f41 956WHEN_CLAUSE_LIST: HWHEN
e9690142
JD
957 HIDENTIFIER
958 HDO {}
959 BLOCK
960 | WHEN_CLAUSE_LIST
961 HWHEN
962 HIDENTIFIER
963 HDO {}
964 BLOCK
965 ;
817e9f41 966MBEE_OTWI_CLAUS : /*EMPT*/
e9690142
JD
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 ;
817e9f41
AD
989/* GRAMATIKK FOR SETNINGER OG DEKLARASJONER */
990MODULSTATEMENT : HWHILE
e9690142
JD
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 ;
affac613 1055IMPORT_SPEC_MODULE:
e9690142
JD
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 ;
affac613 1075BLOCK : DECLSTATEMENT
e9690142
JD
1076 | HBEGIN MBEE_DECLSTMS HEND
1077 | HBEGIN error HSTATEMENTSEPARATOR MBEE_DECLSTMS HEND
1078 | HBEGIN error HEND
1079 ;
affac613 1080MBEE_DECLSTMS : MBEE_DECLSTMSU
e9690142 1081 ;
affac613 1082MBEE_DECLSTMSU : DECLSTATEMENT
e9690142
JD
1083 | MBEE_DECLSTMSU
1084 HSTATEMENTSEPARATOR
1085 DECLSTATEMENT
1086 ;
1087MODULS : MODULSTATEMENT
1088 | MODULS HSTATEMENTSEPARATOR MODULSTATEMENT
1089 ;
817e9f41
AD
1090/* GRAMATIKK FOR DEL AV DEKLARASJONER */
1091ARR_SEGMENT_LIST: ARR_SEGMENT
e9690142
JD
1092 | ARR_SEGMENT_LIST
1093 HPAREXPSEPARATOR
1094 ARR_SEGMENT
1095 ;
1096ARR_SEGMENT : ARRAY_SEGMENT
1097 HBEGPAR
1098 BAUND_PAIR_LIST HENDPAR
1099 ;
affac613 1100ARRAY_SEGMENT : ARRAY_SEGMENT_EL {}
817e9f41 1101
e9690142
JD
1102 | ARRAY_SEGMENT_EL
1103 HPAREXPSEPARATOR
1104 ARRAY_SEGMENT
1105 ;
affac613 1106ARRAY_SEGMENT_EL: HIDENTIFIER
e9690142 1107 ;
affac613 1108BAUND_PAIR_LIST : BAUND_PAIR
e9690142
JD
1109 | BAUND_PAIR
1110 HPAREXPSEPARATOR
1111 BAUND_PAIR_LIST
1112 ;
817e9f41 1113BAUND_PAIR : EXPRESSION
e9690142
JD
1114 HLABELSEPARATOR
1115 EXPRESSION
1116 ;
affac613 1117SWITCH_LIST : EXPRESSION
e9690142
JD
1118 | EXPRESSION
1119 HPAREXPSEPARATOR
1120 SWITCH_LIST
1121 ;
affac613 1122HEADING : MBEE_FMAL_PAR_P HSTATEMENTSEPARATOR {}
e9690142
JD
1123 MBEE_MODE_PART {}
1124 MBEE_SPEC_PART {}
1125 MBEE_PROT_PART {}
1126 MBEE_VIRT_PART
1127 ;
817e9f41 1128MBEE_FMAL_PAR_P : /*EMPT*/
e9690142
JD
1129 | FMAL_PAR_PART
1130 ;
817e9f41 1131FMAL_PAR_PART : HBEGPAR NO_TYPE
e9690142
JD
1132 MBEE_LISTV HENDPAR
1133 ;
817e9f41 1134MBEE_LISTV : /*EMPT*/
e9690142
JD
1135 | LISTV
1136 ;
affac613 1137LISTV : HIDENTIFIER
e9690142
JD
1138 | FPP_CATEG HDOTDOTDOT
1139 | HIDENTIFIER {}
1140 HPAREXPSEPARATOR LISTV
1141 | FPP_SPEC
1142 | FPP_SPEC
1143 HPAREXPSEPARATOR LISTV
1144 ;
817e9f41 1145FPP_HEADING : HBEGPAR NO_TYPE
e9690142
JD
1146 FPP_MBEE_LISTV HENDPAR
1147 ;
817e9f41 1148FPP_MBEE_LISTV : /*EMPT*/
e9690142
JD
1149 | FPP_LISTV
1150 ;
1151FPP_LISTV : FPP_CATEG HDOTDOTDOT
1152 | FPP_SPEC
1153 | FPP_SPEC
1154 HPAREXPSEPARATOR LISTV
1155 ;
817e9f41 1156FPP_SPEC : FPP_CATEG SPECIFIER HIDENTIFIER
e9690142
JD
1157 | FPP_CATEG FPP_PROC_DECL_IN_SPEC
1158 ;
817e9f41 1159FPP_CATEG : HNAME HLABELSEPARATOR
e9690142
JD
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 ;
affac613 1169IDENTIFIER_LISTV: HIDENTIFIER
e9690142
JD
1170 | HDOTDOTDOT
1171 | HIDENTIFIER {}
1172 HPAREXPSEPARATOR IDENTIFIER_LISTV
1173 ;
817e9f41 1174MBEE_MODE_PART : /*EMPT*/
e9690142
JD
1175 | MODE_PART
1176 ;
817e9f41 1177MODE_PART : NAME_PART
e9690142
JD
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 ;
affac613 1193NAME_PART : HNAME {}
e9690142
JD
1194 IDENTIFIER_LISTV
1195 HSTATEMENTSEPARATOR
1196 ;
affac613 1197VAR_PART : HVAR {}
e9690142
JD
1198 IDENTIFIER_LISTV
1199 HSTATEMENTSEPARATOR
1200 ;
affac613 1201VALUE_PART : HVALUE {}
e9690142
JD
1202 IDENTIFIER_LISTV HSTATEMENTSEPARATOR
1203 ;
817e9f41 1204MBEE_SPEC_PART : /*EMPT*/
e9690142
JD
1205 | SPEC_PART
1206 ;
817e9f41 1207SPEC_PART : ONE_SPEC
e9690142
JD
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 ;
affac613 1219SPECIFIER : TYPE
e9690142
JD
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 ;
817e9f41 1235MBEE_PROT_PART : /*EMPT*/
e9690142
JD
1236 | PROTECTION_PART
1237 ;
817e9f41 1238PROTECTION_PART : PROT_SPECIFIER IDENTIFIER_LIST
e9690142
JD
1239 HSTATEMENTSEPARATOR
1240 | PROTECTION_PART PROT_SPECIFIER
1241 IDENTIFIER_LIST HSTATEMENTSEPARATOR
1242 ;
affac613 1243PROT_SPECIFIER : HHIDDEN
e9690142
JD
1244 | HPROTECTED
1245 | HHIDDEN
1246 HPROTECTED
1247 | HPROTECTED
1248 HHIDDEN
1249 ;
817e9f41 1250MBEE_VIRT_PART : /*EMPT*/
e9690142
JD
1251 | VIRTUAL_PART
1252 ;
817e9f41 1253VIRTUAL_PART : HVIRTUAL
e9690142
JD
1254 HLABELSEPARATOR
1255 MBEE_SPEC_PART
1256 ;
affac613 1257IDENTIFIER_LIST : HIDENTIFIER
e9690142
JD
1258 | IDENTIFIER_LIST HPAREXPSEPARATOR
1259 HIDENTIFIER
1260 ;
817e9f41 1261IDENTIFIER_LISTC: HIDENTIFIER
e9690142
JD
1262 MBEE_CONSTANT
1263 | IDENTIFIER_LISTC HPAREXPSEPARATOR
1264 HIDENTIFIER
1265 MBEE_CONSTANT
1266 ;
1267MBEE_CONSTANT : /* EMPTY */
1268 | HVALRELOPERATOR
1269 {}
1270 EXPRESSION
1271 ;
817e9f41
AD
1272
1273/* GRAMATIKK FOR UTTRYKK */
affac613 1274EXPRESSION : EXPRESSION_SIMP
e9690142
JD
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 ;
affac613 1348ARG_R_PT : /*EMPTY*/
e9690142
JD
1349 | HBEGPAR
1350 ARGUMENT_LIST HENDPAR
1351 ;
affac613 1352MBEE_ARG_R_PT : /*EMPTY*/
e9690142
JD
1353 | HBEGPAR
1354 ARGUMENT_LIST HENDPAR
1355 ;
affac613 1356ARGUMENT_LIST : EXPRESSION
e9690142
JD
1357 | EXPRESSION
1358 HPAREXPSEPARATOR
1359 ARGUMENT_LIST
1360 ;
db34f798
JD
1361]],
1362
1363dnl INPUT
1364[[]],
1365
1366dnl BISON-STDERR
1367[AT_COND_CASE([[canonical LR]],
d87ea54c
AD
1368[[input.y: warning: 1876 shift/reduce conflicts [-Wconflicts-sr]
1369input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]]],
1370[[input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr]
1371input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]]])[
db34f798
JD
1372]],
1373
1374dnl LAST-STATE
1375[AT_COND_CASE([[canonical LR]], [[10425]], [[442]])],
817e9f41 1376
db34f798
JD
1377dnl LALR1-DIFF not used for canonical LR(1) because the diff is huge.
1378[],
817e9f41 1379
db34f798
JD
1380dnl OTHER-CHECKS
1381[AT_COND_CASE([[canonical LR]], [[]],
1382[AT_CHECK([[grep '^State.*conflicts:' input.output]], [[0]],
a4b746ea
PE
1383[[State 64 conflicts: 14 shift/reduce
1384State 164 conflicts: 1 shift/reduce
1385State 201 conflicts: 33 shift/reduce, 4 reduce/reduce
1386State 206 conflicts: 1 shift/reduce
1387State 240 conflicts: 1 shift/reduce
1388State 335 conflicts: 9 shift/reduce, 2 reduce/reduce
1389State 356 conflicts: 1 shift/reduce
1390State 360 conflicts: 9 shift/reduce, 2 reduce/reduce
1391State 427 conflicts: 9 shift/reduce, 2 reduce/reduce
db34f798 1392]])])])
817e9f41 1393
db34f798
JD
1394## -------------------------------- ##
1395## GNU pic (Groff 1.18.1) Grammar. ##
1396## -------------------------------- ##
2740f169
PE
1397
1398# GNU pic, part of groff.
1399
1400# Bison once reported shift/reduce conflicts that it shouldn't have.
1401
db34f798
JD
1402AT_TEST_EXISTING_GRAMMAR([[GNU pic (Groff 1.18.1) Grammar]],
1403[[%error-verbose
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
cbdb6d91 1483%token THROUGH
2740f169
PE
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 '^'
db34f798
JD
1569]],
1570[[
2740f169 1571top:
e9690142
JD
1572 optional_separator
1573 | element_list
1574 ;
2740f169 1575
2740f169 1576element_list:
e9690142
JD
1577 optional_separator middle_element_list optional_separator
1578 ;
2740f169
PE
1579
1580middle_element_list:
e9690142
JD
1581 element
1582 | middle_element_list separator element
1583 ;
2740f169
PE
1584
1585optional_separator:
e9690142
JD
1586 /* empty */
1587 | separator
1588 ;
2740f169
PE
1589
1590separator:
e9690142
JD
1591 ';'
1592 | separator ';'
1593 ;
2740f169
PE
1594
1595placeless_element:
e9690142
JD
1596 VARIABLE '=' any_expr
1597 | VARIABLE ':' '=' any_expr
1598 | UP
1599 | DOWN
1600 | LEFT
1601 | RIGHT
1602 | COMMAND_LINE
1603 | COMMAND print_args
1604 | PRINT print_args
1605 | SH
1606 {}
1607 DELIMITED
1608 | COPY TEXT
52718713 1609 | COPY TEXT THROUGH
e9690142
JD
1610 {}
1611 DELIMITED
1612 {}
1613 until
52718713 1614 | COPY THROUGH
e9690142
JD
1615 {}
1616 DELIMITED
1617 {}
1618 until
1619 | FOR VARIABLE '=' expr TO expr optional_by DO
1620 {}
1621 DELIMITED
1622 | simple_if
1623 | simple_if ELSE
1624 {}
1625 DELIMITED
1626 | reset_variables
1627 | RESET
1628 ;
2740f169
PE
1629
1630reset_variables:
e9690142
JD
1631 RESET VARIABLE
1632 | reset_variables VARIABLE
1633 | reset_variables ',' VARIABLE
1634 ;
2740f169
PE
1635
1636print_args:
e9690142
JD
1637 print_arg
1638 | print_args print_arg
1639 ;
2740f169
PE
1640
1641print_arg:
e9690142
JD
1642 expr %prec ','
1643 | text
1644 | position %prec ','
1645 ;
2740f169
PE
1646
1647simple_if:
e9690142
JD
1648 IF any_expr THEN
1649 {}
1650 DELIMITED
1651 ;
2740f169
PE
1652
1653until:
e9690142
JD
1654 /* empty */
1655 | UNTIL TEXT
1656 ;
04098407 1657
2740f169 1658any_expr:
e9690142
JD
1659 expr
1660 | text_expr
1661 ;
04098407 1662
2740f169 1663text_expr:
e9690142
JD
1664 text EQUALEQUAL text
1665 | text NOTEQUAL text
1666 | text_expr ANDAND text_expr
1667 | text_expr ANDAND expr
1668 | expr ANDAND text_expr
1669 | text_expr OROR text_expr
1670 | text_expr OROR expr
1671 | expr OROR text_expr
1672 | '!' text_expr
1673 ;
2740f169 1674
2740f169 1675optional_by:
e9690142
JD
1676 /* empty */
1677 | BY expr
1678 | BY '*' expr
1679 ;
2740f169
PE
1680
1681element:
e9690142
JD
1682 object_spec
1683 | LABEL ':' optional_separator element
1684 | LABEL ':' optional_separator position_not_place
1685 | LABEL ':' optional_separator place
1686 | '{' {} element_list '}'
1687 {}
1688 optional_element
1689 | placeless_element
1690 ;
2740f169
PE
1691
1692optional_element:
e9690142
JD
1693 /* empty */
1694 | element
1695 ;
2740f169
PE
1696
1697object_spec:
e9690142
JD
1698 BOX
1699 | CIRCLE
1700 | ELLIPSE
1701 | ARC
1702 | LINE
1703 | ARROW
1704 | MOVE
1705 | SPLINE
1706 | text %prec TEXT
1707 | PLOT expr
1708 | PLOT expr text
1709 | '['
1710 {}
1711 element_list ']'
1712 | object_spec HEIGHT expr
1713 | object_spec RADIUS expr
1714 | object_spec WIDTH expr
1715 | object_spec DIAMETER expr
1716 | object_spec expr %prec HEIGHT
1717 | object_spec UP
1718 | object_spec UP expr
1719 | object_spec DOWN
1720 | object_spec DOWN expr
1721 | object_spec RIGHT
1722 | object_spec RIGHT expr
1723 | object_spec LEFT
1724 | object_spec LEFT expr
1725 | object_spec FROM position
1726 | object_spec TO position
1727 | object_spec AT position
1728 | object_spec WITH path
1729 | object_spec WITH position %prec ','
1730 | object_spec BY expr_pair
1731 | object_spec THEN
1732 | object_spec SOLID
1733 | object_spec DOTTED
1734 | object_spec DOTTED expr
1735 | object_spec DASHED
1736 | object_spec DASHED expr
1737 | object_spec FILL
1738 | object_spec FILL expr
1739 | object_spec SHADED text
1740 | object_spec COLORED text
1741 | object_spec OUTLINED text
1742 | object_spec CHOP
1743 | object_spec CHOP expr
1744 | object_spec SAME
1745 | object_spec INVISIBLE
1746 | object_spec LEFT_ARROW_HEAD
1747 | object_spec RIGHT_ARROW_HEAD
1748 | object_spec DOUBLE_ARROW_HEAD
1749 | object_spec CW
1750 | object_spec CCW
1751 | object_spec text %prec TEXT
1752 | object_spec LJUST
1753 | object_spec RJUST
1754 | object_spec ABOVE
1755 | object_spec BELOW
1756 | object_spec THICKNESS expr
1757 | object_spec ALIGNED
1758 ;
2740f169
PE
1759
1760text:
e9690142
JD
1761 TEXT
1762 | SPRINTF '(' TEXT sprintf_args ')'
1763 ;
2740f169
PE
1764
1765sprintf_args:
e9690142
JD
1766 /* empty */
1767 | sprintf_args ',' expr
1768 ;
2740f169
PE
1769
1770position:
e9690142
JD
1771 position_not_place
1772 | place
1773 ;
2740f169
PE
1774
1775position_not_place:
e9690142
JD
1776 expr_pair
1777 | position '+' expr_pair
1778 | position '-' expr_pair
1779 | '(' position ',' position ')'
1780 | expr between position AND position
1781 | expr '<' position ',' position '>'
1782 ;
2740f169
PE
1783
1784between:
e9690142
JD
1785 BETWEEN
1786 | OF THE WAY BETWEEN
1787 ;
2740f169
PE
1788
1789expr_pair:
e9690142
JD
1790 expr ',' expr
1791 | '(' expr_pair ')'
1792 ;
2740f169
PE
1793
1794place:
e9690142
JD
1795 /* line at A left == line (at A) left */
1796 label %prec CHOP
1797 | label corner
1798 | corner label
1799 | corner OF label
1800 | HERE
1801 ;
2740f169
PE
1802
1803label:
e9690142
JD
1804 LABEL
1805 | nth_primitive
1806 | label '.' LABEL
1807 ;
2740f169
PE
1808
1809ordinal:
e9690142
JD
1810 ORDINAL
1811 | '`' any_expr TH
1812 ;
2740f169
PE
1813
1814optional_ordinal_last:
e9690142
JD
1815 LAST
1816 | ordinal LAST
1817 ;
2740f169
PE
1818
1819nth_primitive:
e9690142
JD
1820 ordinal object_type
1821 | optional_ordinal_last object_type
1822 ;
2740f169
PE
1823
1824object_type:
e9690142
JD
1825 BOX
1826 | CIRCLE
1827 | ELLIPSE
1828 | ARC
1829 | LINE
1830 | ARROW
1831 | SPLINE
1832 | '[' ']'
1833 | TEXT
1834 ;
2740f169
PE
1835
1836label_path:
e9690142
JD
1837 '.' LABEL
1838 | label_path '.' LABEL
1839 ;
2740f169
PE
1840
1841relative_path:
e9690142
JD
1842 corner %prec CHOP
1843 /* give this a lower precedence than LEFT and RIGHT so that
1844 [A: box] with .A left == [A: box] with (.A left) */
1845 | label_path %prec TEXT
1846 | label_path corner
1847 ;
2740f169
PE
1848
1849path:
e9690142
JD
1850 relative_path
1851 | '(' relative_path ',' relative_path ')'
1852 {}
1853 /* The rest of these rules are a compatibility sop. */
1854 | ORDINAL LAST object_type relative_path
1855 | LAST object_type relative_path
1856 | ORDINAL object_type relative_path
1857 | LABEL relative_path
1858 ;
2740f169
PE
1859
1860corner:
e9690142
JD
1861 DOT_N
1862 | DOT_E
1863 | DOT_W
1864 | DOT_S
1865 | DOT_NE
1866 | DOT_SE
1867 | DOT_NW
1868 | DOT_SW
1869 | DOT_C
1870 | DOT_START
1871 | DOT_END
1872 | TOP
1873 | BOTTOM
1874 | LEFT
1875 | RIGHT
1876 | UPPER LEFT
1877 | LOWER LEFT
1878 | UPPER RIGHT
1879 | LOWER RIGHT
1880 | LEFT_CORNER
1881 | RIGHT_CORNER
1882 | UPPER LEFT_CORNER
1883 | LOWER LEFT_CORNER
1884 | UPPER RIGHT_CORNER
1885 | LOWER RIGHT_CORNER
1886 | NORTH
1887 | SOUTH
1888 | EAST
1889 | WEST
1890 | CENTER
1891 | START
1892 | END
1893 ;
2740f169
PE
1894
1895expr:
e9690142
JD
1896 VARIABLE
1897 | NUMBER
1898 | place DOT_X
1899 | place DOT_Y
1900 | place DOT_HT
1901 | place DOT_WID
1902 | place DOT_RAD
1903 | expr '+' expr
1904 | expr '-' expr
1905 | expr '*' expr
1906 | expr '/' expr
1907 | expr '%' expr
1908 | expr '^' expr
1909 | '-' expr %prec '!'
1910 | '(' any_expr ')'
1911 | SIN '(' any_expr ')'
1912 | COS '(' any_expr ')'
1913 | ATAN2 '(' any_expr ',' any_expr ')'
1914 | LOG '(' any_expr ')'
1915 | EXP '(' any_expr ')'
1916 | SQRT '(' any_expr ')'
1917 | K_MAX '(' any_expr ',' any_expr ')'
1918 | K_MIN '(' any_expr ',' any_expr ')'
1919 | INT '(' any_expr ')'
1920 | RAND '(' any_expr ')'
1921 | RAND '(' ')'
1922 | SRAND '(' any_expr ')'
1923 | expr '<' expr
1924 | expr LESSEQUAL expr
1925 | expr '>' expr
1926 | expr GREATEREQUAL expr
1927 | expr EQUALEQUAL expr
1928 | expr NOTEQUAL expr
1929 | expr ANDAND expr
1930 | expr OROR expr
1931 | '!' expr
1932 ;
db34f798
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
73370a9d 1953[[input.y:470.11-48: warning: rule useless in parser due to conflicts: path: ORDINAL LAST object_type relative_path [-Wother]
db34f798
JD
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]])])