[ragel-users] foreach character?

Adrian Thurston thurston at complang.org
Fri Jun 19 00:45:05 UTC 2009


Hey Gordon,

No worries, ragel is unique so some confusion from programmers is 
expected. You can usually answer these questions by looking at the 
precedence table in the manual. Action embedding operators bind more 
tightly than '.' and '|' and I think many programmers might find that 
strange at first.

-Adrian

Gordon Smith wrote:
> For any other newbies, I think my difficulty was/is understanding 
> operator boundaries. For example:
> 
>     asub_packet = 'cde';
>     a_packet = 'a:' asub_packet ':b' ${ std::cout << "crc(" << ( * p) << 
> ")\n"; };
> 
> with input "a:cde:b" provides only
>     crc(:)
>     crc(b)
> ( the "all transition operator" '$' operating only on the prior basic 
> machine ':b'?)
> 
> while operating on a group provides all characters:
>     asub_packet = 'cde';
>     a_packet = ( 'a:' asub_packet ':b' ) ${ std::cout << "crc(" << ( * 
> p) << ")\n"; };
>  





More information about the ragel-users mailing list