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