Package org.antlr.v4.runtime
Annotation Interface RuleDependency
Declares a dependency upon a grammar rule, along with a set of zero or more
dependent rules.
Version numbers within a grammar should be assigned on a monotonically
increasing basis to allow for accurate tracking of dependent rules.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies the set of grammar rules related torule()which the annotated element depends on.
-
Element Details
-
recognizer
Class<? extends Recognizer<?,?>> recognizer -
rule
int rule -
version
int version
-
-
-
dependents
Dependents[] dependentsSpecifies the set of grammar rules related torule()which the annotated element depends on. Even when absent from this set, the annotated element is implicitly dependent upon the explicitly specifiedrule(), which corresponds to theDependents.SELFelement. By default, the annotated element is dependent upon the specifiedrule()and itsDependents.PARENTS, i.e. the rule within one level of context information. The parents are included since the most frequent assumption about a rule is where it's used in the grammar.- Default:
- {SELF, PARENTS}
-