Class RoundBracketGrammarMatcher
java.lang.Object
com.singularsys.jep.configurableparser.matchers.RoundBracketGrammarMatcher
- All Implemented Interfaces:
GrammarMatcher,Serializable
A GrammarMatcher which matches bracketed expressions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRoundBracketGrammarMatcher(Token open, Token close) Create a RoundBracketGrammarMatcher -
Method Summary
Modifier and TypeMethodDescriptionvoidDelayed initialisation, this method is called whenever components of the jep instance are changed.match(Lookahead2Iterator<Token> it, GrammarParser parser) Test whether the input matches this pattern.
-
Constructor Details
-
RoundBracketGrammarMatcher
Create a RoundBracketGrammarMatcher- Parameters:
open- token representing an opening bracketclose- token representing a closing bracket
-
-
Method Details
-
init
Description copied from interface:GrammarMatcherDelayed initialisation, this method is called whenever components of the jep instance are changed.- Specified by:
initin interfaceGrammarMatcher- Parameters:
jep- the current jep instance.
-
match
Description copied from interface:GrammarMatcherTest whether the input matches this pattern.- Specified by:
matchin interfaceGrammarMatcher- Parameters:
it- An iterator inspecting the inputparser- the parser to use when evaluating sub expressions- Returns:
- if matched returns a node representing the content, return null is does not match
- Throws:
ParseException- if there is a syntactical error in the input.
-