|
decompiler
1.0.0
|
Subtable, pattern, and context information applied across a with block. More...
#include <slgh_compile.hh>
Public Member Functions | |
| WithBlock (void) | |
| Constructor. | |
| void | set (SubtableSymbol *s, PatternEquation *pq, vector< ContextChange *> *cvec) |
| Set components of the header. More... | |
| ~WithBlock (void) | |
| Destructor. | |
Static Public Member Functions | |
| static PatternEquation * | collectAndPrependPattern (const list< WithBlock > &stack, PatternEquation *pateq) |
| Build a complete pattern equation from any surrounding with blocks. More... | |
| static vector< ContextChange * > * | collectAndPrependContext (const list< WithBlock > &stack, vector< ContextChange *> *contvec) |
| Build a complete array of context changes from any surrounding with blocks. More... | |
| static SubtableSymbol * | getCurrentSubtable (const list< WithBlock > &stack) |
| Get the active subtable from the stack of currently active with blocks. More... | |
Private Attributes | |
| SubtableSymbol * | ss |
| Subtable containing each Constructor (or null for root table) | |
| PatternEquation * | pateq |
| Pattern to prepend to each Constructor (or null) | |
| vector< ContextChange * > | contvec |
| Context change to associate with each constructor (or null) | |
Subtable, pattern, and context information applied across a with block.
The header of a with block is applied to all constructors in the block. It attaches each constructor to a specific subtable. A pattern expression and/or a a series of context changes is attached to each constructor as well.
|
static |
Build a complete array of context changes from any surrounding with blocks.
Given a list of ContextChanges parsed locally from a Constructor and the stack of surrounding with blocks, make a new list of ContextChanges, prepending everything from the stack to the local vector. Return the new list and delete the old.
| stack | is the current with block stack |
| contvec | is the local list of ContextChanges (or null) |
Referenced by ghidra::SleighCompile::buildConstructor().
|
static |
Build a complete pattern equation from any surrounding with blocks.
Given the pattern equation parsed locally from a Constructor and the stack of surrounding with blocks, create the final pattern equation for the Constructor. Each with block pattern is preprended to the local pattern.
| stack | is the stack of with blocks currently active at the Constructor |
| pateq | is the pattern equation parsed from the local Constructor statement |
Referenced by ghidra::SleighCompile::buildConstructor().
|
static |
Get the active subtable from the stack of currently active with blocks.
Find the subtable associated with the innermost with block and return it.
| stack | is the stack of currently active with blocks |
Referenced by ghidra::SleighCompile::createConstructor().
| void ghidra::WithBlock::set | ( | SubtableSymbol * | s, |
| PatternEquation * | pq, | ||
| vector< ContextChange *> * | cvec | ||
| ) |
Set components of the header.
Establish each component of the with block header
| s | is the subtable (or null) |
| pq | is the pattern to prepend (or null) |
| cvec | is the set of context changes (or null) |
1.8.13