protected final class MmuTreeWalkerBase.CommonBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(org.antlr.runtime.tree.CommonTree attrId,
java.util.List<Stmt> stmts) |
void |
addVariable(org.antlr.runtime.tree.CommonTree varId,
org.antlr.runtime.tree.CommonTree typeId) |
void |
addVariable(org.antlr.runtime.tree.CommonTree varId,
ru.ispras.fortress.expression.Node sizeExpr) |
Memory |
buildMemory() |
Segment |
buildSegment(ru.ispras.fortress.expression.Node rangeStartExpr,
ru.ispras.fortress.expression.Node rangeEndExpr)
Creates a segment IR object and adds it to the MMU IR.
|
public void addVariable(org.antlr.runtime.tree.CommonTree varId, ru.ispras.fortress.expression.Node sizeExpr) throws SemanticException
SemanticException
public void addVariable(org.antlr.runtime.tree.CommonTree varId, org.antlr.runtime.tree.CommonTree typeId) throws SemanticException
SemanticException
public void addAttribute(org.antlr.runtime.tree.CommonTree attrId, java.util.List<Stmt> stmts) throws SemanticException
SemanticException
public Memory buildMemory() throws SemanticException
SemanticException
public Segment buildSegment(ru.ispras.fortress.expression.Node rangeStartExpr, ru.ispras.fortress.expression.Node rangeEndExpr) throws SemanticException
segmentId
- Segment identifier.addressArgId
- Address argument identifier.addressArgType
- Address argument type (identifier).rangeStartExpr
- Range start expression.rangeEndExpr
- Range and expression.SemanticException
- (1) if the specified address type is not defined;
(2) if the range expressions equal to null
, (3) if the range expressions
cannot be reduced to constant integer values; (4) if the range start
value is greater than the range end value.