public interface TopDownRuleIndex
Modifier and Type | Method and Description |
---|---|
void |
add(Rule rule)
Adds a rule to the index.
|
void |
foreachRule(int parentState,
Consumer<Rule> fn) |
Iterable<Rule> |
getAllRules() |
IntIterable |
getLabelsTopDown(int parentState)
Retrieves the terminal symbols such that rules for
the given parent state exist.
|
Iterable<Rule> |
getRules(int parentState)
Retrieves the rules for a given parent state.
|
Iterable<Rule> |
getRules(int labelId,
int parentState)
Retrieves the rules for a given parent state and terminal
symbol.
|
boolean |
useCachedRule(int label,
int parent)
Checks whether top-down rules for this parent state and label
should be looked up in this index.
|
void add(Rule rule)
rule
- Iterable<Rule> getRules(int parentState)
parentState
- IntIterable getLabelsTopDown(int parentState)
parentState
- Iterable<Rule> getRules(int labelId, int parentState)
labelId
- parentState
- boolean useCachedRule(int label, int parent)
label
- parent
- Copyright © 2017. All rights reserved.