C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

vcgASTWalker Class Reference

Inheritance diagram for vcgASTWalker:

vcgWalker Walker List of all members.

Public Types

enum  Order { Preorder, Postorder, Both }
 The order in which AST Nodes should be visited. More...

enum  Depth { Subtree, NodeOnly }
 Which Nodes in the AST tree should be visited. More...


Public Member Functions

 vcgASTWalker (ostream &ostr, const string &comment, string excludefilename)
virtual ~vcgASTWalker (void)

Protected Types

typedef list< string > strings

Protected Member Functions

bool excluded (procNode *proc)
bool excluded (Coord coord)
void start_graph ()
void print_comment (const string &comment="")
void print_graph_attribute (const string &attribute, const string &value)
void print_node_attribute (const string &attribute, const string &value)
void print_node_attribute (const string &attribute, int value)
void print_node_value (const string &attribute, const string &value)

Protected Attributes

ostream & graph
strings exclude
bool currently_excluded

Private Types

typedef pair< Node *, string > Edge
typedef list< Edge > Edges
typedef Edges::iterator Edges_p
typedef map< Node *, Edges > Edge_map

Private Member Functions

virtual void finalize_graph ()
void print_node (Node *n)
string node_title (Node *n)
string node_label (Node *n)
void print_edge (Node *from, Node *to, string name)
void delayed_print_edge (void)
string node_name (Node *n)
template<class S, class T> void print_edges (S parent, list< T > &children, string name)
void at_unit (unitNode *the_unit, Order ord)
void at_decl (declNode *the_decl, Order ord)
void at_proc (procNode *the_proc, Order ord)
void at_prim (primNode *the_prim, Order ord)
void at_tdef (tdefNode *the_tdef, Order ord)
void at_ptr (ptrNode *the_ptr, Order ord)
void at_array (arrayNode *the_array, Order ord)
void at_func (funcNode *the_func, Order ord)
void at_sue (sueNode *the_sue, Order ord)
void at_suespec (suespecNode *the_suespec, Order ord)
void at_const (constNode *the_const, Order ord)
void at_id (idNode *the_id, Order ord)
void at_binary (binaryNode *the_binary, Order ord)
void at_unary (unaryNode *the_unary, Order ord)
void at_cast (castNode *the_cast, Order ord)
void at_comma (commaNode *the_comma, Order ord)
void at_ternary (ternaryNode *the_ternary, Order ord)
void at_call (callNode *the_call, Order ord)
void at_initializer (initializerNode *the_initializer, Order ord)
void at_block (blockNode *the_block, Order ord)
void at_exprstmt (exprstmtNode *the_exprstmt, Order ord)
void at_label (labelNode *the_label, Order ord)
void at_case (caseNode *the_case, Order ord)
void at_if (ifNode *the_if, Order ord)
void at_switch (switchNode *the_switch, Order ord)
void at_while (whileNode *the_while, Order ord)
void at_do (doNode *the_do, Order ord)
void at_for (forNode *the_for, Order ord)
void at_goto (gotoNode *the_goto, Order ord)
void at_continue (continueNode *the_continue, Order ord)
void at_break (breakNode *the_break, Order ord)
void at_return (returnNode *the_return, Order ord)
void at_attrib (attribNode *the_attrib, Order ord)
void at_text (textNode *the_text, Order ord)
void at_threeAddr (threeAddrNode *t, Order ord)
void at_conditiongoto (conditiongotoNode *c, Order ord)
void at_operand (operandNode *o, Order ord)

Private Attributes

node_list nodes
Edge_map edges

Member Typedef Documentation

typedef pair<Node*, string> vcgASTWalker::Edge [private]
 

Definition at line 45 of file vcgast.cc.

Referenced by print_edge().

typedef map<Node*,Edges> vcgASTWalker::Edge_map [private]
 

Definition at line 48 of file vcgast.cc.

typedef list<Edge> vcgASTWalker::Edges [private]
 

Definition at line 46 of file vcgast.cc.

typedef Edges::iterator vcgASTWalker::Edges_p [private]
 

Definition at line 47 of file vcgast.cc.

typedef list<string> vcgWalker::strings [protected, inherited]
 

Definition at line 54 of file vcg.h.


