|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.configurableparser.matchers.ListOrBracketGrammarMatcher
public class ListOrBracketGrammarMatcher
A GrammarMatcher which matches overloaded lists of items or brackets. If there is more than one element in the list it will be interpreted as a list, otherwise it will be interpreted as a normal bracketed expression.
Constructor Summary | |
---|---|
ListOrBracketGrammarMatcher(Token open,
Token close,
Token comma)
Create a ListOrBracketGrammarMatcher |
Method Summary | |
---|---|
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)
Test whether the input matches this pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListOrBracketGrammarMatcher(Token open, Token close, Token comma)
open
- token representing an opening bracketclose
- token representing a closing bracketcomma
- token representing a list item separatorMethod Detail |
---|
public void init(Jep jep)
GrammarMatcher
init
in interface GrammarMatcher
jep
- the current jep instance.public Node match(Lookahead2Iterator<Token> it, GrammarParser parser) throws ParseException
GrammarMatcher
match
in interface GrammarMatcher
it
- An iterator inspecting the inputparser
- the parser to use when evaluating sub expressions
ParseException
- if there is a syntactical error in the input.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |