[ragel-users] Re: Inline scanner
Adrian Thurston
thurs... at cs.queensu.ca
Wed Jul 4 04:54:17 UTC 2007
Hey Carlos, I think this does what you want. It moves the processing of
whitespace out of the main machine and should reduce the number of states.
When a whitespace character is seen there is a call to a scanner which
consumes whitespace. When the whitespace scanner sees non-whitespace it
holds it and returns. When it sees the end-of-header pattern ('\n' with
no continuation) it holds the '\n' and returns. This held '\n' is then
read by the end of header string and the header terminates.
Cheers,
Adrian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sip-ws.rl
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20070704/bca67ba4/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20070704/bca67ba4/attachment-0001.sig>
More information about the ragel-users
mailing list