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.
|
returnTypedisplayName, location, name, type| Constructor and Description |
|---|
Terminal() |
getReturnType, setReturnTypegetDisplayName, getLocation, getName, getType, hasDisplayName, setDisplayName, setLocation, setName, setNameprotected 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()
CopperASTBeanname and location to be set, and may impose
additional individual requirements.isComplete in class CopperASTBeantrue iff all required elements and parameters have been set to non-null values.public Set<String> whatIsMissing()
whatIsMissing in class CopperASTBeanpublic CopperElementReference getOperatorClass()
operatorClasspublic void setOperatorClass(CopperElementReference operatorClass)
operatorClasspublic Integer getOperatorPrecedence()
operatorPrecedencepublic void setOperatorPrecedence(Integer operatorPrecedence)
operatorPrecedencepublic OperatorAssociativity getOperatorAssociativity()
operatorAssociativitypublic void setOperatorAssociativity(OperatorAssociativity operatorAssociativity)
operatorAssociativitypublic Set<CopperElementReference> getTerminalClasses()
terminalClassespublic boolean addTerminalClass(CopperElementReference terminalClass)
terminalClassespublic void setTerminalClasses(Set<CopperElementReference> terminalClasses)
terminalClassespublic Set<CopperElementReference> getSubmitList()
submitListpublic boolean addSubmitsTo(CopperElementReference t)
submitListpublic void setSubmitList(Set<CopperElementReference> submitList)
submitListpublic Set<CopperElementReference> getDominateList()
dominateListpublic boolean addDominates(CopperElementReference t)
dominateListpublic void setDominateList(Set<CopperElementReference> dominateList)
dominateListpublic CopperElementReference getPrefix()
prefixpublic void setPrefix(CopperElementReference prefix)
prefixpublic <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 CopperASTBeanE extends ExceptionCopyright © 2018 Minnesota Extensible Language Tools. All rights reserved.