parser package:ghc

A pure interface to the module parser.
This module provides the generated Happy parser for Haskell. It exports a number of parsers which may be used in any library that uses the GHC API. A common usage pattern is to initialize the parser state with a given string and then parse that string:
runParser :: ParserOpts -> String -> P a -> ParseResult a
runParser opts str parser = unP parser parseState
where
filename = "<interactive>"
location = mkRealSrcLoc (mkFastString filename) 1 1
buffer = stringToStringBuffer str
parseState = initParserState opts buffer location
Parsers for unit/module identifiers
Parse a response file into arguments.
The result of running a parser.
Parser options. See mkParserOpts to construct this.
Extracts the flags needed for parsing
Errors from the Cmm parser
Cmm parser error
Parse error in right operator section pattern TODO: embed the proper operator, if possible
Get parser options
Creates a parse state from a ParserOpts value
Given exactly the information needed, set up the ParserOpts