bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 07-gram-decs-in-grammar.patch


From: Akim Demaille
Subject: Re: 07-gram-decs-in-grammar.patch
Date: 14 Jun 2002 19:43:40 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

@@ -208,6 +205,9 @@ declaration:
     { current_assoc = non_assoc; current_type = NULL; }
 ;
 
+%token PERCENT_LEFT     "%left";
+%token PERCENT_RIGHT    "%right";
+%token PERCENT_NONASSOC "%nonassoc";
 precedence_declarator:
   "%left"     { $$ = left_assoc; }
 | "%right"    { $$ = right_assoc; }


This patch, whose effect is demonstrated above, is something I have
long desired: being able to mix declarations with the grammar itself.
This is also a preliminary to being able to have more modular
grammars.

But it poses a problem: CVS Bison requires CVS Bison now.  I find this
a good thing, as it is a guarantee of good funtioning.  But it can be
a problem to some people, so... Are there any severe objections?  Of
course the use above is almost for free, but it also involves future
changes, such as the ability to free the memory associated to objects
being thrown away during error processing etc.  Also, YYPRINT has a
bad interface etc.

Bison is a good Bison test bed...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]