Interface IrVisitor
-
- All Superinterfaces:
ru.ispras.fortress.util.TreeVisitor
- All Known Implementing Classes:
IrVisitorDefault
public interface IrVisitor extends ru.ispras.fortress.util.TreeVisitor
TheIrVisitor
interface is to be implemented by all visitor objects applied to the IR of an ISA specification.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAlternativeBegin(PrimitiveOr orRule, Primitive item)
Notifies that visiting an item of an OR-rule has been started.void
onAlternativeEnd(PrimitiveOr orRule, Primitive item)
Notifies that visiting an item of an OR-rule has been finished.void
onArgumentBegin(PrimitiveAnd andRule, java.lang.String argName, Primitive argType)
Notifies that visiting an AND-rule argument has been started.void
onArgumentEnd(PrimitiveAnd andRule, java.lang.String argName, Primitive argType)
Notifies that visiting an AND-rule argument has been finished.void
onAssignment(StatementAssignment stmt)
void
onAttributeBegin(PrimitiveAnd andRule, Attribute attr)
Notifies that visiting an attribute of an AND-rule has been started.void
onAttributeCallBegin(StatementAttributeCall stmt)
void
onAttributeCallEnd(StatementAttributeCall stmt)
void
onAttributeEnd(PrimitiveAnd andRule, Attribute attr)
Notifies that visiting an attribute of an AND-rule has been finished.void
onConditionBegin(StatementCondition stmt)
void
onConditionBlockBegin(ru.ispras.fortress.expression.Node condition)
void
onConditionBlockEnd(ru.ispras.fortress.expression.Node condition)
void
onConditionEnd(StatementCondition stmt)
void
onFormat(StatementFormat stmt)
void
onFunctionCall(StatementFunctionCall stmt)
void
onLetConstant(LetConstant let)
Notifies that a let construct describing a constant value has been visited.void
onLetLabel(LetLabel let)
Notifies that a let construct associates a symbolic name with a memory location (in other words, establishes a label).void
onMemory(java.lang.String name, MemoryResource memory)
Notifies that a memory storage has been visited.void
onPrimitiveBegin(Primitive item)
Notifies that visiting a primitive (object describing a MODE or OP) has been started.void
onPrimitiveEnd(Primitive item)
Notifies that visiting a primitive has been finished.void
onPrimitivesBegin()
Notifies that visiting primitives (objects describing MODEs and OPs) has been started.void
onPrimitivesEnd()
Notifies that visiting primitives (objects describing MODEs and OPs) has been finished.void
onResourcesBegin()
Notifies that traversing the resource section has been started.void
onResourcesEnd()
Notifies that traversing the resource section has been finished.void
onShortcutBegin(PrimitiveAnd andRule, Shortcut shortcut)
Notifies that visiting a shortcut has been started.void
onShortcutEnd(PrimitiveAnd andRule, Shortcut shortcut)
Notifies that visiting a shortcut has been finished.void
onStatementBegin(PrimitiveAnd andRule, Attribute attr, Statement stmt)
Notifies that visiting a statement (in an attribute) has been started.void
onStatementEnd(PrimitiveAnd andRule, Attribute attr, Statement stmt)
Notifies that visiting a statement (in an attribute) has been finished.void
onType(java.lang.String name, Type type)
Notifies that a type has been visited.void
setStatus(ru.ispras.fortress.util.TreeVisitor.Status status)
-
-
-
Method Detail
-
setStatus
void setStatus(ru.ispras.fortress.util.TreeVisitor.Status status)
-
onResourcesBegin
void onResourcesBegin()
Notifies that traversing the resource section has been started. The section includes constants, types and memory storages.
-
onResourcesEnd
void onResourcesEnd()
Notifies that traversing the resource section has been finished.
-
onLetConstant
void onLetConstant(LetConstant let)
Notifies that a let construct describing a constant value has been visited.- Parameters:
let
- Object describing the constant.
-
onLetLabel
void onLetLabel(LetLabel let)
Notifies that a let construct associates a symbolic name with a memory location (in other words, establishes a label).- Parameters:
let
- Object describing the label associated with a memory location.
-
onType
void onType(java.lang.String name, Type type)
Notifies that a type has been visited.- Parameters:
name
- Type name.type
- Type description.
-
onMemory
void onMemory(java.lang.String name, MemoryResource memory)
Notifies that a memory storage has been visited.- Parameters:
name
- Memory storage name.memory
- Memory storage description.
-
onPrimitivesBegin
void onPrimitivesBegin()
Notifies that visiting primitives (objects describing MODEs and OPs) has been started.
-
onPrimitivesEnd
void onPrimitivesEnd()
Notifies that visiting primitives (objects describing MODEs and OPs) has been finished.
-
onPrimitiveBegin
void onPrimitiveBegin(Primitive item)
Notifies that visiting a primitive (object describing a MODE or OP) has been started.- Parameters:
item
- Primitive object describing a MODE or OP.
-
onPrimitiveEnd
void onPrimitiveEnd(Primitive item)
Notifies that visiting a primitive has been finished.- Parameters:
item
- Primitive object.
-
onAlternativeBegin
void onAlternativeBegin(PrimitiveOr orRule, Primitive item)
Notifies that visiting an item of an OR-rule has been started.- Parameters:
orRule
- OR-rule description.item
- Item being visited.
-
onAlternativeEnd
void onAlternativeEnd(PrimitiveOr orRule, Primitive item)
Notifies that visiting an item of an OR-rule has been finished.- Parameters:
orRule
- OR-rule description.item
- Item being visited.
-
onArgumentBegin
void onArgumentBegin(PrimitiveAnd andRule, java.lang.String argName, Primitive argType)
Notifies that visiting an AND-rule argument has been started.- Parameters:
andRule
- AND-rule description.argName
- Argument name.argType
- Argument type description.
-
onArgumentEnd
void onArgumentEnd(PrimitiveAnd andRule, java.lang.String argName, Primitive argType)
Notifies that visiting an AND-rule argument has been finished.- Parameters:
andRule
- AND-rule description.argName
- Argument name.argType
- Argument type description.
-
onAttributeBegin
void onAttributeBegin(PrimitiveAnd andRule, Attribute attr)
Notifies that visiting an attribute of an AND-rule has been started.- Parameters:
andRule
- AND-rule description.attr
- Attribute description.
-
onAttributeEnd
void onAttributeEnd(PrimitiveAnd andRule, Attribute attr)
Notifies that visiting an attribute of an AND-rule has been finished.- Parameters:
andRule
- AND-rule description.attr
- Attribute description.
-
onStatementBegin
void onStatementBegin(PrimitiveAnd andRule, Attribute attr, Statement stmt)
Notifies that visiting a statement (in an attribute) has been started.- Parameters:
andRule
- AND-rule that contains the statement.attr
- Attribute that contains the statement.stmt
- Statement description.
-
onStatementEnd
void onStatementEnd(PrimitiveAnd andRule, Attribute attr, Statement stmt)
Notifies that visiting a statement (in an attribute) has been finished.- Parameters:
andRule
- AND-rule that contains the statement.attr
- Attribute that contains the statement.stmt
- Statement description.
-
onShortcutBegin
void onShortcutBegin(PrimitiveAnd andRule, Shortcut shortcut)
Notifies that visiting a shortcut has been started.- Parameters:
andRule
- AND-rule the shortcut refers to.shortcut
- Shortcut description.
-
onShortcutEnd
void onShortcutEnd(PrimitiveAnd andRule, Shortcut shortcut)
Notifies that visiting a shortcut has been finished.- Parameters:
andRule
- AND-rule the shortcut refers to.shortcut
- Shortcut description.
-
onAssignment
void onAssignment(StatementAssignment stmt)
-
onFormat
void onFormat(StatementFormat stmt)
-
onFunctionCall
void onFunctionCall(StatementFunctionCall stmt)
-
onAttributeCallBegin
void onAttributeCallBegin(StatementAttributeCall stmt)
-
onAttributeCallEnd
void onAttributeCallEnd(StatementAttributeCall stmt)
-
onConditionBegin
void onConditionBegin(StatementCondition stmt)
-
onConditionEnd
void onConditionEnd(StatementCondition stmt)
-
onConditionBlockBegin
void onConditionBlockBegin(ru.ispras.fortress.expression.Node condition)
-
onConditionBlockEnd
void onConditionBlockEnd(ru.ispras.fortress.expression.Node condition)
-
-