/* Bison Grammar Parser -*- C -*-
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
PERCENT_DEFINES "%defines"
PERCENT_ERROR_VERBOSE "%error-verbose"
PERCENT_EXPECT "%expect"
+ PERCENT_EXPECT_RR "%expect-rr"
PERCENT_FILE_PREFIX "%file-prefix"
PERCENT_GLR_PARSER "%glr-parser"
PERCENT_INITIAL_ACTION "%initial-action {...}"
PERCENT_LEX_PARAM "%lex-param {...}"
PERCENT_LOCATIONS "%locations"
PERCENT_NAME_PREFIX "%name-prefix"
+ PERCENT_NO_DEFAULT_PREC "%no-default-prec"
PERCENT_NO_LINES "%no-lines"
PERCENT_NONDETERMINISTIC_PARSER
"%nondeterministic-parser"
| "%define" string_content string_content { muscle_insert ($2, $3); }
| "%defines" { defines_flag = true; }
| "%error-verbose" { error_verbose = true; }
-| "%expect" INT { expected_conflicts = $2; }
+| "%expect" INT { expected_sr_conflicts = $2; }
+| "%expect-rr" INT { expected_rr_conflicts = $2; }
| "%file-prefix" "=" string_content { spec_file_prefix = $3; }
| "%glr-parser"
{
symbol_printer_set (list->sym, $1, list->location);
symbol_list_free ($2);
}
-| "%default-prec" INT
+| "%default-prec"
{
- if (0 <= $2 && $2 <= 1)
- default_prec = $2;
- else
- complain_at (@1, _("invalid value for `%default-prec'"));
+ default_prec = true;
+ }
+| "%no-default-prec"
+ {
+ default_prec = false;
}
;