
On Sat, Oct 31, 2009 at 12:29 PM, HT4N -
When I generating parse tree and dump it using the built-in tree-to-xml function, even from a simple grammar, I wonder why it prints out the leaf node twice.
For instance:
Parameter = ParameterName >> ParameterValue;
The tree it prints it looks more or less like the following (note the repetition of ParameterName and ParameterValue nodes):
<Parameter> <ParameterName> <ParameterName> <value>Foo</value> </ParameterName> </ParameterName> </ParameterValue> <ParameterValue> <value>Bar</value> </ParameterValue> </ParameterValue> </Parameter>
I would be expecting more something like:
<Parameter> <ParameterName> <value>Foo</value> </ParameterName> </ParameterValue> <value>Bar</value> </ParameterValue> </Parameter>
Is there any directive or secret that I don't know ?
Probably because of the rule indirection. You *really* should be using Spirit.QI, not Spirit.Classic like you are, it has no such problems. Also, there is a Spirit mailing list, you will get much faster responses there.