Nearly CC
An educational compiler skeleton
Public Member Functions | List of all members
ParseTreePrint Class Reference

Print a parse tree. More...

#include "grammar_symbols.h"

Inheritance diagram for ParseTreePrint:
Inheritance graph
[legend]
Collaboration diagram for ParseTreePrint:
Collaboration graph
[legend]

Public Member Functions

virtual std::string node_tag_to_string (int tag) const
 Override to convert a parse node's tag to a string. More...
 
void print (Node *t) const
 

Detailed Description

Print a parse tree.

Member Function Documentation

◆ node_tag_to_string()

std::string ParseTreePrint::node_tag_to_string ( int  tag) const
virtual

Override to convert a parse node's tag to a string.

Parameters
tagparse node tag value
Returns
the string representation of the parse node tag (i.e., the GrammarSymbol)

Implements TreePrint.

Reimplemented in ASTTreePrint.


The documentation for this class was generated from the following files: