parseC input initialPos parses the given preprocessed C-source input and returns the AST or a list of parse errors.
Modulelanguage-c-0.10.2Haskell2010
Language.C.Parser
Language.C parser
Synopsis
- value parseC
- newtype P
- value execParser
- value execParser_
- value builtinTypeNames
- value translUnitP
- value extDeclP
- value statementP
- value expressionP
- newtype ParseError
- Packagelanguage-c-0.10.2
- Exports10
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceParser.hs
Simple API
Parser Monad
Instances4Monad, Functor, MonadFail, Applicative
execute the given parser on the supplied input stream. returns ParseError if the parser failed, and a pair of result and remaining name supply otherwise
Synopsis: execParser parser inputStream initialPos predefinedTypedefs uniqNameSupply
run the given parser using a new name supply and builtin typedefs see execParser
Synopsis: runParser parser inputStream initialPos
Exposed Parsers
translUnitP provides a parser for a complete C translation unit, i.e. a list of external declarations.
extDeclP provides a parser for an external (file-scope) declaration
statementP provides a parser for C statements
expressionP provides a parser for C expressions
Parser Monad
Constructors
ParseError ([String], Position)
Instances1Show
Show ParseErrorDefined in language-c-0.10.2 · Language.C.Parser.ParserMonad