|
Boost Users : |
From: Steve Folly (boost_at_[hidden])
Date: 2004-02-11 01:34:34
On 11/2/04 3:39 am, in article 4029A3FF.70503_at_[hidden], "Joel de
Guzman" <joel_at_[hidden]> wrote:
> Steve Folly wrote:
>
>> Hi,
>>
>> I've read FAQ question number one about the free parse() function not
>> compiling when and I've managed to get that to work by using
>> rule<phrase_scanner_t> as suggested.
>>
>> However, I need to use the pt_parse method to create a parse tree. I'm
>> obviously missing something really obvious because now pt_parse wont
>> compile, even though I'm using a phrase_scanner_t because of the space_p
>> skip parser.
>
> The easiest advice is: don't directly pass rules to any
> parse function. Instead, wrap them inside a grammar.
A-ha! I nearly guessed as much, but it was late at night and wanted to see
what replies there were by the morning! :)
In that case, may I make a suggestion about the docs - where FAQ question 1
says "In light of this issue, it is best to avoid rules as arguments to the
parse functions", you might want to add something along the lines of what
you just said above: "Instead, wrap them inside a grammar". It wasn't
immediately obvious for a newbie, since most of the initial examples *do*
pass rules to the parse functions!
>
> BTW, please post SPirit related questions to:
> Spirit-general mailing list
> Spirit-general_at_[hidden]
> https://lists.sourceforge.net/lists/listinfo/spirit-general
OK, I shall do that.
-- Regards, Steve. PS. Congrats on an excellent piece of software - I'm beginning to wonder how I ever would have managed without it! :)
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