[ragel-users] ragel edge side include parser

Todd Fisher todd.fis... at gmail.com
Mon Jan 7 04:54:53 UTC 2008


Okay, I did some more reading and now understand why with -G2 cs variable is
always the same value.  From chapter 5, page 43:"Generally this produces
faster running code because it allows the machine to encode the current

state using the processor's instruction pointer."

I've also been able to reduce the machine size by merging a few redundant
states... Still am hoping to get some feedback, regarding whether my
approach to the parser is reasonable and if there are any obvious features
of ragel that I'm missing.

Thanks,
Todd

On Jan 6, 2008 5:16 PM, taf2 <todd.fis... at gmail.com> wrote:

>
> Hi,
>
>  I've been doing some work on implementing a parser to handle ESI
> (Edge Side Include) Tags.   I am fairly sure, I have the parser
> working, but am curious about methods for optimizing.  I noticed that
> if  I generate my parser using -G1  I get a file about 25K lines.
> With -T1 I get about 5K lines.   Also, when using -G2  i'm not seeing
> the cs variable changing.   I noticed some pretty significant changes
> in size based on some simple changes in how I matched attributes.
> Looking for any advice on methods for optimizing my parser.     Here's
> my main parser file:
> http://mongrel-esi.googlecode.com/svn/trunk/ext/esi/common.rl
>
> Thanks,
> Todd
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20080106/546ad7e1/attachment-0001.html>


More information about the ragel-users mailing list