Add %default-prec.

This commit is contained in:
Paul Eggert
2003-09-30 20:11:29 +00:00
parent 7f41b88821
commit 39a06c251a
7 changed files with 141 additions and 3 deletions

View File

@@ -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: