mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
Add %default-prec.
This commit is contained in:
@@ -115,6 +115,7 @@ int current_prec = 0;
|
||||
|
||||
%token
|
||||
PERCENT_DEBUG "%debug"
|
||||
PERCENT_DEFAULT_PREC "%default-prec"
|
||||
PERCENT_DEFINE "%define"
|
||||
PERCENT_DEFINES "%defines"
|
||||
PERCENT_ERROR_VERBOSE "%error-verbose"
|
||||
@@ -240,6 +241,13 @@ grammar_declaration:
|
||||
symbol_printer_set (list->sym, $1, list->location);
|
||||
symbol_list_free ($2);
|
||||
}
|
||||
| "%default-prec" INT
|
||||
{
|
||||
if (0 <= $2 && $2 <= 1)
|
||||
default_prec = $2;
|
||||
else
|
||||
complain_at (@1, _("invalid value for `%default-prec'"));
|
||||
}
|
||||
;
|
||||
|
||||
symbol_declaration:
|
||||
|
||||
Reference in New Issue
Block a user