Member Enumeration Documentation

enum Walker::Depth [inherited]
 

Which Nodes in the AST tree should be visited.

Enumeration values:
Subtree  The entire AST should be traversed.
NodeOnly  Only the root Node should be visited.

Definition at line 155 of file walker.h.

enum Walker::Order [inherited]
 

The order in which AST Nodes should be visited.

Enumeration values:
Preorder  Nodes should be visited before their children.
Postorder  Nodes should be visited after their children.
Both  Nodes should be visited both before and after their children.

Definition at line 147 of file walker.h.

Referenced by whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), textNode::walk(), ternaryNode::walk(), tdefNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), primNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), gotoNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), continueNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), breakNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), and arrayNode::walk().


Constructor & Destructor Documentation

vcgASTWalker::vcgASTWalker (  ostream &    ostr,
const string &    comment,
string    excludefilename
)  [inline]
 

Definition at line 55 of file vcgast.cc.

References vcgWalker::print_comment(), vcgWalker::print_graph_attribute(), and vcgWalker::start_graph().

virtual vcgASTWalker::~vcgASTWalker (  void    )  [inline, virtual]
 

Definition at line 72 of file vcgast.cc.

References finalize_graph().


Member Function Documentation

void vcgASTWalker::at_array (  arrayNode *    the_array,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 399 of file vcgast.cc.

References vcgWalker::currently_excluded, arrayNode::dim(), Walker::Postorder, print_edge(), print_node(), and typeNode::type().

void vcgASTWalker::at_attrib (  attribNode *    the_attrib,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 631 of file vcgast.cc.

References attribNode::arg(), vcgWalker::currently_excluded, Walker::Postorder, print_edge(), and print_node().

virtual void Walker::at_basicblock (  basicblockNode *    the_basicblock,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in print_walker, fixPointerWalker, DefUseWalker, LivenessWalker, LivenessComments, reachingGenKillWalker, and reachingDefinitionsWalker.

Definition at line 314 of file walker.h.

References Walker::at_block().

Referenced by basicblockNode::walk().

void vcgASTWalker::at_binary (  binaryNode *    the_binary,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 438 of file vcgast.cc.

References Operator::ARROW, vcgWalker::currently_excluded, Operator::id(), binaryNode::left(), binaryNode::op(), Walker::Postorder, print_edge(), print_node(), binaryNode::right(), exprNode::type(), and Node::walk().

void vcgASTWalker::at_block (  blockNode *    the_block,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 529 of file vcgast.cc.

References vcgWalker::currently_excluded, blockNode::decls(), Walker::Postorder, print_edges(), print_node(), and blockNode::stmts().

void vcgASTWalker::at_break (  breakNode *    the_break,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 619 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_call (  callNode *    the_call,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 498 of file vcgast.cc.

References callNode::args(), vcgWalker::currently_excluded, callNode::name(), Walker::Postorder, print_edge(), print_edges(), print_node(), and exprNode::type().

void vcgASTWalker::at_case (  caseNode *    the_case,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 548 of file vcgast.cc.

References vcgWalker::currently_excluded, caseNode::expr(), Walker::Postorder, print_edge(), print_node(), and targetNode::stmt().

void vcgASTWalker::at_cast (  castNode *    the_cast,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 466 of file vcgast.cc.

References vcgWalker::currently_excluded, castNode::expr(), Walker::Postorder, print_edge(), print_node(), and exprNode::type().

void vcgASTWalker::at_comma (  commaNode *    the_comma,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 473 of file vcgast.cc.

References vcgWalker::currently_excluded, commaNode::exprs(), Walker::Postorder, print_edge(), print_edges(), print_node(), and exprNode::type().

void vcgASTWalker::at_conditiongoto (  conditiongotoNode *    c,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 651 of file vcgast.cc.

References vcgWalker::currently_excluded, conditiongotoNode::left(), Walker::Postorder, print_edge(), print_node(), and conditiongotoNode::right().

void vcgASTWalker::at_const (  constNode *    the_const,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 426 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, print_edge(), print_node(), and exprNode::type().

void vcgASTWalker::at_continue (  continueNode *    the_continue,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 614 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_decl (  declNode *    the_decl,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 355 of file vcgast.cc.

References declNode::bitsize(), vcgWalker::currently_excluded, vcgWalker::excluded(), declNode::init(), Walker::Postorder, print_edge(), print_node(), Node::typ(), and declNode::type().

virtual void Walker::at_def (  defNode *    the_def,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 230 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_decl(), and Walker::at_proc().

void vcgASTWalker::at_do (  doNode *    the_do,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 591 of file vcgast.cc.

References loopNode::body(), loopNode::cond(), vcgWalker::currently_excluded, Walker::Postorder, print_edge(), and print_node().

virtual void Walker::at_enum (  enumNode *    the_enum,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in enum_value_walker.

Definition at line 269 of file walker.h.

References Walker::at_sue().

Referenced by enumNode::walk().

virtual void Walker::at_expr (  exprNode *    the_expr,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in NodeLocator, and remove_stale_type_walker.

Definition at line 275 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_binary(), Walker::at_call(), Walker::at_cast(), Walker::at_comma(), Walker::at_index(), Walker::at_initializer(), Walker::at_operand(), Walker::at_ternary(), Walker::at_unary(), and metaexprNode::walk().

void vcgASTWalker::at_exprstmt (  exprstmtNode *    the_exprstmt,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 536 of file vcgast.cc.

References vcgWalker::currently_excluded, exprstmtNode::expr(), Walker::Postorder, print_edge(), and print_node().

void vcgASTWalker::at_for (  forNode *    the_for,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 598 of file vcgast.cc.

References loopNode::body(), loopNode::cond(), vcgWalker::currently_excluded, forNode::init(), forNode::next(), Walker::Postorder, print_edge(), and print_node().

void vcgASTWalker::at_func (  funcNode *    the_func,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 406 of file vcgast.cc.

References funcNode::args(), vcgWalker::currently_excluded, Walker::Postorder, print_edge(), print_edges(), print_node(), and funcNode::returns().

void vcgASTWalker::at_goto (  gotoNode *    the_goto,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 608 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_id (  idNode *    the_id,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 432 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, print_edge(), print_node(), and exprNode::type().

void vcgASTWalker::at_if (  ifNode *    the_if,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 561 of file vcgast.cc.

References vcgWalker::currently_excluded, selectionNode::expr(), ifNode::false_br(), Walker::Postorder, print_edge(), print_node(), and ifNode::true_br().

virtual void Walker::at_index (  indexNode *    the_index,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 278 of file walker.h.

References Walker::at_expr().

Referenced by Walker::at_const(), and Walker::at_id().

void vcgASTWalker::at_initializer (  initializerNode *    the_initializer,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 515 of file vcgast.cc.

References vcgWalker::currently_excluded, initializerNode::exprs(), Walker::Postorder, print_edge(), print_edges(), print_node(), and exprNode::type().

virtual void Walker::at_jump (  jumpNode *    the_jump,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 350 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_break(), Walker::at_continue(), Walker::at_goto(), and Walker::at_return().

void vcgASTWalker::at_label (  labelNode *    the_label,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 542 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, print_edge(), print_node(), and targetNode::stmt().

virtual void Walker::at_loop (  loopNode *    the_loop,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in semcheck_walker, set_container_walker, TreeChecker, and init_flowproblem_walker.

Definition at line 338 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_do(), Walker::at_for(), and Walker::at_while().

virtual void Walker::at_node (  Node *    the_node,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in gcWalker, goto_label_walker, set_container_walker, sue_complete_walker, TreeChecker, and df_number_walker.

Definition at line 223 of file walker.h.

Referenced by Walker::at_def(), Walker::at_expr(), Walker::at_stmt(), Walker::at_text(), Walker::at_type(), and Walker::at_unit().

void vcgASTWalker::at_operand (  operandNode *    o,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 658 of file vcgast.cc.

References operandNode::cast(), vcgWalker::currently_excluded, operandNode::fields(), operandNode::index(), Walker::Postorder, print_edge(), print_edges(), print_node(), and operandNode::var().

void vcgASTWalker::at_prim (  primNode *    the_prim,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 381 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_proc (  procNode *    the_proc,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from vcgWalker.

Definition at line 371 of file vcgast.cc.

References procNode::body(), vcgWalker::currently_excluded, procNode::decl(), vcgWalker::excluded(), Walker::Postorder, print_edge(), and print_node().

void vcgASTWalker::at_ptr (  ptrNode *    the_ptr,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 392 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, print_edge(), print_node(), and typeNode::type().

void vcgASTWalker::at_return (  returnNode *    the_return,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 624 of file vcgast.cc.

References vcgWalker::currently_excluded, returnNode::expr(), Walker::Postorder, print_edge(), and print_node().

virtual void Walker::at_selection (  selectionNode *    the_selection,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in semcheck_walker.

Definition at line 329 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_if(), and Walker::at_switch().

virtual void Walker::at_stmt (  stmtNode *    the_stmt,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in NodeLocator, W, init_flowproblem_walker, and LivenessWalker.

Definition at line 308 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_attrib(), Walker::at_block(), Walker::at_exprstmt(), Walker::at_jump(), Walker::at_loop(), Walker::at_selection(), Walker::at_target(), Walker::at_threeAddr(), and metastmtNode::walk().

virtual void Walker::at_struct (  structNode *    the_struct,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 263 of file walker.h.

References Walker::at_sue().

Referenced by structNode::walk().

virtual void Walker::at_subdecl (  subdeclNode *    the_subdecl,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 236 of file walker.h.

References Walker::at_decl().

Referenced by subdeclNode::walk().

void vcgASTWalker::at_sue (  sueNode *    the_sue,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 414 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_suespec (  suespecNode *    the_suespec,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 419 of file vcgast.cc.

References vcgWalker::currently_excluded, suespecNode::fields(), Walker::Postorder, print_edges(), and print_node().

void vcgASTWalker::at_switch (  switchNode *    the_switch,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 577 of file vcgast.cc.

References vcgWalker::currently_excluded, selectionNode::expr(), Walker::Postorder, print_edge(), print_node(), and selectionNode::stmt().

virtual void Walker::at_target (  targetNode *    the_target,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in init_flowproblem_walker.

Definition at line 320 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_case(), and Walker::at_label().

void vcgASTWalker::at_tdef (  tdefNode *    the_tdef,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 386 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_ternary (  ternaryNode *    the_ternary,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 480 of file vcgast.cc.

References ternaryNode::cond(), vcgWalker::currently_excluded, ternaryNode::false_br(), Walker::Postorder, print_edge(), print_node(), ternaryNode::true_br(), and exprNode::type().

void vcgASTWalker::at_text (  textNode *    the_text,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 637 of file vcgast.cc.

References vcgWalker::currently_excluded, Walker::Postorder, and print_node().

void vcgASTWalker::at_threeAddr (  threeAddrNode *    t,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 642 of file vcgast.cc.

References threeAddrNode::arg_list(), vcgWalker::currently_excluded, threeAddrNode::lhs(), Walker::Postorder, print_edge(), print_edges(), print_node(), threeAddrNode::rhs1(), and threeAddrNode::rhs2().

virtual void Walker::at_type (  typeNode *    the_type,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in W, and TreeChecker.

Definition at line 242 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_array(), Walker::at_func(), Walker::at_prim(), Walker::at_ptr(), Walker::at_sue(), Walker::at_suespec(), and Walker::at_tdef().

void vcgASTWalker::at_unary (  unaryNode *    the_unary,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 456 of file vcgast.cc.

References vcgWalker::currently_excluded, unaryNode::expr(), Walker::Postorder, print_edge(), print_node(), unaryNode::sizeof_type(), and exprNode::type().

virtual void Walker::at_union (  unionNode *    the_union,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 266 of file walker.h.

References Walker::at_sue().

Referenced by unionNode::walk().

void vcgASTWalker::at_unit (  unitNode *    the_unit,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 345 of file vcgast.cc.

References unitNode::defs(), Walker::Postorder, print_edges(), print_node(), unitNode::suespecs(), and unitNode::undef_funcs().

void vcgASTWalker::at_while (  whileNode *    the_while,
Order    ord
)  [inline, private, virtual]
 

Reimplemented from Walker.

Definition at line 584 of file vcgast.cc.

References loopNode::body(), loopNode::cond(), vcgWalker::currently_excluded, Walker::Postorder, print_edge(), and print_node().

void vcgASTWalker::delayed_print_edge (  void    )  [inline, private]
 

Definition at line 177 of file vcgast.cc.

References vcgWalker::graph, and node_title().

Referenced by finalize_graph().

Depth Walker::depth (    )  const [inline, inherited]
 

Return which Nodes of an AST should be visited.

A value of SubTree specifies that the entire AST should be traversed. A value of NodeOnly specifies that only the root Node in the AST should be visited.

Definition at line 211 of file walker.h.

Referenced by whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), ternaryNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), arrayNode::walk(), and Walker::Walker().

bool vcgWalker::excluded (  Coord    coord )  [protected, inherited]
 

Definition at line 89 of file vcg.cc.

References vcgWalker::exclude, Coord::filename(), Coord::line(), and Coord::Unknown.

bool vcgWalker::excluded (  procNode *    proc )  [protected, inherited]
 

Definition at line 82 of file vcg.cc.

References procNode::decl(), vcgWalker::exclude, and declNode::name().

Referenced by at_decl(), vcgCCGWalker::at_proc(), at_proc(), vcgWalker::at_proc(), print_edge(), vcgCCGWalker::print_node(), and print_node().

virtual void vcgASTWalker::finalize_graph (    )  [inline, private, virtual]
 

Reimplemented from vcgWalker.

Definition at line 76 of file vcgast.cc.

References delayed_print_edge().

Referenced by ~vcgASTWalker().

string vcgASTWalker::node_label (  Node *    n )  [inline, private]
 

Definition at line 156 of file vcgast.cc.

References Node::coord(), Coord::line(), node_name(), and Coord::offset().

Referenced by print_node().

string vcgASTWalker::node_name (  Node *    n )  [inline, private]
 

Definition at line 197 of file vcgast.cc.

References Array, Attrib, Binary, Block, Break, Call, Case, Cast, Comma, Condition, Const, Continue, Decl, Do, Enum, Expr, For, Func, Goto, Id, If, Initializer, constant::is_str(), Label, Meta, Operand, Prim, Proc, Ptr, Return, STRING, Struct, sueSpec, Switch, Tdef, Ternary, Text, ThreeAddr, constant::to_string(), Node::typ(), Unary, Undeclared, Union, Unit, and While.

Referenced by node_label(), and node_title().

string vcgASTWalker::node_title (  Node *    n )  [inline, private]
 

Definition at line 147 of file vcgast.cc.

References Node::coord(), node_name(), and Coord::offset().

Referenced by delayed_print_edge(), and print_node().

Order Walker::order (    )  const [inline, inherited]
 

Return the order in which Nodes of an AST should be visited.

Nodes can be visited before their children (Preorder), after their children (Postorder), or both (Both).

Definition at line 203 of file walker.h.

Referenced by df_number_walker::at_node(), whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), textNode::walk(), ternaryNode::walk(), tdefNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), primNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), gotoNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), continueNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), breakNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), and arrayNode::walk().

void vcgWalker::print_comment (  const string &    comment = "" )  [protected, inherited]
 

Definition at line 115 of file vcg.cc.

References vcgWalker::graph.

Referenced by vcgASTWalker(), and vcgCCGWalker::vcgCCGWalker().

void vcgASTWalker::print_edge (  Node *    from,
Node *    to,
string    name
)  [inline, private]
 

Definition at line 164 of file vcgast.cc.

References Node::coord(), Edge, vcgWalker::excluded(), Node::typ(), and Unit.

Referenced by at_array(), at_attrib(), at_binary(), at_call(), at_case(), at_cast(), at_comma(), at_conditiongoto(), at_const(), at_decl(), at_do(), at_exprstmt(), at_for(), at_func(), at_id(), at_if(), at_initializer(), at_label(), at_operand(), at_proc(), at_ptr(), at_return(), at_switch(), at_ternary(), at_threeAddr(), at_unary(), at_while(), and print_edges().

template<class S, class T>
void vcgASTWalker::print_edges (  S    parent,
list< T > &    children,
string    name
)  [inline, private]
 

Definition at line 339 of file vcgast.cc.

References print_edge().

Referenced by at_block(), at_call(), at_comma(), at_func(), at_initializer(), at_operand(), at_suespec(), at_threeAddr(), and at_unit().

void vcgWalker::print_graph_attribute (  const string &    attribute,
const string &    value
)  [protected, inherited]
 

Definition at line 118 of file vcg.cc.

References vcgWalker::graph.

Referenced by vcgASTWalker(), and vcgCCGWalker::vcgCCGWalker().

void vcgASTWalker::print_node (  Node *    n )  [inline, private]
 

Definition at line 83 of file vcgast.cc.

References Array, Attrib, Binary, Block, Break, Call, Case, Cast, Comma, Condition, Const, Continue, Node::coord(), Decl, Do, Enum, vcgWalker::excluded(), Expr, For, Func, Goto, vcgWalker::graph, Id, If, Initializer, Label, Meta, node_label(), node_title(), Operand, Prim, vcgWalker::print_node_attribute(), vcgWalker::print_node_value(), Proc, Ptr, Return, Struct, sueSpec, Switch, Tdef, Ternary, Text, ThreeAddr, Node::typ(), Unary, Undeclared, Union, Unit, and While.

Referenced by at_array(), at_attrib(), at_binary(), at_block(), at_break(), at_call(), at_case(), at_cast(), at_comma(), at_conditiongoto(), at_const(), at_continue(), at_decl(), at_do(), at_exprstmt(), at_for(), at_func(), at_goto(), at_id(), at_if(), at_initializer(), at_label(), at_operand(), at_prim(), at_proc(), at_ptr(), at_return(), at_sue(), at_suespec(), at_switch(), at_tdef(), at_ternary(), at_text(), at_threeAddr(), at_unary(), at_unit(), and at_while().

void vcgWalker::print_node_attribute (  const string &    attribute,
int    value
)  [protected, inherited]
 

Definition at line 128 of file vcg.cc.

References vcgWalker::graph.

void vcgWalker::print_node_attribute (  const string &    attribute,
const string &    value
)  [protected, inherited]
 

Definition at line 124 of file vcg.cc.

References vcgWalker::graph.

Referenced by vcgCCGWalker::print_node(), and print_node().

void vcgWalker::print_node_value (  const string &    attribute,
const string &    value
)  [protected, inherited]
 

Definition at line 132 of file vcg.cc.

References vcgWalker::graph.

Referenced by vcgCCGWalker::print_node(), and print_node().

void vcgWalker::start_graph (    )  [inline, protected, inherited]
 

Definition at line 89 of file vcg.h.

Referenced by vcgASTWalker(), and vcgCCGWalker::vcgCCGWalker().


Member Data Documentation

bool vcgWalker::currently_excluded [protected, inherited]
 

Definition at line 62 of file vcg.h.

Referenced by at_array(), at_attrib(), at_binary(), at_block(), at_break(), vcgCCGWalker::at_call(), at_call(), at_case(), at_cast(), at_comma(), at_conditiongoto(), at_const(), at_continue(), at_decl(), at_do(), at_exprstmt(), at_for(), at_func(), at_goto(), at_id(), at_if(), at_initializer(), at_label(), at_operand(), at_prim(), vcgCCGWalker::at_proc(), at_proc(), vcgWalker::at_proc(), at_ptr(), at_return(), at_sue(), at_suespec(), at_switch(), at_tdef(), at_ternary(), at_text(), vcgCCGWalker::at_threeAddr(), at_threeAddr(), at_unary(), and at_while().

Edge_map vcgASTWalker::edges [private]
 

Definition at line 51 of file vcgast.cc.

strings vcgWalker::exclude [protected, inherited]
 

Definition at line 58 of file vcg.h.

Referenced by vcgWalker::excluded(), and vcgWalker::vcgWalker().

ostream& vcgWalker::graph [protected, inherited]
 

Definition at line 56 of file vcg.h.

Referenced by delayed_print_edge(), vcgWalker::print_comment(), vcgCCGWalker::print_edge(), vcgWalker::print_graph_attribute(), vcgCCGWalker::print_node(), print_node(), vcgWalker::print_node_attribute(), and vcgWalker::print_node_value().

node_list vcgASTWalker::nodes [private]
 

Definition at line 50 of file vcgast.cc.


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

Generated on August 27, 2003
Back to the C-Breeze home page