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
SemanticExceptionpublic void addVariable(org.antlr.runtime.tree.CommonTree varId,
org.antlr.runtime.tree.CommonTree typeId)
throws SemanticException
SemanticExceptionpublic void addAttribute(org.antlr.runtime.tree.CommonTree attrId,
java.util.List<Stmt> stmts)
throws SemanticException
SemanticExceptionpublic Memory buildMemory() throws SemanticException
SemanticExceptionpublic Segment buildSegment(ru.ispras.fortress.expression.Node rangeStartExpr, ru.ispras.fortress.expression.Node rangeEndExpr) throws SemanticException
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.