| Modifier and Type | Field and Description |
|---|---|
| public LinkedHashMap | |
| protected LinkedHashMap | attributes
The list of Attribute objects |
| public Token | derivedFromToken
This scope is associated with which input token (for error handling)? |
| public Grammar | |
| public boolean | isDynamicGlobalScope
Not a rule scope, but visible to all rules "scope symbols { ...}" |
| public boolean | isDynamicRuleScope
Visible to all rules, but defined in rule "scope { int i; }" |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| private String | name
The scope name |
| public static final AttributeScope | tokenScope
All token scopes (token labels) share the same fixed scope of of predefined attributes. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addAttributes(String definitions, int separator)
From a chunk of text holding the definitions of the attributes, pull them apart and create an Attribute for each one. |
| public final void | defineNamedAction(GrammarAST nameAST, GrammarAST actionAST)
Given @scope::name {action} define it for this attribute scope. |
| public Attribute | |
| public List | |
| public String | |
| public Set | |
| public int | |
| public String |
| actions | back to summary |
|---|---|
| public LinkedHashMap<String, GrammarAST> actions | |
| attributes | back to summary |
|---|---|
| protected LinkedHashMap<String, Attribute> attributes The list of Attribute objects | |
| derivedFromToken | back to summary |
|---|---|
| public Token derivedFromToken This scope is associated with which input token (for error handling)? | |
| grammar | back to summary |
|---|---|
| public Grammar grammar | |
| isDynamicGlobalScope | back to summary |
|---|---|
| public boolean isDynamicGlobalScope Not a rule scope, but visible to all rules "scope symbols { ...}" | |
| isDynamicRuleScope | back to summary |
|---|---|
| public boolean isDynamicRuleScope Visible to all rules, but defined in rule "scope { int i; }" | |
| isParameterScope | back to summary |
|---|---|
| public boolean isParameterScope | |
| isPredefinedLexerRuleScope | back to summary |
|---|---|
| public boolean isPredefinedLexerRuleScope | |
| isPredefinedRuleScope | back to summary |
|---|---|
| public boolean isPredefinedRuleScope | |
| isReturnScope | back to summary |
|---|---|
| public boolean isReturnScope | |
| name | back to summary |
|---|---|
| private String name The scope name | |
| tokenScope | back to summary |
|---|---|
| public static final AttributeScope tokenScope All token scopes (token labels) share the same fixed scope of of predefined attributes. I keep this out of the runtime.Token object to avoid a runtime space burden. | |
| AttributeScope | back to summary |
|---|---|
| public AttributeScope(String name, Token derivedFromToken) | |
| AttributeScope | back to summary |
|---|---|
| public AttributeScope(Grammar grammar, String name, Token derivedFromToken) | |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(String name, String decl) | |
| addAttributes | back to summary |
|---|---|
| public void addAttributes(String definitions, int separator) From a chunk of text holding the definitions of the attributes, pull them apart and create an Attribute for each one. Add to the list of attributes for this scope. Pass in the character that terminates a definition such as ',' or ';'. For example, scope symbols { int n; List names; } would pass in definitions equal to the text in between {...} and separator=';'. It results in two Attribute objects. | |
| defineNamedAction | back to summary |
|---|---|
| public final void defineNamedAction(GrammarAST nameAST, GrammarAST actionAST) Given @scope::name {action} define it for this attribute scope. Later, the code generator will ask for the actions table. | |
| getAttribute | back to summary |
|---|---|
| public Attribute getAttribute(String name) | |
| getAttributes | back to summary |
|---|---|
| public List Used by templates to get all attributes | |
| getName | back to summary |
|---|---|
| public String getName() | |
| intersection | back to summary |
|---|---|
| public Set Return the set of keys that collide from this and other. | |
| size | back to summary |
|---|---|
| public int size() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |