{-# OPTIONS #-}
module Language.C.Parser (
parseC,
P,execParser,execParser_,builtinTypeNames,
translUnitP, extDeclP, statementP, expressionP,
ParseError(..)
)
where
import Language.C.Parser.Parser (parseC,translUnitP, extDeclP, statementP, expressionP)
import Language.C.Parser.ParserMonad (execParser, ParseError(..),P)
import Language.C.Parser.Builtin (builtinTypeNames)
import Language.C.Data
execParser_ :: P a -> InputStream -> Position -> Either ParseError a
execParser_ :: P a -> InputStream -> Position -> Either ParseError a
execParser_ parser :: P a
parser input :: InputStream
input pos :: Position
pos =
((a, [Name]) -> a)
-> Either ParseError (a, [Name]) -> Either ParseError a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (a, [Name]) -> a
forall a b. (a, b) -> a
fst (Either ParseError (a, [Name]) -> Either ParseError a)
-> Either ParseError (a, [Name]) -> Either ParseError a
forall a b. (a -> b) -> a -> b
$ P a
-> InputStream
-> Position
-> [Ident]
-> [Name]
-> Either ParseError (a, [Name])
forall a.
P a
-> InputStream
-> Position
-> [Ident]
-> [Name]
-> Either ParseError (a, [Name])
execParser P a
parser InputStream
input Position
pos [Ident]
builtinTypeNames [Name]
newNameSupply