On 20 Jun 2007, at 12:28, Fernando Ferreira wrote:
I'm a huge fan of this project and I'm using it for several of my
small personal project (hopefully one day I will get to finish and
publish one of them). I use both flex and bison C++ Language
Interface (not that it has anything to do with the feature I'm about
to request) and one feature that is available on Flex that is not on
Bison is a macro that executes just before the rule action is
executed. On flex, it is YY_USER_ACTION
(http://www.gnu.org/software/flex/manual/html_mono/flex.html#SEC14),
but there is no (documented) equivalent for it on Bison. I know there
is the YY_REDUCE_PRINT macro, but it is only for debug purposes, and
not meant (not to say not possible) to be overridden.
The reason for my request is that, as bison generates LR parsers,
there is no way to, for instance, execute an action before a rule is
reduced, only after.
I have you tried to put it into yacc.c, somewhere between "yyreduce:"
and "switch (yyn)"?
Hans Aberg
_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison