[Hat] spend a lot of time with alex generated module

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Wed Aug 16 12:07:58 EDT 2006


kgu <kguento at gmail.com> wrote:

> hat-trans spends a lot of time (really a lot of time) in generate
> module from a module generated by alex. The original module has 330
> lines of code and module generated by hat-trans has 40700 !!.

It is well-known that giving a machine-generated input to any
compiler-like tool is the best way to show up its weaknesses!  I suppose
the output from Alex is very different from the kind of code that a
human would write.  Since Alex creates essentially a table-driven
lexical analyser, it is possible that a large static description of the
tables is where hat-trans is spending lots of time.  Also, if the
Alex-generated code is deeply nested, hat-trans may spend too much time
trying to pretty-print its output within 80 columns, when really the
formatting will not fit nicely into such a small width.

Just some ideas.  If you want to send a copy of the original Alex
specification, we may be able to investigate further.

Regards,
    Malcolm


More information about the Hat mailing list