Boost logo

Boost Users :

From: Aaron W. LaFramboise (aaronrabiddog51_at_[hidden])
Date: 2004-06-12 15:57:58


Hi,

I've been learning about Boost Spirit from the documentation, and one
big gap I'm finding is how Spirit knows to call a particular signature
semantic action given a particular parser.

I see this has something to do with the match type, but I'm not sure how
to actually define the match type for rule. I've discovered by accident
that semantic actions seem to be called with the type of the closure
member of a single-member closure, but I don't see this documented, and
I can't quite figure out how its supposed to work. Its difficult to
deduce expected signatures by the compiler error approach because GCC is
giving fairly nonsensical errors for the sorts of template constructs
Spirit seems to use, when something goes wrong.

In particular, I'd like to know specifically how I am supposed to be
defining semantic actions for my rules. Perhaps this is something that
would be nice to be included somewhere in the documenation. Maybe it
is, but I missed it somehow, or it wasn't spelled out explicitly enough
for me to catch on.

Any help or pointers would be greatly appreciated!

(By the way, I have to repeat the almost obligatory comment that
everyone seems to make about Spirit: it is one of the most beautiful
examples of C++ I have ever seen!)

Aaron W. LaFramboise


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net