
15 Jun
2008
15 Jun
'08
2:48 p.m.
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