|
Boost Users : |
From: Chris Hoeppler (hoeppler_at_[hidden])
Date: 2008-06-15 10:48:07
On Monday 09 June 2008, Reena Dass wrote:
> I'm using boost spirit to create a URI parser.
>
> I get a syntax error for the following when I use the grammar straight
> off from RFC 2396.
>
> server = [[userinfo >> ch_p('@')] hostport] ;
Use "!" to denote an optional expression as described in
http://www.boost.org/doc/libs/1_35_0/libs/spirit/doc/operators.html:
server = !(!(userinfo >> '@') >> hostport);
> And when I change the rule and compile it, then the syntax error goes
> away but I get the following error.
Same problem; see line 68 in your grammar, as indicated by the error message.
HTH,
Chris
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