Interface GrammaticalRuleI
-
- All Superinterfaces:
GrammarMatcher
,java.io.Serializable
- All Known Implementing Classes:
BlockRule
,ControlRule
,ExpressionRule
,JavaForRule
,JavaIfRule
,JavaWhileRule
,PossiblyTerminatedExpressionRule
,SequenceRule
,SequenceSeparatorRule
,StatementRule
,TerminatedExpressionRule
public interface GrammaticalRuleI extends GrammarMatcher
Indicates rules for parsing structured code. Defines amatch
method grammatical rules should implement.- Author:
- Richard Morris
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Node
match(Lookahead2Iterator<Token> it, GrammarParser parser)
Attempt to parse the input using the rule-
Methods inherited from interface com.singularsys.jep.configurableparser.matchers.GrammarMatcher
init
-
-
-
-
Method Detail
-
match
Node match(Lookahead2Iterator<Token> it, GrammarParser parser) throws ParseException
Attempt to parse the input using the rule- Specified by:
match
in interfaceGrammarMatcher
- Parameters:
it
- iterator with tokens to parseparser
- the parser to parse any components of the rule- Returns:
- successful parses should return a Node, null if unsuccessful
- Throws:
ParseException
- if there is a syntactical error
-
-