P4C
The P4 Compiler
|
Public Member Functions | |
int | getCurrentIndex (cstring header) |
unsigned | getCurrentIteration (cstring origName) const |
void | pop () |
void | push (IR::BFN::ParserState *state) |
Encounter this state, push to stack. | |
bool | visited (const IR::BFN::ParserState *state) const |
Public Attributes | |
std::vector< IR::BFN::ParserState * > | stack |
Keeps track of visited states which are all ancestors to the current state.
|
inline |
Given the state with the original name, check on the visited stack that how many times this state has been unrolled.
|
inline |
Done visiting this state and all of its descendants, pop it off the stack.
std::vector<IR::BFN::ParserState *> BFN::AncestorStates::stack |
We maintain the visited states in a stack as we visit in a DFS order.