[ragel-users] ragel edge side include parser
todd.fis... at gmail.com
Sun Jan 6 20:54:53 PST 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.
On Jan 6, 2008 5:16 PM, taf2 <todd.fis... at gmail.com> wrote:
> 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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ragel-users