Jon Wray wrote:
> Thanks!  I noticed that this change leads to different behavior when
> assigning rules.  Consider this code:
> 
>   typename rule_<ScannerT, IDENTIFIER>::type Identifier;
>   typename rule_<ScannerT, FUNCTION>::type Function;
>   typename rule_<ScannerT, PREDICATE>::type Predicate;
>   typename rule_<ScannerT, VARIABLE>::type Variable;
> 
>   Identifier = lexeme_d[token_node_d[(alpha_p | '_' | '$') >>
> *(alnum_p 
>> '_' | '$')]];
>   Function = Identifier;
>   Predicate = Identifier;
>   Variable = Identifier;
> 
> value.id().to_long() used to return FUNCTION, PREDICATE, or VARIABLE,
> but it now returns IDENTIFIER.  

[snip]

Huh? AFAICT, Function.id() == FUNCTION, Predicate.id() == PREDICATE
and Variable.id() == VARIABLE.

I tested this...

    rule<scanner<>, parser_context, parser_tag<1> > r1;
    rule<scanner<>, parser_context, parser_tag<2> > r2;
    r1 = r2;
    assert(r1.id() == 1);
    assert(r2.id() == 2);

What am I missing?

-- 
Joel de Guzman
joel at boost-consulting.com
http://www.boost-consulting.com
http://spirit.sf.net

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to