P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::LocationPath Struct Reference

#include <alias.h>

Inheritance diagram for P4::LocationPath:
[legend]

Public Member Functions

 LocationPath (const IR::IDeclaration *root)
 
const LocationPathappend (cstring suffix) const
 
void dbprint (std::ostream &out) const override
 
bool isPrefix (const LocationPath *other) const
 True if this path is a prefix of other or the other way around.
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Public Attributes

std::vector< cstringpath
 
const IR::IDeclarationroot
 

Detailed Description

This class represents the path to a location. Given a struct S { bit a; bit b; } and a variable S x; a path can be x.a, or just x. An array index is represented as a number (encoded as a string) or as "*", denoting an unknown index.

Member Function Documentation

◆ dbprint()

void P4::LocationPath::dbprint ( std::ostream & out) const
inlineoverridevirtual

Implements P4::IHasDbPrint.