-- |
-- Module      :  Language.C.Parser
-- Copyright   :  (c)  2006-2010 Harvard University
-- License     :  BSD-style
-- Maintainer  :  mainland@drexel.edu

module Language.C.Parser (
    module Language.C.Parser.Lexer,
    module Language.C.Parser.Monad,
    module Language.C.Parser.Parser,
    parse
  ) where

import Control.Exception

import qualified Data.ByteString.Char8 as B
import Data.Loc

import Language.C.Parser.Lexer
import Language.C.Parser.Parser
import Language.C.Parser.Monad
import Language.C.Syntax

parse :: [Extensions]
      -> [String]
      -> P a
      -> B.ByteString
      -> Maybe Pos
      -> Either SomeException a
parse :: forall a.
[Extensions]
-> [String]
-> P a
-> ByteString
-> Maybe Pos
-> Either SomeException a
parse [Extensions]
exts [String]
typnames P a
p ByteString
bs Maybe Pos
pos =
    forall a. P a -> PState -> Either SomeException a
evalP P a
p ([Extensions] -> [String] -> ByteString -> Maybe Pos -> PState
emptyPState [Extensions]
exts [String]
typnames ByteString
bs Maybe Pos
pos)