<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 20, 2011, at 3:31 PM, Iņaki Baz Castillo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>2011/1/21 Benjamin van der Veen <<a href="mailto:b@bvanderveen.com">b@bvanderveen.com</a>>:<br><font class="Apple-style-span" color="#006312"><br></font><blockquote type="cite">It seems to me that a common problem faced by users of Ragel is that they do not know in advance where (with respect to the grammar being parsed) the boundaries of buffers that they feed the parser are going to be. For example, I can easily make a Ragel grammar which will parse the following using only entering and leaving actions:<br></blockquote><br>I recommend you checking Mongrel HTTP parser, which is written in C<br>and it used to build a Ruby object containing parsed data. However the<br>parser is a separate file(s) you really can learn from.<br></div></blockquote><div><br></div>Mongrel is where I got the idea from, although it seems to buffer the entirety of the request headers to work around this problem. I would like to avoid this solution if possible.</div><div><br></div></body></html>