public class AttributeDict extends Object
Each rule has potentially 3 scopes: return values, parameters, and an implicitly-named scope (i.e., a scope defined in a rule). Implicitly-defined scopes are named after the rule; rules and scopes then must live in the same name space--no collisions allowed.
Modifier and Type | Class | Description |
---|---|---|
static class |
AttributeDict.DictType |
Modifier and Type | Field | Description |
---|---|---|
GrammarAST |
ast |
|
LinkedHashMap<String,Attribute> |
attributes |
The list of
Attribute objects. |
String |
name |
|
static AttributeDict |
predefinedTokenDict |
All
Token scopes (token labels) share the same fixed scope of
of predefined attributes. |
AttributeDict.DictType |
type |
Constructor | Description |
---|---|
AttributeDict() |
|
AttributeDict(AttributeDict.DictType type) |
Modifier and Type | Method | Description |
---|---|---|
Attribute |
add(Attribute a) |
|
Attribute |
get(String name) |
|
String |
getName() |
|
Set<String> |
intersection(AttributeDict other) |
Return the set of keys that collide from
this and other . |
int |
size() |
|
String |
toString() |
public String name
public GrammarAST ast
public AttributeDict.DictType type
public static final AttributeDict predefinedTokenDict
public final LinkedHashMap<String,Attribute> attributes
Attribute
objects.public AttributeDict()
public AttributeDict(AttributeDict.DictType type)
public String getName()
public int size()
public Set<String> intersection(AttributeDict other)
this
and other
.Copyright © 1992–2019 ANTLR. All rights reserved.