Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data LexerSpec token = LexerSpec {
- endOfToken :: token
- lexerSpecList :: LexerSpecList token
- data ParserSpec token ast = ParserSpec {
- startSymbol :: String
- parserSpecList :: ParserSpecList token ast
- baseDir :: String
- actionTblFile :: String
- gotoTblFile :: String
- grammarFile :: String
- parserSpecFile :: String
- genparserexe :: String
- data AutomatonSpec token ast = AutomatonSpec {
- am_actionTbl :: ActionTable
- am_gotoTbl :: GotoTable
- am_prodRules :: ProdRules
- am_parseFuns :: ParseFunList token ast
- am_initState :: Int
- data HandleParseError token = HandleParseError {
- debugFlag :: Bool
- searchMaxLevel :: Int
- simpleOrNested :: Bool
- postTerminalList :: [Terminal token]
- nonterminalToStringMaybe :: Maybe (String -> String)
- lexing :: TokenInterface token => LexerSpec token -> String -> IO [Terminal token]
- lexingWithLineColumn :: TokenInterface token => LexerSpec token -> Line -> Column -> String -> IO (Line, Column, [Terminal token])
- parsing :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> ParserSpec token ast -> [Terminal token] -> IO ast
- runAutomaton :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> AutomatonSpec token ast -> [Terminal token] -> IO ast
- parsingHaskell :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> ParserSpec token ast -> [Terminal token] -> Maybe token -> IO ast
- runAutomatonHaskell :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> AutomatonSpec token ast -> [Terminal token] -> Maybe token -> IO ast
- get :: Stack token ast -> Int -> ast
- getText :: Stack token ast -> Int -> String
- data LexError = LexError Int Int String
- data ParseError token ast where
- NotFoundAction :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Terminal token -> CurrentState -> Stack token ast -> ActionTable -> GotoTable -> ProdRules -> [Terminal token] -> ParseError token ast
- NotFoundGoto :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => StateOnStackTop -> LhsSymbol -> Stack token ast -> ActionTable -> GotoTable -> ProdRules -> [Terminal token] -> ParseError token ast
- successfullyParsed :: IO [EmacsDataItem]
- handleLexError :: IO [EmacsDataItem]
- handleParseError :: TokenInterface token => HandleParseError token -> ParseError token ast -> IO [EmacsDataItem]
Documentation
LexerSpec | |
|
data ParserSpec token ast Source #
ParserSpec | |
|
data AutomatonSpec token ast Source #
AutomatonSpec | |
|
data HandleParseError token Source #
HandleParseError | |
|
lexingWithLineColumn :: TokenInterface token => LexerSpec token -> Line -> Column -> String -> IO (Line, Column, [Terminal token]) Source #
parsing :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> ParserSpec token ast -> [Terminal token] -> IO ast Source #
runAutomaton :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> AutomatonSpec token ast -> [Terminal token] -> IO ast Source #
parsingHaskell :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> ParserSpec token ast -> [Terminal token] -> Maybe token -> IO ast Source #
runAutomatonHaskell :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> AutomatonSpec token ast -> [Terminal token] -> Maybe token -> IO ast Source #
Instances
Show LexError Source # | |
Exception LexError Source # | |
Defined in CommonParserUtil toException :: LexError -> SomeException # fromException :: SomeException -> Maybe LexError # displayException :: LexError -> String # |
data ParseError token ast where Source #
NotFoundAction :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Terminal token -> CurrentState -> Stack token ast -> ActionTable -> GotoTable -> ProdRules -> [Terminal token] -> ParseError token ast | |
NotFoundGoto :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => StateOnStackTop -> LhsSymbol -> Stack token ast -> ActionTable -> GotoTable -> ProdRules -> [Terminal token] -> ParseError token ast |
Instances
(Show token, Show ast) => Show (ParseError token ast) Source # | |
Defined in CommonParserUtil showsPrec :: Int -> ParseError token ast -> ShowS # show :: ParseError token ast -> String # showList :: [ParseError token ast] -> ShowS # | |
(TokenInterface token, Typeable token, Show token, Typeable ast, Show ast) => Exception (ParseError token ast) Source # | |
Defined in CommonParserUtil toException :: ParseError token ast -> SomeException # fromException :: SomeException -> Maybe (ParseError token ast) # displayException :: ParseError token ast -> String # |
successfullyParsed :: IO [EmacsDataItem] Source #
Parsing programming interfaces
successfullyParsed
handleLexError :: IO [EmacsDataItem] Source #
handleLexError
handleParseError :: TokenInterface token => HandleParseError token -> ParseError token ast -> IO [EmacsDataItem] Source #
handleParseError handleParseError :: TokenInterface token => Bool -> Int -> Bool -> [Terminal token] -> ParseError token ast -> IO [EmacsDataItem] handleParseError flag maxLevel isSimple terminalListAfterCursor parseError = unwrapParseError flag maxLevel isSimple terminalListAfterCursor parseError