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 -> ParseError token ast | |
NotFoundGoto :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => Int -> String -> Stack token ast -> ActionTable -> GotoTable -> 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 #
data StkElem token ast Source #
StkState Int | |
StkTerminal (Terminal token) | |
StkNonterminal 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 #
runAutomaton :: (TokenInterface token, Typeable token, Typeable ast, Show token, Show ast) => ActionTable -> GotoTable -> ProdRules -> [ParseFun token ast] -> [Terminal token] -> IO ast Source #
compCandidates :: [Candidate] -> Int -> ActionTable -> GotoTable -> IO [[Candidate]] Source #