Discussion:
[ragel-users] Email address parser
Ryan Bigg
2012-11-19 00:40:30 UTC
Permalink
I've been attempting to learn Ragel over the weekend and the project I've
chosen is parsing all the wonderful formats that email addresses come in.

This is the program I've come up with: https://gist.github.com/4108274

I am not happy with the result because I am sure it can be tidier. This is
the first type of this work I've done, so please go easy. All the tests
(written in Ruby) are passing.

What simple things am I doing wrong? Can anyone give me some tips on
improving this or direct me to resources, other than the guide?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20121119/9c44ac31/attachment.html>
Adrian Thurston
2012-12-09 17:14:42 UTC
Permalink
Looks like you don't have a proper termination of the address. Try using
"print+ :> address_end )" to close off that branch.

-Adrian
Post by Ryan Bigg
I've been attempting to learn Ragel over the weekend and the project
I've chosen is parsing all the wonderful formats that email addresses
come in.
This is the program I've come up with: https://gist.github.com/4108274
I am not happy with the result because I am sure it can be tidier. This
is the first type of this work I've done, so please go easy. All the
tests (written in Ruby) are passing.
What simple things am I doing wrong? Can anyone give me some tips on
improving this or direct me to resources, other than the guide?
_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users
Loading...