org.antlr.tool
public class AttributeScope extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<java.lang.String,Attribute> |
attributes
The list of Attribute objects
|
antlr.Token |
derivedFromToken
This scope is associated with which input token (for error handling)?
|
Grammar |
grammar |
boolean |
isDynamicGlobalScope
Not a rule scope, but visible to all rules "scope symbols { ...}"
|
boolean |
isDynamicRuleScope
Visible to all rules, but defined in rule "scope { int i; }"
|
boolean |
isParameterScope |
boolean |
isPredefinedLexerRuleScope |
boolean |
isPredefinedRuleScope |
boolean |
isReturnScope |
static AttributeScope |
tokenScope
All token scopes (token labels) share the same fixed scope of
of predefined attributes.
|
Constructor and Description |
---|
AttributeScope(Grammar grammar,
java.lang.String name,
antlr.Token derivedFromToken) |
AttributeScope(java.lang.String name,
antlr.Token derivedFromToken) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String decl) |
void |
addAttributes(java.lang.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.
|
Attribute |
getAttribute(java.lang.String name) |
java.util.List<Attribute> |
getAttributes()
Used by templates to get all attributes
|
java.lang.String |
getName() |
java.util.Set |
intersection(AttributeScope other)
Return the set of keys that collide from
this and other.
|
int |
size() |
java.lang.String |
toString() |
public static AttributeScope tokenScope
public antlr.Token derivedFromToken
public Grammar grammar
public boolean isDynamicGlobalScope
public boolean isDynamicRuleScope
public boolean isParameterScope
public boolean isReturnScope
public boolean isPredefinedRuleScope
public boolean isPredefinedLexerRuleScope
protected java.util.LinkedHashMap<java.lang.String,Attribute> attributes
public AttributeScope(java.lang.String name, antlr.Token derivedFromToken)
public AttributeScope(Grammar grammar, java.lang.String name, antlr.Token derivedFromToken)
public java.lang.String getName()
public void addAttributes(java.lang.String definitions, int separator)
public void addAttribute(java.lang.String name, java.lang.String decl)
public Attribute getAttribute(java.lang.String name)
public java.util.List<Attribute> getAttributes()
public java.util.Set intersection(AttributeScope other)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014. All Rights Reserved.