Re: How to solve this kind of ambiguities?

2006-08-06 Thread Hans Aberg
On 7 Aug 2006, at 04:55, Dong Tiger wrote: Actually, I am writing a code analyser which parses c/c++ code without doing the preprocess thing. So when I encounter an ambiguity, I just 'guess' which option is more proper. Symbol table, when I have time to write it, will be helpful to

Re: How to solve this kind of ambiguities?

2006-08-06 Thread Dong Tiger
Actually, I am writing a code analyser which parses c/c++ code without doing the preprocess thing. So when I encounter an ambiguity, I just 'guess' which option is more proper. Symbol table, when I have time to write it, will be helpful to make the guess more accurate. At this moment, %

Bison 2.1 failes to generate C++ parser

2006-08-06 Thread Daniel Kraft
Hello! I was trying to create a C++ parser with Bison 2.1; according to the manual, I must use the "lalr1.cc" skeleton for this, and require %defines. But using the following simple grammar fails: test.y: %skeleton "lalr1.cc" %defines %% abc: 'a' %% After executing bison test.y I do not