mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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:
@@ -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