{-# 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_ :: forall a. P a -> InputStream -> Position -> Either ParseError a
execParser_ P a
parser InputStream
input Position
pos =
((a, [Name]) -> a)
-> Either ParseError (a, [Name]) -> Either ParseError a
forall a b. (a -> b) -> Either ParseError a -> Either ParseError b
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