help-bison
[Top][All Lists]
Advanced

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

Suggestions for C++ parser generator


From: Mark Boyall
Subject: Suggestions for C++ parser generator
Date: Tue, 26 Jul 2011 16:17:43 +0100

I've got a couple of simple suggestions for the C++ parser generator.

Firstly, yylex() should be declared as a (pure) virtual function in the
parser interface. This would make using it re-entrantly significantly easier
and would mean that the user does not have to declare it.
Secondly, stack.hh should be replaced with the Standard stack class. This
will ensure that users who have move support can use move-only classes when
interacting with Bison.
Thirdly, I suggest that Bison should generate it's own AST classes, with
inheritance being used to link rules which have alternatives. This would
solve, mostly, the problem of the semantic types only being POD data types.


reply via email to

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