[ragel-users] Newbie question: machine actions
Adrian Thurston
thurs... at cs.queensu.ca
Tue Apr 10 14:31:30 UTC 2007
Hi Dan,
The action is a scanner pattern action. It can only exist inside a
scanner and gets invoked when the scanner logic determines a pattern has
matched. They function the same as the actions in lex. See section 6.3
in the manual for more information. Note that the => symbol in front of
the code block is optional and has been left out of this example.
Cheers,
Adrian
Dan V. wrote:
> Hi. I'm wondering what an embedded action in a machine without a (>,
> $, @ %) symbol means. For example, in cppscan.rl identifiers are
> matched with:
>
> # Identifiers
> ( [a-zA-Z_] [a-zA-Z0-9_]* )
> {token( TK_Id );};
>
> On what condition does token() get called?
>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "ragel-users" group.
> To post to this group, send email to ragel-users at googlegroups.com
> To unsubscribe from this group, send email to ragel-users-unsubscribe at googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ragel-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20070410/4dd6343a/attachment-0001.sig>
More information about the ragel-users
mailing list