Walk
oqd_compiler_infrastructure.walk
¶
WalkBase
¶
Bases: PassBase
This class represents a tree traversal algorithm to walk through an AST.
Acknowledgement
This code was inspired by SymbolicUtils.jl, Liang.jl
Source code in oqd-compiler-infrastructure/src/oqd_compiler_infrastructure/walk.py
Pre
¶
Bases: WalkBase
This class represents the pre order tree traversal algorithm that walks through an AST and applies the rule from top to bottom.
Acknowledgement
This code was inspired by SymbolicUtils.jl, Liang.jl
Source code in oqd-compiler-infrastructure/src/oqd_compiler_infrastructure/walk.py
Post
¶
Bases: WalkBase
This class represents the post order tree traversal algorithm that walks through an AST and applies the rule from bottom to top.
Acknowledgement
This code was inspired by SymbolicUtils.jl, Liang.jl
Source code in oqd-compiler-infrastructure/src/oqd_compiler_infrastructure/walk.py
Level
¶
Bases: WalkBase
This class represents the level/breadth first order tree traversal algorithm that walks through an AST.
Source code in oqd-compiler-infrastructure/src/oqd_compiler_infrastructure/walk.py
In
¶
Bases: WalkBase
This class represents the in order tree traversal algorithm that walks through an AST.