
17 Apr
2010
17 Apr
'10
6:47 p.m.
Parser is part of a more complex software so it is not so easy to extract it from the software.
Usually a parser uses structs definition only. If it's too much "blended" with the other parts of your program, then maybe it's worth improving your code structure anyway. <...>
A more complex example on this idea compiles fine, but invoking it with something like:
# Comment 1 R1 1 2 2.5 0 L32 4 5 0.003 1 .OUT 3 .END
Returns from phrase_parse with a false value. I don't understand why that!
Is it "something like" or it's the exact input? It looks like you try to parse "1"/"0" with qi::bool_. This is incorrect, because bool_ expects "true"/"false", so use qi::int_ instead.