]> git.saurik.com Git - bison.git/blobdiff - src/parse-gram.y
Work around Java's ``code too large'' problem for parser tables.
[bison.git] / src / parse-gram.y
index 745dbc4e2d899db90732d040b510fd3a8880b81f..8e3b73208b72a3dde420fed4c1237c431e03f122 100644 (file)
@@ -115,6 +115,7 @@ static int current_prec = 0;
 %token PERCENT_LEFT        "%left"
 %token PERCENT_RIGHT       "%right"
 %token PERCENT_NONASSOC    "%nonassoc"
+%token PERCENT_PRECEDENCE  "%precedence"
 
 %token PERCENT_PREC          "%prec"
 %token PERCENT_DPREC         "%dprec"
@@ -254,7 +255,7 @@ prologue_declaration:
       muscle_code_grow ("initial_action", action.code, @2);
       code_scanner_last_string_free ();
     }
-| "%language" STRING           { language_argmatch ($2, 1, &@1); }
+| "%language" STRING           { language_argmatch ($2, grammar_prio, @1); }
 | "%lex-param" "{...}"         { add_param ("lex_param", $2, @2); }
 | "%locations"                  { locations_flag = true; }
 | "%name-prefix" STRING         { spec_name_prefix = $2; }
@@ -300,7 +301,7 @@ prologue_declaration:
           skeleton_user = uniqstr_new (skeleton_build);
           free (skeleton_build);
         }
-      skeleton_arg (skeleton_user, 1, &@1);
+      skeleton_arg (skeleton_user, grammar_prio, @1);
     }
 | "%token-table"                { token_table_flag = true; }
 | "%verbose"                    { report_flag |= report_states; }
@@ -412,9 +413,10 @@ precedence_declaration:
 ;
 
 precedence_declarator:
-  "%left"     { $$ = left_assoc; }
-| "%right"    { $$ = right_assoc; }
-| "%nonassoc" { $$ = non_assoc; }
+  "%left"       { $$ = left_assoc; }
+| "%right"      { $$ = right_assoc; }
+| "%nonassoc"   { $$ = non_assoc; }
+| "%precedence" { $$ = precedence_assoc; }
 ;
 
 type.opt: