[ragel-users] Ragel syntax
Dénes Lados
lados.denes at gmail.com
Thu Jan 31 10:08:53 UTC 2019
Hi,
I am confused with the basic syntax of Ragel. Let's see this machine from
the ragel guide:
%%{ machine foo;
> main :=
> ( ’foo’ | ’bar’ )
> 0 @{ res = 1; };
> }%%
>
As far as I can understand this machine looks for the 'foo' or 'bar'
strings and sets the variable from the host language 'res' to 1 if a match
is found.
What I don't understand is what the 0 and the @{} stands for. What the
exact meaning of these signs and how they are used to run actions in case
of a match?
Thanks
Denes Lados
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20190131/bc4af505/attachment.html>
More information about the ragel-users
mailing list