P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::ParserStructure Class Reference

Information about a parser in the input program. More...

#include <parserUnroll.h>

Public Member Functions

void addState (const IR::ParserState *state)
 
bool analyze (ReferenceMap *refMap, TypeMap *typeMap, bool unroll, bool &wasError)
 
void calls (const IR::ParserState *caller, const IR::ParserState *callee)
 
const IR::ParserState * get (cstring state) const
 
bool reachableHSUsage (IR::ID id, const ParserStateInfo *state) const
 check reachability for usage of header stack
 
void setParser (const IR::P4Parser *parser)
 

Public Attributes

StateCallGraphcallGraph
 
std::map< cstring, size_t > callsIndexes
 
const IR::P4Parser * parser
 
const ParserInforesult
 
const IR::ParserState * start
 
std::map< cstring, std::set< cstring > > statesWithHeaderStacks
 

Protected Member Functions

void addStateHSUsage (const IR::ParserState *state, const IR::Expression *expression)
 add HS name which is used in a current state.
 
void evaluateReachability ()
 evaluates rechable states with HS operations for each path.
 

Friends

class AnalyzeParser
 
class ParserStateRewriter
 
class ParserSymbolicInterpreter
 

Detailed Description

Information about a parser in the input program.