From: joel de guzman (isis-tech_at_[hidden])
Date: 2001-06-01 00:32:36
I've been tinkering around Spirit's semantic
action syntax. I've come up with this:
The advantage is that we can add facilities into the
semantic action syntax later (e.g. add attributes or other
lazy functional tricks or a complete expression template
semantic action framework) and still maintain a clear
separation of concerns (semantics related elements and
possibly expressions are clearly separated inside the braces.
(I'm glad we did not commit the  brackets for iteration :-)
As was noted by Bruce Florman and originally by Larry
Evans. There's a problem with semantic actions and back-
tracking. This happens when semantic actions are invoked
before backtracking occurs. Additional code must be added
to 'uncommit' a triggered semantic action of a failed parse.
The solution, it would seem, is to invoke all actions in an alternative
(or any expression that backtracks) after parsing; such that
the successful branch is already known. I am currently in search
of a viable and seamless implementation along these lines.
I would appreciate comments and feedback very much.
Joel de Guzman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk