help-bison
[Top][All Lists]
Advanced

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

Re: x + (y) + z


From: Derek M Jones
Subject: Re: x + (y) + z
Date: Fri, 04 Mar 2005 13:04:29 +0000

Kelly,


>> to
>> 
>> add-expr:
>>                 mul-expr                    |
>>                 mult-expr '+' add-expr |
>>                 mult-expr '-' add-expr ;
>> 
>
>I don't think that's what you want if you're planning
>on executing the code you generate from this...

A subsequent phase of processing can be used to
reverse this syntactic decision.

>By the way, you might want to have a look at 
>
>http://www.lysator.liu.se/c/ANSI-C-grammar-y.html

Thanks, but this grammar requires a symbol table.
It also contains lots of shift/reduce and reduce/reduce
conflicts, and if I was writing a more conventional grammar
I would want to remove these.


derek

--
Derek M Jones                                     tel: +44 (0) 1252 520 667
Knowledge Software Ltd                         mailto:address@hidden
Applications Standards Conformance Testing   http://www.knosof.co.uk






reply via email to

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