On Fri, May 11, 2007 at 12:00:10AM +0200, Lennart Augustsson wrote:
> Parsing a very close approximation to what Haskell specifies isn't that 
> hard.  You just need some mild interaction between the parser and lexer.

This algorithm can correctly de-whitespace haskell without any parser
interaction. It works for all the code in the wild I tried it on. Only
50 lines long or so to boot. One can come up with pathological cases it
doesn't get right, but one can do the same for ghc as well :)

http://repetae.net/repos/getlaid/

        John


-- 
John Meacham - ⑆repetae.net⑆john⑈
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to