
Public Member Functions | |
| ParserStateRewriter (ParserStructure *parserStructure, ParserStateInfo *state, ValueMap *valueMap, ReferenceMap *refMap, TypeMap *typeMap, ExpressionEvaluator *afterExec, StatesVisitedMap &visitedStates) | |
| Default constructor. | |
| bool | checkError () |
| size_t | getIndex () |
| bool | isOutOfBound () |
| IR::Node * | postorder (IR::Member *expression) |
| Eliminates header stack acces next, last operations. | |
| IR::Node * | postorder (IR::PathExpression *expression) |
| Adds a new index for transition if it is required by algorithm. | |
| IR::Node * | preorder (IR::ArrayIndex *expression) |
| Updates indexes of a header stack. | |
Protected Member Functions | |
| bool | calledWithNoChanges (IR::ID id, const ParserStateInfo *state) |
| bool | checkIndexes (const StackVariableIndexMap &prev, const StackVariableIndexMap &cur) |
| Checks values of the headers stacks which were evaluated. | |
| IR::ID | genNewName (IR::ID id) |
| Generated new state name. | |
| const IR::Type * | getTypeArray (const IR::Node *element) |
| bool | was_called (cstring nm, IR::ID &id) |
|
inlineprotected |
Returns true for current id if indexes of the headers stack are the same before previous call of the same parser state.
|
inlineprotected |
Checks if this state was called previously with the same state of header stack indexes. If it was called then it returns true and generates a new name with the stored index.