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