org.h2.bnf
Interface Rule

All Known Implementing Classes:
DbContextRule, RuleFixed

public interface Rule

Represents a BNF rule.


Method Summary
 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.
 

Method Detail

setLinks

void setLinks(java.util.HashMap<java.lang.String,RuleHead> ruleMap)
Update cross references.

Parameters:
ruleMap - the reference map

autoComplete

boolean autoComplete(Sentence sentence)
Add the next possible token(s). If there was a match, the query in the sentence is updated (the matched token is removed).

Parameters:
sentence - the sentence context
Returns:
true if a full match

accept

void accept(BnfVisitor visitor)
Call the visit method in the given visitor.

Parameters:
visitor - the visitor