[project @ 1999-06-01 16:40:41 by simonmar]
This commit replaces the old yacc parser with a Happy-generated one. Notes: - The generated .hs file is *big*. Best to use a recent version of Happy, and even better to add the -c flag to use unsafeCoerce# with ghc (versions 4.02+ please). - The lexer has grown all sorts of unsightly growths and should be put down as soon as possible. - Parse errors may result in strange diagnostics. I'm looking into this. - HsSyn now contains a few extra constructors due to the way patterns are parsed as expressions in the parser. - The layout rule is implemented according to the Haskell report. I found a couple of places in the libraries where we previously weren't adhering to this - in particular the rule about "nested contexts must be more indented than outer contexts". The rule is necessary to disambiguate in the presence of empty declaration lists.
Showing
- ghc/compiler/Makefile 22 additions, 105 deletionsghc/compiler/Makefile
- ghc/compiler/basicTypes/Const.lhs 6 additions, 1 deletionghc/compiler/basicTypes/Const.lhs
- ghc/compiler/basicTypes/RdrName.lhs 4 additions, 1 deletionghc/compiler/basicTypes/RdrName.lhs
- ghc/compiler/basicTypes/SrcLoc.lhs 9 additions, 2 deletionsghc/compiler/basicTypes/SrcLoc.lhs
- ghc/compiler/hsSyn/HsExpr.lhs 11 additions, 0 deletionsghc/compiler/hsSyn/HsExpr.lhs
- ghc/compiler/main/CmdLineOpts.lhs 10 additions, 0 deletionsghc/compiler/main/CmdLineOpts.lhs
- ghc/compiler/main/Main.lhs 28 additions, 2 deletionsghc/compiler/main/Main.lhs
- ghc/compiler/parser/Lex.lhs 1264 additions, 0 deletionsghc/compiler/parser/Lex.lhs
- ghc/compiler/parser/MAIL.byacc 0 additions, 146 deletionsghc/compiler/parser/MAIL.byacc
- ghc/compiler/parser/ParseUtil.lhs 455 additions, 0 deletionsghc/compiler/parser/ParseUtil.lhs
- ghc/compiler/parser/Parser.y 969 additions, 0 deletionsghc/compiler/parser/Parser.y
- ghc/compiler/parser/README.debug 0 additions, 12 deletionsghc/compiler/parser/README.debug
- ghc/compiler/parser/RdrHsSyn.lhs 178 additions, 39 deletionsghc/compiler/parser/RdrHsSyn.lhs
- ghc/compiler/parser/UgenAll.lhs 0 additions, 46 deletionsghc/compiler/parser/UgenAll.lhs
- ghc/compiler/parser/UgenUtil.lhs 0 additions, 83 deletionsghc/compiler/parser/UgenUtil.lhs
- ghc/compiler/parser/binding.ugn 0 additions, 131 deletionsghc/compiler/parser/binding.ugn
- ghc/compiler/parser/constants.h 0 additions, 45 deletionsghc/compiler/parser/constants.h
- ghc/compiler/parser/constr.ugn 0 additions, 47 deletionsghc/compiler/parser/constr.ugn
- ghc/compiler/parser/either.ugn 0 additions, 17 deletionsghc/compiler/parser/either.ugn
- ghc/compiler/parser/entidt.ugn 0 additions, 21 deletionsghc/compiler/parser/entidt.ugn
Loading
Please register or sign in to comment