![]() |
Dataflow Software Stack
032db78
Master Thesis of Mathijs Saey at the VUB
|
Node lookup and scoping rules. More...
Classes | |
class | CompoundScope |
Single part of the scope stack. More... | |
class | Scope |
Single part of the scope stack. More... | |
Functions | |
def | scope |
Create a new scope and push it on top of the stack. More... | |
def | scopeCompound |
Create a new compound scope and push it on top of the stack. More... | |
def | popScope |
Remove the current scope. More... | |
def | getNode |
Get the node with label in the current scope. More... | |
def | addNode |
Add node with label to the current scope. More... | |
def | getSubGraph |
Get the subgraph of the current scope. More... | |
def | addSubGraph |
Add a subgraph to the compound scope. More... | |
def | getSubGraphs |
Get the subgraphs. More... | |
def | isCompound |
Are we currently in a compound node? More... | |
def | enterComp |
Enter a compound node. More... | |
def | exitComp |
Exit a compound node. More... | |
Variables | |
tuple | log = logging.getLogger(__name__) |
list | __STACK__ = [Scope()] |
A stack with the global scope at the bottom, and the current scope at the top. More... | |
int | __COMP_LEVEL__ = 0 |
Keeps track of the level of depth w.r.t. More... | |
Node lookup and scoping rules.
This module contains the "state" of the parser. It keeps track of the discovered nodes and graphs and the scopes they are in.
def frontEnd.IF1.environment.scope | ( | subGraph | ) |
Create a new scope and push it on top of the stack.
def frontEnd.IF1.environment.scopeCompound | ( | ) |
Create a new compound scope and push it on top of the stack.
def frontEnd.IF1.environment.popScope | ( | ) |
Remove the current scope.
Returns to the previous scope.
def frontEnd.IF1.environment.getNode | ( | label | ) |
Get the node with label in the current scope.
label | The label to look for. |
def frontEnd.IF1.environment.addNode | ( | label, | |
node | |||
) |
Add node with label to the current scope.
label | The IF1 label of the node. |
node | The node to add |
def frontEnd.IF1.environment.getSubGraph | ( | ) |
Get the subgraph of the current scope.
def frontEnd.IF1.environment.addSubGraph | ( | graph | ) |
Add a subgraph to the compound scope.
This will cause errors if the current scope is not a compound scope.
def frontEnd.IF1.environment.getSubGraphs | ( | ) |
Get the subgraphs.
This will cause errors if the current scope is not a compound scope.
def frontEnd.IF1.environment.isCompound | ( | ) |
Are we currently in a compound node?
def frontEnd.IF1.environment.enterComp | ( | ) |
Enter a compound node.
def frontEnd.IF1.environment.exitComp | ( | ) |
Exit a compound node.
tuple frontEnd.IF1.environment.log = logging.getLogger(__name__) |
list frontEnd.IF1.environment.__STACK__ = [Scope()] |
A stack with the global scope at the bottom, and the current scope at the top.
int frontEnd.IF1.environment.__COMP_LEVEL__ = 0 |
Keeps track of the level of depth w.r.t.
a compound definition.
This allows us to handle nested compound nodes without issues.