[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bison 2.1 failes to generate C++ parser
From: |
Daniel Kraft |
Subject: |
Bison 2.1 failes to generate C++ parser |
Date: |
Sun, 06 Aug 2006 12:01:53 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060804 SeaMonkey/1.5a |
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 get test.cc and test.hh as expected (after what is written in
the manual); however, using an output-file-directive, this can be fixed.
What is more critical is that I even can't compile the generated
parser - and not because references to things like error or yylex are
missing (they miss of course), but because the generated parser-class
does not contain a yylex-member at all!
So I get the compile-time error, that yy::parser::parse() references the
unknown function yylex! Although the manual says that yylex is a member
of parser.
Many thanks in advance!
Yours,
Daniel Kraft
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bison 2.1 failes to generate C++ parser,
Daniel Kraft <=