List Info

Thread: spend a lot of time with alex generated module




spend a lot of time with alex generated module
user name
2006-08-09 21:35:57
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 !!.

Somebody knows what's happening?

thanks
-- 
View this message in context: http://www.nabble.co
m/spend-a-lot-of-time-with-alex-generated-module-tf2081392.h
tml#a5734325
Sent from the Haskell - Hat forum at Nabble.com.

_______________________________________________
Hat mailing list
Hathaskell.org
http://ww
w.haskell.org/mailman/listinfo/hat
spend a lot of time with alex generated module
user name
2006-08-16 16:07:58
kgu <kguentogmail.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
_______________________________________________
Hat mailing list
Hathaskell.org
http://ww
w.haskell.org/mailman/listinfo/hat
spend a lot of time with alex generated module
user name
2006-08-16 16:45:53
Malcolm Wallace wrote:
cs.york.ac.uk" type="cite">
kgu gmail.com"><kguentogmail.com&gt; 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
_______________________________________________
Hat mailing list
haskell.org">Hathaskell.org
http://www.haskell.org/mailman/listinfo/hat

  
I attach original specification.It's a very simple lexer specification. I had  some problem to compile module generated by hat-trans , it spends a lot of time too and it did not compile.

Thanks for your help and your job, i'm developing a compiler and hat is a really useful tool for me, it's a great tool!

Thanks,
Iv&aacute;n



[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )