help-bison
[Top][All Lists]
Advanced

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

Re: How to change default outcome of shift/reduce conflict?


From: Akim Demaille
Subject: Re: How to change default outcome of shift/reduce conflict?
Date: 12 Jan 2002 14:49:57 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| or_expr:
|     expr               {}
|   | or_expr OR or_expr {}
| 
| ...
|  ANSWER expr WITH or_expr

Hans is right: this is the kind of grammar transformation you ought to
do if you were using a dumb tool.  But do not do that: you are going
to make your grammar much more complex, harder to maintain, and you
will even loose performances.

Just as nobody would ever program a expr/term/factor grammar for
arithmetics in LR, you should avoid the solution above.



reply via email to

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