How can I enable debugging traces for those libraries such as the traces created by Boost Spirit Qi. It would be useful to get some generated XML files which show me the paths of the underlying states.
Asked
Active
Viewed 174 times
2
-
I think you know what you're looking for. It would be nice to just link to an example of what you meant, instead of "sketching a feature request" as if you just invented it. – sehe Jun 18 '14 at 07:13
1 Answers
4
I don't think Boost Regex has this. See How do you debug a regex?
For Boost Spirit you can define
#define BOOST_SPIRIT_DEBUG
#define BOOST_SPIRIT_LEXERTL_DEBUG
and a similar one for Lex. The output for Lex is not XML, as I remember, but it does name the state transitions and (obviously) recognized token IDs.
For an example of how to use BOOST_SPIRIT_DEBUG_NODES
see one of my answers
See also
-
Do I have to use BOOST_SPIRIT_DEBUG_NODES for the token_def attributes like I did for the Qi rules? – Baradé Jun 21 '14 at 21:39
-