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
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to