mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
* src/reader.c (grammar_current_rule_prec_set).
(grammar_current_rule_check): New, eved out from... (readgram): here. Remove `xaction', `first_rhs': useless. * tests/input.at (Type clashes): New. * tests/existing.at (GNU Cim Grammar): Adjust.
This commit is contained in:
@@ -24,7 +24,6 @@ AT_BANNER([[Input Processing.]])
|
||||
## Invalid $n. ##
|
||||
## ------------ ##
|
||||
|
||||
|
||||
AT_SETUP([Invalid $n])
|
||||
|
||||
AT_DATA([input.y],
|
||||
@@ -43,7 +42,6 @@ AT_CLEANUP
|
||||
## Invalid @n. ##
|
||||
## ------------ ##
|
||||
|
||||
|
||||
AT_SETUP([Invalid @n])
|
||||
|
||||
AT_DATA([input.y],
|
||||
@@ -56,3 +54,28 @@ AT_CHECK([bison input.y], [1], [],
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## Type clashes. ##
|
||||
## -------------- ##
|
||||
|
||||
AT_SETUP([Type clashes])
|
||||
|
||||
AT_DATA([input.y],
|
||||
[[%token foo
|
||||
%type <bar> exp
|
||||
%%
|
||||
exp: foo {} foo
|
||||
| foo
|
||||
| /* Empty. */
|
||||
;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y], [1], [],
|
||||
[[input.y:5: type clash (`bar' `') on default action
|
||||
input.y:6: type clash (`bar' `') on default action
|
||||
input.y:7: empty rule for typed nonterminal, and no action
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user