[ragel-users] Writing a Telnet parser
Jonathan Castello
twisolar at gmail.com
Sat Oct 2 22:04:23 PDT 2010
"plain_text" is actually a bit of a misnomer; it's really anything not
an IAC or a CR, as I have now. The only other difference here seems to
be the + after plain_text, which I've tried. Graphing your example
machine shows that the end_of_plain_text event is still executed after
each plain_text character anyways.
I've decided not to worry too much about it at this point. Thanks for
your help anyways!
~Jonathan
On Sat, Oct 2, 2010 at 9:53 PM, Adrian Thurston <thurston at complang.org> wrote:
> Try refactoring your grammar:
>
> plain_text = [a-z];
> something_else = ^plain_text;
>
> main := (
> plain_text+ %{ end_of_plain_text(); } |
> something_else+
> )*;
More information about the ragel-users
mailing list