P4C
The P4 Compiler
Loading...
Searching...
No Matches
DotDumper Class Reference

#include <dump_parser.h>

Inheritance diagram for DotDumper:
[legend]

Public Member Functions

 DotDumper (std::string filename, bool detail)
 
 DotDumper (std::string filename, std::vector< assoc::set< void * > > &color_groups, bool detail)
 

Protected Member Functions

void dump (const IR::BFN::LoweredParserGraph &graph, gress_t gress)
 
void dump (const IR::BFN::LoweredParserMatch *match)
 
void dump (const IR::BFN::LoweredParserState *state)
 
void dump (const IR::BFN::ParserGraph &graph, gress_t gress)
 
void dump (const IR::BFN::ParserState *state)
 
void dump (const IR::BFN::Transition *transition)
 
template<typename ParserGraphType >
void dump_graph (const ParserGraphType &graph, gress_t gress, int pipe_id)
 
std::string get_color (const IR::BFN::ParserState *state)
 
std::string lookup_color (void *obj)
 
std::ofstream * open_file (gress_t gress, int pipe_id, cstring directory="graphs"_cs)
 
std::string to_label (std::string label)
 
std::string to_label (std::string label, const void *what)
 
void write_to_file (std::ofstream *fs)
 

Static Protected Member Functions

static std::string escape (std::string s)
 

Protected Attributes

std::string cluster_name
 
std::vector< assoc::set< void * > > * color_groups = nullptr
 
std::vector< std::string > colors
 
bool detail = true
 
std::string filename
 
std::stringstream out
 

Detailed Description

Copyright (C) 2024 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

Member Data Documentation

◆ colors

std::vector<std::string> DotDumper::colors
protected
Initial value:
= {"brown", "coral", "crimson", "deeppink", "gold",
"red", "blue", "green", "cyan", "orchid"}