public class JavaWhileRule extends java.lang.Object implements GrammaticalRuleI
while(x<10) x=x+1;
<JavaWhileRule> ::=
<while> <open> <expression> <close> <statement>
A successful parse will return a LoopNode.| Constructor and Description |
|---|
JavaWhileRule(SymbolToken whileToken,
SymbolToken open,
GrammaticalRuleI expression,
SymbolToken close,
GrammaticalRuleI statement) |
| Modifier and Type | Method and Description |
|---|---|
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 JavaWhileRule(SymbolToken whileToken, SymbolToken open, GrammaticalRuleI expression, SymbolToken close, GrammaticalRuleI statement)
whileToken - token for the while symbolopen - opening bracketexpression - rule to parse an expressionclose - closing bracketstatement - rule to parse an statementpublic 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