public class Terminal extends GrammarSymbol
regex
must be set to a non-null value
before a terminal is passed to the compiler.Modifier and Type | Field and Description |
---|---|
protected String |
code
Code specifying a semantic action for this terminal.
|
protected Set<CopperElementReference> |
dominateList
Terminals and/or terminal classes over which this terminal takes lexical precedence.
|
protected OperatorAssociativity |
operatorAssociativity
The terminal's operator associativity.
|
protected CopperElementReference |
operatorClass
The terminal's operator precedence class.
|
protected Integer |
operatorPrecedence
The terminal's operator precedence.
|
protected CopperElementReference |
prefix
The terminal's transparent prefix.
|
protected Regex |
regex
The regex represented by this terminal.
|
protected Set<CopperElementReference> |
submitList
Terminals and/or terminal classes that take precedence over this terminal.
|
protected Set<CopperElementReference> |
terminalClasses
Terminal classes to which this terminal belongs.
|
returnType
displayName, location, name, type
Constructor and Description |
---|
Terminal() |
getReturnType, setReturnType
getDisplayName, getLocation, getName, getType, hasDisplayName, setDisplayName, setLocation, setName, setName
protected Regex regex
protected CopperElementReference operatorClass
protected Integer operatorPrecedence
protected OperatorAssociativity operatorAssociativity
protected String code
protected Set<CopperElementReference> terminalClasses
protected Set<CopperElementReference> submitList
protected Set<CopperElementReference> dominateList
protected CopperElementReference prefix
public boolean isComplete()
CopperASTBean
name
and location
to be set, and may impose
additional individual requirements.isComplete
in class CopperASTBean
true
iff all required elements and parameters have been set to non-null values.public Set<String> whatIsMissing()
whatIsMissing
in class CopperASTBean
public CopperElementReference getOperatorClass()
operatorClass
public void setOperatorClass(CopperElementReference operatorClass)
operatorClass
public Integer getOperatorPrecedence()
operatorPrecedence
public void setOperatorPrecedence(Integer operatorPrecedence)
operatorPrecedence
public OperatorAssociativity getOperatorAssociativity()
operatorAssociativity
public void setOperatorAssociativity(OperatorAssociativity operatorAssociativity)
operatorAssociativity
public Set<CopperElementReference> getTerminalClasses()
terminalClasses
public boolean addTerminalClass(CopperElementReference terminalClass)
terminalClasses
public void setTerminalClasses(Set<CopperElementReference> terminalClasses)
terminalClasses
public Set<CopperElementReference> getSubmitList()
submitList
public boolean addSubmitsTo(CopperElementReference t)
submitList
public void setSubmitList(Set<CopperElementReference> submitList)
submitList
public Set<CopperElementReference> getDominateList()
dominateList
public boolean addDominates(CopperElementReference t)
dominateList
public void setDominateList(Set<CopperElementReference> dominateList)
dominateList
public CopperElementReference getPrefix()
prefix
public void setPrefix(CopperElementReference prefix)
prefix
public <RT,E extends Exception> RT acceptVisitor(edu.umn.cs.melt.copper.compiletime.spec.grammarbeans.visitors.CopperASTBeanVisitor<RT,E> visitor) throws E extends Exception
acceptVisitor
in class CopperASTBean
E extends Exception
Copyright © 2018 Minnesota Extensible Language Tools. All rights reserved.