Sign in to follow this  
Azh321

Boost::Spirit Question

Recommended Posts

Ive used boost::spirit for a few projects from time to time but theres one thing that has also stomped me. If I do: digit = lexeme_d[+digit_p][&doSomething]; Every thing works fine (btw thats a rule for a digit containing atleast 1 numeral 0-9. But if I use the built-in version of this: digit = uint_p[&doSomething]; It doesnt work! I think ive narrowed it down to something with doing [&mySemanticAction] but I dont see why it wouldnt work using the built in parser... Im sure im doing something wrong and perhaps trying to use the built-in parser in the wrong context so please help. Thanks

Share this post


Link to post
Share on other sites
It's been a while, but I'd look into how uint_p is being instantiated. Might need some parens in there. Also, it's possible that things just are being matched oddly, turning on the spirit debugging might help narrow things down or give you confidence in your diagnosis.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this