Package org.h2.bnf
Class RuleRepeat
- java.lang.Object
-
- org.h2.bnf.RuleRepeat
-
-
Constructor Summary
Constructors Constructor Description RuleRepeat(Rule rule, boolean comma)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(BnfVisitor visitor)
Call the visit method in the given visitor.boolean
autoComplete(Sentence sentence)
Add the next possible token(s).void
setLinks(java.util.HashMap<java.lang.String,RuleHead> ruleMap)
Update cross references.java.lang.String
toString()
-
-
-
Field Detail
-
rule
private final Rule rule
-
comma
private final boolean comma
-
-
Constructor Detail
-
RuleRepeat
public RuleRepeat(Rule rule, boolean comma)
-
-
Method Detail
-
accept
public void accept(BnfVisitor visitor)
Description copied from interface:Rule
Call the visit method in the given visitor.
-
setLinks
public void setLinks(java.util.HashMap<java.lang.String,RuleHead> ruleMap)
Description copied from interface:Rule
Update cross references.
-
autoComplete
public boolean autoComplete(Sentence sentence)
Description copied from interface:Rule
Add the next possible token(s). If there was a match, the query in the sentence is updated (the matched token is removed).- Specified by:
autoComplete
in interfaceRule
- Parameters:
sentence
- the sentence context- Returns:
- true if a full match
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-