[ragel-users] Reduce ragel generator time

Adrian Thurston thurston at complang.org
Wed Oct 22 05:48:02 UTC 2008


There was this thread:

http://groups.google.com/group/ragel-users/browse_thread/thread/70232b2c5fd478d0/

I think there have been others but my searching skills suck right now.

A good way to track down state explosions is to rebuild the grammar from 
the bottom up, incrementally, and look for large unruly jumps in the 
size. Just comment out the original main and start doing:

main := <smaller_component>;

Move <smaller_component> "up" the grammar until you get to the original 
main. See chapter 4 of the manual for ways to fix the problems you find.

Cheers,
  Adrian



Horacio Sanson wrote:
> I have this Ragel machine to parse RTSP messages that takes almost 20
> minutes to generate the C code. I remember reading in the mailing list
> about someone complaining that Ragel was taking too long to generate
> his/her SIP parser. In that same thread a solution about a machine
> that eats the blank spaces or something like that helped reduce the
> generation time from hours to a few minutes was posted but for some
> reason I cannot find this email in my email archives.
> 
> If someone could repost this email or give me a simple example on how
> this was done I would appreciate it.
> 
> regards,
> Horacio
> 
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users




More information about the ragel-users mailing list