Minimisation question
Adrian Thurston
thurs... at cs.queensu.ca
Wed Sep 13 23:04:37 UTC 2006
Hi Colin,
The minimizeEveryOp flag was an experiment I did long ago. Before I had
Hopcroft's algorithm implemented, minimization was very slow and I wanted to
see if minimizing at every op would speed it up. I kept it in there for the
purpose of testing the minimization code. Thus far I haven't needed to use
it in order to compile a machine. Though I do tend to work with smaller
machines.
There's no reason not to use it. Perhaps it should be exposed and
documented. What is the size of the final machine (ragel -s) that you are
compiling? There may be a state explosion that can be avoided.
-Adrian
Colin Fleming wrote:
> Hi all,
>
> I'm working on a grammar for parsing XML, according to the XML BNF
> here: http://www.jelks.nu/XML/xmlebnf.html. The grammar is obviously
> fairly complex, and when I tried to compile it Ragel would just keep
> allocating memory until it ran out. I figured it should be possible to
> keep the complexity of the machine low by minimising every time you
> join two machines, and lo and behold I noticed in the code that
> there's a minimizeEveryOp flag, set with the (hidden) -e command line
> flag. With this flag it seems to do a great job, and it seems to
> produce roughly the same machine for the part that I could actually
> compile without that flag. Is there any reason not to use it?
>
> Cheers,
> Colin
>
>
More information about the ragel-users
mailing list