From kguento at gmail.com Wed Aug 9 17:26:19 2006 From: kguento at gmail.com (kgu) Date: Wed Aug 9 17:34:20 2006 Subject: [Hat] problems with HAT installation in debian In-Reply-To: <5269742.post@talk.nabble.com> References: <5269742.post@talk.nabble.com> Message-ID: <5734196.post@talk.nabble.com> hi, download and install 2.04 version, and remember apply patch from www.haskell.org/hat -- View this message in context: http://www.nabble.com/problems-with-HAT-installation-in-debian-tf1924566.html#a5734196 Sent from the Haskell - Hat forum at Nabble.com. From kguento at gmail.com Wed Aug 9 17:35:57 2006 From: kguento at gmail.com (kgu) Date: Wed Aug 9 17:34:20 2006 Subject: [Hat] spend a lot of time with alex generated module Message-ID: <5734325.post@talk.nabble.com> 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.com/spend-a-lot-of-time-with-alex-generated-module-tf2081392.html#a5734325 Sent from the Haskell - Hat forum at Nabble.com. From Malcolm.Wallace at cs.york.ac.uk Wed Aug 16 12:07:58 2006 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Aug 16 11:57:23 2006 Subject: [Hat] spend a lot of time with alex generated module In-Reply-To: <5734325.post@talk.nabble.com> References: <5734325.post@talk.nabble.com> Message-ID: <20060816170758.04207b33.Malcolm.Wallace@cs.york.ac.uk> kgu 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 From kguento at gmail.com Wed Aug 16 12:45:53 2006 From: kguento at gmail.com (ivan gomez rodriguez) Date: Wed Aug 16 12:33:56 2006 Subject: [Hat] spend a lot of time with alex generated module In-Reply-To: <20060816170758.04207b33.Malcolm.Wallace@cs.york.ac.uk> References: <5734325.post@talk.nabble.com> <20060816170758.04207b33.Malcolm.Wallace@cs.york.ac.uk> Message-ID: <44E34BC1.2050103@gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- { module Lexer (Token(..), alexScanTokens) where } %wrapper "basic" $digit = 0-9 -- digits $alpha = [a-zA-Z] -- alphabetic characters tokens :- $white+ ; "--".* ; \. { \s -> TPUNTO } \) { \s -> TPARDER } \( { \s -> TPARIZQ } \[ { \s -> TCORIZQ } \] { \s -> TCORDER } \| { \s -> TPIPE } = { \s -> TIGUAL } != { \s -> TDISTINTO } "->" { \s -> TFLECHA } > { \s -> TMAYOR } >= { \s -> TMAYORIGUAL } \< { \s -> TMENOR } \<= { \s -> TMENORIGUAL } \+ { \s -> TMAS } \- { \s -> TMENOS } \* { \s -> TPOR } \/ { \s -> TBARRA } & { \s -> TAND } \^ { \s -> TTILDE } \, { \s -> TCOMA } \; { \s -> TPUNTOCOMA } := { \s -> TDOSIGUAL } :: { \s -> TCUATROPUNTOS } \;\; { \s -> TDOSPUNTOCOMA } : { \s -> TDOSPUNTOS } [] { \s -> TCORCHETES } null { \s -> TNULL } Int { \s -> TINT } String { \s -> TSTRING } in { \s -> TIN } let { \s -> TLET } rec { \s -> TISREC } case { \s -> TCASE } of { \s -> TOF } if { \s -> TIF } then { \s -> TTHEN } else { \s -> TELSE } "\""['A'-'Z''a'-'z''0'-'9''_'' ']* "\"" { \s -> TCADENA s } $digit+ { \s -> TENTERO (read s) } $alpha [$alpha $digit \_ \']* { \s -> TVAR s } eof { \s -> TEOF } { data Token = TBLANCO | TCOMMENT | TPUNTO | TPARIZQ | TPARDER | TCORIZQ | TCORDER | TPIPE | TAMBER | TIGUAL | TDISTINTO | TFLECHA | TMAYOR | TMAYORIGUAL | TMENOR | TMENORIGUAL | TMAS | TMENOS | TPOR | TBARRA | TTILDE | TCOMA | TPUNTOCOMA | TDOSIGUAL | TCUATROPUNTOS | TDOSPUNTOCOMA | TDOSPUNTOS | TCORCHETES | TNULL | TAND | TINT | TSTRING | TIN | TLET | TISREC | TCASE | TOF | TIF | TTHEN | TELSE | TCADENA String | TENTERO Int | TVAR String | TEOF deriving (Eq,Show) }