Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
type LexerSpecList token = [(RegExpStr, LexFun token)] Source #
LexerSpec | |
|
type ProdRuleStr = String Source #
type ParserSpecList token ast = [(ProdRuleStr, ParseFun token ast)] Source #
data ParserSpec token ast Source #
ParserSpec | |
|
Instances
Show LexError Source # | |
Exception LexError Source # | |
Defined in CommonParserUtil toException :: LexError -> SomeException # fromException :: SomeException -> Maybe LexError # displayException :: LexError -> String # |
prLexError :: LexError -> IO () Source #
lexing_ :: TokenInterface token => LexerSpec token -> Line -> Column -> String -> IO [Terminal token] Source #
matchLexSpec :: TokenInterface token => Line -> Column -> LexerSpecList token -> String -> IO (String, String, Maybe token) Source #
data ParseError token ast where Source #
NotFoundAction :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Terminal token -> Int -> Stack token ast -> ActionTable -> GotoTable -> ProdRules -> [Terminal token] -> ParseError token ast | |
NotFoundGoto :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Int -> String -> 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 # |
prParseError :: ParseError token ast -> IO () Source #
parsing :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => ParserSpec token ast -> [Terminal token] -> IO ast Source #
removeIfExists :: FilePath -> IO () Source #
data StkElem token ast Source #
StkState Int | |
StkTerminal (Terminal token) | |
StkNonterminal (Maybe ast) String |
emptyStack :: [a] Source #
currentState :: Stack token ast -> Int Source #
tokenTextFromTerminal :: TokenInterface token => Terminal token -> String Source #
lookupActionTable :: TokenInterface token => ActionTable -> Int -> Terminal token -> Maybe Action Source #
revTakeRhs :: Int -> [a] -> [a] Source #
type ParseFunList token ast = [ParseFun token ast] Source #
runAutomaton :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => ActionTable -> GotoTable -> ProdRules -> ParseFunList token ast -> [Terminal token] -> IO ast Source #
compCandidates :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> Int -> [Candidate] -> Int -> Automaton token ast -> Stack token ast -> IO [[Candidate]] Source #
compGammas :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Bool -> Int -> [Candidate] -> Int -> Automaton token ast -> Stack token ast -> [(Int, Stack token ast, String)] -> IO [[Candidate]] Source #
checkCycle :: (Eq a1, TokenInterface token, Show a1) => Bool -> Int -> a1 -> [StkElem token ast] -> [Char] -> [(a1, [StkElem token ast], [Char])] -> ([(a1, [StkElem token ast], [Char])] -> IO [a2]) -> IO [a2] Source #
noCycleCheck :: Bool Source #
compGammasForReduce :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Int -> Bool -> [Candidate] -> p -> Automaton token ast -> [StkElem token ast] -> [(Int, Stack token ast, String)] -> Int -> IO [[Candidate]] Source #
handleLexError :: IO [EmacsDataItem] Source #
handleParseError :: Bool -> ParseError token ast -> IO [EmacsDataItem] Source #
_handleParseError :: (Typeable token1, Typeable ast, Show token1, Show ast, TokenInterface token1, TokenInterface token2) => Bool -> Int -> Stack token1 ast -> ActionTable -> GotoTable -> ProdRules -> [Terminal token2] -> IO [EmacsDataItem] Source #
showSymbol :: Candidate -> String Source #
showRawSymbol :: Candidate -> String Source #
concatStrList :: [[Char]] -> [Char] Source #