patch applied (ghc): Parse OPTIONS properly and cache the result.
lemmih at gmail.com
Thu Mar 9 21:21:24 EST 2006
Thu Mar 9 17:10:35 PST 2006 Lemmih <lemmih at gmail.com>
* Parse OPTIONS properly and cache the result.
Use the lexer to parse OPTIONS, LANGUAGE and INCLUDE pragmas.
This gives us greater flexibility and far better error
messages. However, I had to make a few quirks:
* The token parser is written manually since Happy doesn't
like lexer errors (we need to extract options before the
buffer is passed through 'cpp'). Still better than
manually parsing a String, though.
* The StringBuffer API has been extended so files can be
read in blocks.
I also made a new field in ModSummary called ms_hspp_opts
which stores the updated DynFlags. Oh, and I took the liberty
of moving 'getImports' into HeaderInfo together with
M ./ghc/compiler/main/DriverPipeline.hs -130 +10
M ./ghc/compiler/main/GHC.hs -21 +9
M ./ghc/compiler/main/HscMain.lhs -3 +3
M ./ghc/compiler/main/HscTypes.lhs -3 +4
M ./ghc/compiler/package.conf.in -1 +1
M ./ghc/compiler/parser/Lexer.x -6 +58
M ./ghc/compiler/utils/StringBuffer.lhs -1 +30
More information about the Cvs-ghc