[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
%glr-parser & %pure-parser
From: |
Frans Englich |
Subject: |
%glr-parser & %pure-parser |
Date: |
Fri, 25 May 2007 16:43:08 +0200 |
User-agent: |
KMail/1.9.1 |
Hello,
If I to the following Bison grammar:
--------------------------------------------------------
%{
void dummy();
%}
%pure-parser
%%
Root: /* empty*/
{
}
%%
--------------------------------------------------------
adds %glr-parser under %pure-parser, two things happens beyond changing the
parser algorithm:
* It copies all the code in the c++ section into the header.
* It puts "extern YYSTYPE lval;" in the header.
None of these two things I like nor would expect(at least, to not be different
from a lr parser).
Why does these things happen when I add %glr-parser? How do I avoid it from
happening?
This was produced with Bison 2.3, by invoking bison --defines=t.h t.ypp.
Thanks in advance,
Frans
- %glr-parser & %pure-parser,
Frans Englich <=