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