]> git.saurik.com Git - bison.git/blobdiff - src/parse-gram.y
Update copyright to 2004.
[bison.git] / src / parse-gram.y
index 642a97ccb750f63a7d782f829b7239cb61857525..e771894519e89fc80fb3ba6e3f0587de760bc34e 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
@@ -120,12 +120,14 @@ int current_prec = 0;
   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"
@@ -188,7 +190,8 @@ declaration:
 | "%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"
   {
@@ -241,12 +244,13 @@ grammar_declaration:
        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;
     }
 ;