Package snap.parse
Class ParseRuleParser
java.lang.Object
snap.parse.Parser
snap.parse.ParseRuleParser
A Parser to parse simple snap grammar rule files.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AndExpr Handler: { CountExpr CountExpr* }static class
CountExpr Handler: { Expression ( "*" "+" "?" )? }static class
Expression Handler: { String | "LookAhead" "(" (Number | OrExpr) ")" | Name | "(" OrExpr ")" }static class
OrExpr Handler: { AndExpr ( "|" AndExpr )* }static class
ParseRuleFile Handler: { ParseRule* }static class
ParseRule Handler: { Name "{" OrExpr "}" }Nested classes/interfaces inherited from class snap.parse.Parser
Parser.HandlerRef
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new ParseRule rule.protected Tokenizer
Override to allow rules files to have standard Java single/multiple line comments.Methods inherited from class snap.parse.Parser
clearTokens, createNode, getCharIndex, getInput, getLastValidToken, getLookAheadToken, getNextToken, getRule, getRule, getToken, getTokenizer, initRule, lookAhead, parse, parse, parse, parse, parseCustom, parseCustom, parseCustom, parseFailed, setCharIndex, setInput, setRule, setTokenizer
-
Constructor Details
-
ParseRuleParser
public ParseRuleParser()
-
-
Method Details
-
createRule
Creates a new ParseRule rule.- Overrides:
createRule
in classParser
-
createTokenizer
Override to allow rules files to have standard Java single/multiple line comments.- Overrides:
createTokenizer
in classParser
-