Package org.h2.bnf
Class RuleElement
java.lang.Object
org.h2.bnf.RuleElement
- All Implemented Interfaces:
Rule
A single terminal rule in a BNF object.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BnfVisitor visitor) Call the visit method in the given visitor.boolean
autoComplete
(Sentence sentence) Add the next possible token(s).void
Update cross references.toString()
-
Field Details
-
keyword
private final boolean keyword -
name
-
link
-
type
private final int type
-
-
Constructor Details
-
RuleElement
-
-
Method Details
-
accept
Description copied from interface:Rule
Call the visit method in the given visitor. -
setLinks
Description copied from interface:Rule
Update cross references. -
autoComplete
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
-