| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private char | |
| private int | |
| private Rule | |
| private final HashMap | ruleMap
The rule map. |
| private ArrayList | |
| private String | |
| private String[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| private RuleHead | |
| public static Bnf | Returns: a new instanceif not specified, the help.csv is used csv)Create an instance using the grammar specified in the CSV file. |
| public HashMap | Returns: the map of possible token types / tokensthe start of the statement query)Get the list of tokens that can follow. |
| public RuleHead | Returns: the rule head, or nullthe title title)Get the rule head for the given title. |
| public static String | |
| public ArrayList | |
| public static StringTokenizer | |
| public void | |
| private void | |
| private RuleExtension | |
| private Rule | |
| private Rule | |
| private Rule | |
| private Rule | |
| private void | |
| public static boolean | Returns: if the statement is not empty and starts with a whitespacethe statement s)Check whether the statement starts with a whitespace. |
| private String[] | |
| public String | |
| public void | updateTopic(String
the topic topic, DbContextRule the database context rule rule)Update a topic with a context specific rule. |
| public void | visit(BnfVisitor
the visitor visitor, String the syntax to parse s)Parse the syntax and let the rule call the visitor. |
| currentToken | back to summary |
|---|---|
| private String currentToken | |
| currentTopic | back to summary |
|---|---|
| private String currentTopic | |
| firstChar | back to summary |
|---|---|
| private char firstChar | |
| index | back to summary |
|---|---|
| private int index | |
| lastRepeat | back to summary |
|---|---|
| private Rule lastRepeat | |
| ruleMap | back to summary |
|---|---|
| private final HashMap<String, RuleHead> ruleMap The rule map. The key is lowercase, and all spaces are replaces with underscore. | |
| statements | back to summary |
|---|---|
| private ArrayList<RuleHead> statements | |
| syntax | back to summary |
|---|---|
| private String syntax | |
| tokens | back to summary |
|---|---|
| private String[] tokens | |
| Bnf | back to summary |
|---|---|
| public Bnf() | |
| addAlias | back to summary |
|---|---|
| public void addAlias(String name, String replacement) Add an alias for a rule. | |
| addFixedRule | back to summary |
|---|---|
| private void addFixedRule(String name, int fixedType) | |
| addRule | back to summary |
|---|---|
| private RuleHead addRule(String topic, String section, Rule rule) | |
| getInstance | back to summary |
|---|---|
| public static Bnf getInstance(Reader csv) throws SQLException, IOException Create an instance using the grammar specified in the CSV file.
| |
| getNextTokenList | back to summary |
|---|---|
| public HashMap Get the list of tokens that can follow. This is the main autocomplete method. The returned map for the query 'S' may look like this: key: 1#SELECT, value: ELECT key: 1#SET, value: ET | |
| getRuleHead | back to summary |
|---|---|
| public RuleHead getRuleHead(String title) Get the rule head for the given title. | |
| getRuleMapKey | back to summary |
|---|---|
| public static String getRuleMapKey(String token) Convert convert ruleLink to rule_link. | |
| getStatements | back to summary |
|---|---|
| public ArrayList Get the list of possible statements. | |
| getTokenizer | back to summary |
|---|---|
| public static StringTokenizer getTokenizer(String s) Get the tokenizer for the given syntax.
| |
| linkStatements | back to summary |
|---|---|
| public void linkStatements() Cross-link all statements with each other. This method is called after updating the topics. | |
| parse | back to summary |
|---|---|
| private void parse(Reader reader) throws SQLException, IOException | |
| parseExtension | back to summary |
|---|---|
| private RuleExtension parseExtension(boolean compatibility) | |
| parseList | back to summary |
|---|---|
| private Rule parseList() | |
| parseOr | back to summary |
|---|---|
| private Rule parseOr() | |
| parseRule | back to summary |
|---|---|
| private Rule parseRule() | |
| parseToken | back to summary |
|---|---|
| private Rule parseToken() | |
| read | back to summary |
|---|---|
| private void read() | |
| startWithSpace | back to summary |
|---|---|
| public static boolean startWithSpace(String s) Check whether the statement starts with a whitespace.
| |
| tokenize | back to summary |
|---|---|
| private String[] tokenize() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| updateTopic | back to summary |
|---|---|
| public void updateTopic(String topic, DbContextRule rule) Update a topic with a context specific rule. This is used for autocomplete support.
| |
| visit | back to summary |
|---|---|
| public void visit(BnfVisitor visitor, String s) Parse the syntax and let the rule call the visitor.
| |