mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-10-18 13:43:27 +00:00
multistart: allow tokens as start symbols
After all, why not? * src/reader.c (switching_token): Use symbol_id_get. (check_start_symbols): Require that the start symbol is a token only if it's the only one. * examples/c/lexcalc/parse.y: Let NUM be a start symbol.
This commit is contained in:
1 parent
d9cf99b6a5
commit
683040b324
3 files changed
+15
-9
No files matched your search
@@ -79,7 +79,7 @@
|
||||
%type <int> exp expression line
|
||||
%printer { fprintf (yyo, "%d", $$); } <int>
|
||||
|
||||
%start input expression
|
||||
%start input expression NUM
|
||||
|
||||
// Precedence (from lowest to highest) and associativity.
|
||||
%left "+" "-"
|
||||
|
||||
Reference in new issue
Block a user