[ragel-users] Action code for simple tokenizer?
Seamus Abshere
seamus at abshere.net
Mon Jun 13 15:59:03 UTC 2011
hi all,
Does anybody have time to expand the "simple tokenizer" example from the
guide?
> # Repeat tokens, but make sure to get the longest match.
> main := (
> lower ( lower | digit )* %A |
> digit+ %B |
> ' '
> )**;
What might action A look like? How does it use p, pe, etc.? Ditto for B.
Best,
Seamus
PS. I think this would address a big question for
ragel/parsing/lexing/tokenizing newbies, namely, how would an **expert**
implement a **simple** tokenizer?
--
Seamus Abshere
123 N Blount St Apt 403
Madison, WI 53703
1 (201) 566-0130
_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users
More information about the ragel-users
mailing list