public class StatementRule extends java.lang.Object implements GrammaticalRuleI
<StatementRule> ::=
| <expression1>
| <JavaWhileRule2>
| ....
Returns the result of the first successful statement parsed.| Constructor and Description |
|---|
StatementRule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addRule(GrammaticalRuleI rule)
Adds a new rule.
|
java.util.List<GrammaticalRuleI> |
getRules()
The list of rules
|
void |
init(Jep jep)
Delayed initialisation, this methods is called whenever components of the jep instance are changed.
|
Node |
match(Lookahead2Iterator<Token> it,
GrammarParser parser)
Attempt to parse the input using the rule
|
public boolean addRule(GrammaticalRuleI rule)
rule - the rule to be added.public java.util.List<GrammaticalRuleI> getRules()
public Node match(Lookahead2Iterator<Token> it, GrammarParser parser) throws ParseException
GrammaticalRuleImatch in interface GrammaticalRuleImatch in interface GrammarMatcherit - iterator with tokens to parseparser - the parser to parse any components of the ruleParseException - if there is a syntactical errorpublic void init(Jep jep)
GrammarMatcherinit in interface GrammarMatcherjep - the current jep instance.Copyright © 2018 Singular Systems http://www.singularsys.com/jep