Newbie question: machine actions

Dan V. daniel.venkitacha... at gmail.com
Tue Apr 10 23:04:32 UTC 2007


Ah, it makes sense now - I'd only skimmed past chapter 5.

Thanks!


Dan.

On Apr 10, 10:31 pm, Adrian Thurston <thurs... at cs.queensu.ca> wrote:
> 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?
>
> > >
>
>
>  signature.asc
> 1KDownload



More information about the ragel-users mailing list