help-bison
[Top][All Lists]
Advanced

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

mid-rule actions


From: David Durham
Subject: mid-rule actions
Date: Mon, 15 Oct 2001 10:31:28 -0500

Just a thought...   If mid rule actions had a section of code where you
could specify how do undo that action then they wouldn't so likely cause
ambiguities.  The parser knows it can go back and undo the mid-rule
actions of the rules that it didn't actually reduce to...

However, the code in these midrule actions would likely need to be
fairly harmless, unforeseen side-effects could occur for the user of
bison.

I haven't used mid-rule actions in a while, since I took the philosophy
of parse first, semantate (like that word eh?) later...  This philosophy
cannot be used all the time however, sometimes you need identifiers to
be typenames if a previously parsed section of code defined a type. I've
made my grammar completly parsable from the syntax alone with no context
information.  But my point: I cannot remember what I used to use
mid-rule actions for that also could be undone and with this ability
actually help out.

This idea could likely be extended to all actions, it's just that the
main action is usually the most important and most likely not undo-able

-- Davy




reply via email to

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