-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | rontend
--   
--   Happy is a parser generator for Haskell. Given a grammar specification
--   in BNF, Happy generates Haskell code to parse the grammar. Happy works
--   in a similar way to the <tt>yacc</tt> tool for C.
--   
--   This library provides the following functionality:
--   
--   <ul>
--   <li>Data type definitions for the Grammar AST type, capturing the
--   information in .y-files (Happy.Grammar)</li>
--   <li>A parser for happy grammar files (.y) to produce a Grammar
--   (Happy.Frontend.*)</li>
--   <li>Implementations of the text book algorithms that compute the LR
--   action and goto tables for the given <a>Grammar</a>
--   (Happy.Tabular.*)</li>
--   <li>An LALR code generator to produce table-driven, deterministic
--   parsing code in Haskell (Happy.Backend.LALR.*)</li>
--   <li>A (less maintained) GLR code generator to produce table-driven,
--   non-deterministic parsing code in Haskell, where ambiguous parses
--   produce multiple parse trees (Happy.Backend.GLR.*)</li>
--   </ul>
@package happy-lib:frontend
@version 2.1.7

module Happy.Frontend.AbsSyn
data BookendedAbsSyn
BookendedAbsSyn :: Maybe String -> Maybe String -> AbsSyn String -> Maybe String -> BookendedAbsSyn
data AbsSyn e
AbsSyn :: [Directive String] -> [Rule e] -> AbsSyn e
data Directive a
TokenType :: String -> Directive a
TokenSpec :: [(a, TokenSpec)] -> Directive a
TokenName :: String -> Maybe String -> Bool -> Directive a
TokenLexer :: String -> String -> Directive a
TokenImportedIdentity :: Directive a
TokenMonad :: String -> String -> String -> String -> Directive a
TokenNonassoc :: [String] -> Directive a
TokenRight :: [String] -> Directive a
TokenLeft :: [String] -> Directive a
TokenExpect :: Int -> Directive a
TokenError :: String -> Maybe String -> Directive a
TokenErrorExpected :: Directive a
TokenErrorHandlerType :: String -> Directive a
TokenAttributetype :: String -> Directive a
TokenAttribute :: String -> String -> Directive a
getTokenType :: [Directive t] -> String
getTokenSpec :: [Directive t] -> [(t, TokenSpec)]
getParserNames :: [Directive t] -> [Directive t]
getLexer :: [Directive t] -> Maybe (String, String)
getImportedIdentity :: [Directive t] -> Bool
getMonad :: [Directive t] -> (Bool, String, String, String, String)
data ErrorHandlerInfo
DefaultErrorHandler :: ErrorHandlerInfo
CustomErrorHandler :: String -> ErrorHandlerInfo
ResumptiveErrorHandler :: String -> String -> ErrorHandlerInfo
getError :: [Directive t] -> ErrorHandlerInfo
getPrios :: [Directive t] -> [Directive t]
getPrioNames :: Directive t -> [String]
getExpect :: [Directive t] -> Maybe Int
getErrorExpectedMode :: Eq t => [Directive t] -> ErrorExpectedMode
getAttributes :: [Directive t] -> [(String, String)]
getAttributetype :: [Directive t] -> Maybe String
getAttributeGrammarExtras :: [Directive t] -> Maybe AttributeGrammarExtras

-- | Parse a token spec.
--   
--   The first occurence of <tt>$$</tt> indicates an expression in which
--   the <tt>$$</tt> will be substituted for the actual lexed token.
--   <tt>$$</tt> in string or char literals ('".."' and '\'.'') however
--   does not count.
parseTokenSpec :: String -> TokenSpec
data Rule e
Rule :: String -> [String] -> [Prod e] -> Maybe String -> Rule e
data Prod e
Prod :: [Term] -> e -> Int -> Prec -> Prod e
data Term
App :: String -> [Term] -> Term
data Prec
PrecNone :: Prec
PrecShift :: Prec
PrecId :: String -> Prec
data TokenSpec
TokenFixed :: String -> TokenSpec
TokenWithValue :: ExpressionWithHole -> TokenSpec
instance GHC.Classes.Eq a => GHC.Classes.Eq (Happy.Frontend.AbsSyn.Directive a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Happy.Frontend.AbsSyn.Directive a)
instance GHC.Internal.Show.Show Happy.Frontend.AbsSyn.Prec

module Happy.Frontend.Mangler
mangler :: FilePath -> AbsSyn String -> Either [ErrMsg] (Grammar String, Maybe AttributeGrammarExtras, Directives)

module Happy.Frontend
parseYFileContents :: String -> ParseResult BookendedAbsSyn
data FileType
Y :: FileType
LY :: FileType
fileNameAndType :: String -> Maybe (String, FileType)
deLitify :: String -> String

module Happy.Frontend.PrettyGrammar
render :: Doc -> String
ppAbsSyn :: AbsSyn String -> Doc
ppDirective :: Directive a -> Doc
ppRule :: Rule String -> Doc
ppProd :: Prod String -> Doc
ppPrec :: Prec -> Doc
ppTerm :: Term -> Doc
ppTuple :: [Doc] -> Doc
type Doc = Maybe ShowS
empty :: Doc
punctuate :: Doc -> [Doc] -> [Doc]
comma :: Doc
char :: Char -> Doc
text :: String -> Doc
(<+>) :: Doc -> Doc -> Doc
(<>) :: Doc -> Doc -> Doc
($$) :: Doc -> Doc -> Doc
hsep :: [Doc] -> Doc
vcat :: [Doc] -> Doc
vsep :: [Doc] -> Doc
parens :: Doc -> Doc
hcat :: [Doc] -> Doc
