Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit] xml parse tree printing double leaf node
From: HT4N - (ht4n_at_[hidden])
Date: 2009-11-01 12:43:02


What is Spirit.Qi is that a Spirit new version?

 

I don't see any information about it in boost.org page.

 

Do you have a link that you can share with me?

 

Thanks

HT

 
> Date: Sat, 31 Oct 2009 18:48:26 -0600
> From: overminddl1_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [Spirit] xml parse tree printing double leaf node
>
> On Sat, Oct 31, 2009 at 12:29 PM, HT4N - <ht4n_at_[hidden]> wrote:
> > 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.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
                                               
_________________________________________________________________
Bing brings you maps, menus, and reviews organized in one place.
http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
--_30b00e9b-d271-4609-9c1d-e8aec104f256_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
What is Spirit.Qi is that a&nbsp;Spirit new version?<BR>
&nbsp;<BR>
I don't&nbsp;see any information about it in boost.org page.<BR>
&nbsp;<BR>
Do you have a link that you can share with me?<BR>
&nbsp;<BR>
Thanks<BR>
<BR>HT<BR><BR>&nbsp;<BR>&gt; Date: Sat, 31 Oct 2009 18:48:26 -0600<BR>&gt; From: overminddl1_at_[hidden]<BR>&gt; To: boost-users_at_[hidden]<BR>&gt; Subject: Re: [Boost-users] [Spirit] xml parse tree printing double leaf node<BR>&gt; <BR>&gt; On Sat, Oct 31, 2009 at 12:29 PM, HT4N - &lt;ht4n_at_[hidden]&gt; wrote:<BR>&gt; &gt; When I generating parse tree&nbsp;and dump it using the built-in&nbsp;tree-to-xml<BR>&gt; &gt; function, even&nbsp;from a simple grammar, I wonder why it prints out the leaf<BR>&gt; &gt; node twice.<BR>&gt; &gt;<BR>&gt; &gt; For instance:<BR>&gt; &gt;<BR>&gt; &gt; Parameter = ParameterName &gt;&gt; ParameterValue;<BR>&gt; &gt;<BR>&gt; &gt; The tree it prints it looks more or less like the following (note the<BR>&gt; &gt; repetition of ParameterName and ParameterValue nodes):<BR>&gt; &gt;<BR>&gt; &gt; &lt;Parameter&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;ParameterName&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ParameterName&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;Foo&lt;/value&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterName&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterName&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterValue&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ParameterValue&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;Bar&lt;/value&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterValue&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterValue&gt;<BR>&gt; &gt; &lt;/Parameter&gt;<BR>&gt; &gt;<BR>&gt; &gt; I would be expecting more something like:<BR>&gt; &gt;<BR>&gt; &gt; &lt;Parameter&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;ParameterName&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;Foo&lt;/value&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterName&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterValue&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;value&gt;Bar&lt;/value&gt;<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/ParameterValue&gt;<BR>&gt; &gt; &lt;/Parameter&gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; Is there any directive or secret that I don't know ?<BR>&gt; <BR>&gt; Probably because of the rule indirection. You *really* should be<BR>&gt; using Spirit.QI, not Spirit.Classic like you are, it has no such<BR>&gt; problems.<BR>&gt; Also, there is a Spirit mailing list, you will get much faster responses there.<BR>&gt; _______________________________________________<BR>&gt; Boost-users mailing list<BR>&gt; Boost-users_at_[hidden]<BR>&gt; http://lists.boost.org/mailman/listinfo.cgi/boost-users> <br /><hr />Bing brings you maps, menus, and reviews organized in one place. <a href='http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1' target='_new'>Try it now.</a></body>
</html>
--_30b00e9b-d271-4609-9c1d-e8aec104f256_--


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