Re: yacc grammar / expressions parsed wrong ?

chresan <christianschneider@fastmail.fm>
Thu, 21 Feb 2008 15:09:37 -0800 (PST)

          From comp.compilers

Related articles
yacc grammar / expressions parsed wrong ? chresan@fastmail.fm (2008-02-18)
Re: yacc grammar / expressions parsed wrong ? christianschneider@fastmail.fm (chresan) (2008-02-21)
| List of all articles for this month |

From: chresan <christianschneider@fastmail.fm>
Newsgroups: comp.compilers
Date: Thu, 21 Feb 2008 15:09:37 -0800 (PST)
Organization: Compilers Central
References: 08-02-053
Keywords: parse
Posted-Date: 24 Feb 2008 00:39:34 EST

My results were probably caused by a bug of the parser generator
rather then in a wrong grammar. Instead of assigning to '$$' I tried
using a custom stack for building the expressions and then the result
tree was correct.


> [The usual problem is that you're not allocating space properly for
> the tree nodes you create. And please spell it "grammar". -John]


Thanks for the hint.


Christian


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.