Boost logo

Boost :

From: Jan Langer (jan_at_[hidden])
Date: 2003-08-26 13:29:48


Chris Cooney wrote:
> I've been utilizing some of the other boost projects for awhile now but
> am new to the spirit framework and may ask some dumb questions...so,
> sorry in advance.

i tried it today for the first time. and i think its really nice.

> I'm wondering why the var_delm rule won't work when parsed:
>
> rule<> var_delm = +anychar_p;

maybe
        rule <> var_delm = +(anychar_p - ch_p (')'));
will work

> rule<> var_type = str_p("some_literal") | str_p("some_literal_2") |
> var_delm ;
> rule<> script_func1 = str_p("FUNC_NAME") >> ch_p('(') >> var_type
> >>ch_p(')');

the var_type production also reads the closing parenthesis.

> to clarify,
>
> FUNC_NAME(some_literal) -> parsing succeeds
> FUNC_NAME(some_literal_2) -> parsing succeeds
> FUNC_NAME(kjfd*&) -> parsing fails (note: "kjfd*&" is just a
> example...actually nothing I pass will work)

-- 
jan langer ... jan_at_[hidden]
"pi ist genau drei"

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk