Package ru.ispras.verilog.parser.model
Class VerilogCaseStatement
- java.lang.Object
-
- ru.ispras.verilog.parser.core.AbstractSymbolTable<Tag>
-
- ru.ispras.verilog.parser.core.AbstractNode<VerilogNode.Tag>
-
- ru.ispras.verilog.parser.model.VerilogNode
-
- ru.ispras.verilog.parser.model.VerilogStatement
-
- ru.ispras.verilog.parser.model.VerilogCaseStatement
-
public final class VerilogCaseStatement extends VerilogStatement
VerilogCaseStatement
represents case statements.There are the following process types:
case
(ordinary case statement);casex
(X-don't-care case statement);casez
(Z-don't-care case statement).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VerilogCaseStatement.Type
VerilogCaseStatement.Type
contains the case statement types.-
Nested classes/interfaces inherited from class ru.ispras.verilog.parser.model.VerilogNode
VerilogNode.Tag
-
Nested classes/interfaces inherited from class ru.ispras.verilog.parser.core.AbstractNode
AbstractNode.NodeKind
-
-
Field Summary
Fields Modifier and Type Field Description static VerilogNode.Tag
TAG
static java.util.EnumSet<VerilogNode.Tag>
TAGS_CHILDREN
-
Fields inherited from class ru.ispras.verilog.parser.model.VerilogStatement
TAGS
-
-
Constructor Summary
Constructors Constructor Description VerilogCaseStatement(VerilogCaseStatement other, VerilogNode parent)
Creates a copy of the case statement.VerilogCaseStatement(VerilogNode parent)
Creates a case statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCase(VerilogCaseStatementItem item)
Adds the case to the case selection construct.VerilogCaseStatement
clone()
Clones the symbol table.java.util.List<VerilogCaseStatementItem>
getCases()
Returns the cases.VerilogExpression
getExpression()
Returns the case selection expression.VerilogCaseStatement.Type
getType()
Returns the case statement type.boolean
isCase()
Checks whether the statement isCASE
.boolean
isCaseX()
Checks whether the statement isCASEX
.boolean
isCaseZ()
Checks whether the statement isCASEZ
.void
setCase()
Sets the type of the statement toCASE
.void
setCaseX()
Sets the type of the statement toCASEX
.void
setCaseZ()
Sets the type of the statement toCASEZ
.void
setExpression(VerilogExpression expression)
Sets the case selection expression.void
setType(VerilogCaseStatement.Type type)
Sets the case statement type.-
Methods inherited from class ru.ispras.verilog.parser.model.VerilogNode
getAttributes, getParentNode, isActivity, isAssertionStatement, isAssign, isAssignment, isAssignStatement, isAttribute, isBlockGenerate, isBlockStatement, isCaseGenerate, isCaseGenerateItem, isCaseStatement, isCaseStatementItem, isCode, isConnection, isDeclaration, isDelayedStatement, isDisableStatement, isGenerate, isIfGenerate, isIfGenerateBranch, isIfStatement, isIfStatementBranch, isInstantiation, isLoopGenerate, isLoopStatement, isModule, isNullStatement, isPathDeclaration, isPort, isPortConnection, isProcedure, isPropertyDeclaration, isPulseStyle, isSequenceDeclaration, isShowCancelled, isSpecify, isSvaPort, isTable, isTableEntry, isTaskStatement, isTriggerStatement, isWaitStatement, setAttributes, union
-
Methods inherited from class ru.ispras.verilog.parser.core.AbstractNode
add, find, getFullName, getName, getParent, getTag, hasName, hasScope, isTransparent, items, items, items, remove, replace, setName, setParent, setRedefinitionHandler, setTag, toString
-
Methods inherited from class ru.ispras.verilog.parser.core.AbstractSymbolTable
addAll, findAroundRecursively, findAroundRecursively, findRecursively, findRecursively, getUpperTable, items, items, setUpperTable
-
-
-
-
Field Detail
-
TAG
public static final VerilogNode.Tag TAG
-
TAGS_CHILDREN
public static final java.util.EnumSet<VerilogNode.Tag> TAGS_CHILDREN
-
-
Constructor Detail
-
VerilogCaseStatement
public VerilogCaseStatement(VerilogNode parent)
Creates a case statement.- Parameters:
parent
- the parent node.
-
VerilogCaseStatement
public VerilogCaseStatement(VerilogCaseStatement other, VerilogNode parent)
Creates a copy of the case statement.- Parameters:
other
- the case statement to be copied.parent
- the parent node.
-
-
Method Detail
-
getType
public VerilogCaseStatement.Type getType()
Returns the case statement type.- Returns:
- the case statement type.
-
setType
public void setType(VerilogCaseStatement.Type type)
Sets the case statement type.- Parameters:
type
- the type to be set.
-
isCase
public boolean isCase()
Checks whether the statement isCASE
.- Returns:
true
iff the statement isCASE
.
-
isCaseX
public boolean isCaseX()
Checks whether the statement isCASEX
.- Returns:
true
iff the statement isCASEX
.
-
isCaseZ
public boolean isCaseZ()
Checks whether the statement isCASEZ
.- Returns:
true
iff the statement isCASEZ
.
-
setCase
public void setCase()
Sets the type of the statement toCASE
.
-
setCaseX
public void setCaseX()
Sets the type of the statement toCASEX
.
-
setCaseZ
public void setCaseZ()
Sets the type of the statement toCASEZ
.
-
getExpression
public VerilogExpression getExpression()
Returns the case selection expression.- Returns:
- the expression.
-
setExpression
public void setExpression(VerilogExpression expression)
Sets the case selection expression.- Parameters:
expression
- the expression to be set.
-
getCases
public java.util.List<VerilogCaseStatementItem> getCases()
Returns the cases.- Returns:
- the list of cases.
-
addCase
public void addCase(VerilogCaseStatementItem item)
Adds the case to the case selection construct.- Parameters:
item
- the case to be added.
-
clone
public VerilogCaseStatement clone()
Description copied from class:AbstractSymbolTable
Clones the symbol table.- Specified by:
clone
in classVerilogStatement
- Returns:
- a copy of the symbol table.
-
-