]> git.saurik.com Git - bison.git/blobdiff - src/parse-gram.y
Instead of using make_symbol<TOK_FOO>, generate make_FOO for each token type.
[bison.git] / src / parse-gram.y
index cae4fb7b77b93fdd225c8ea5c7b67691d42bd0da..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"
@@ -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: