dis_sql/src/sql_iff.cxx
//
// iff_ast_relation - Recursively output symbol relationships.
//
// Walks down syntax tree getting relation information found
// at tree nodes.  After finding the child symbol that relates
// to a parent symbol it outputs a relation entry.
//
// Relationships and their attributes need not be set
// in the child symbol tree node, but can be any non-symbol node between
// the parent symbol node and the child symbol node.  However, a
// relation is between two (and only two) symbols, so only
// non-symbol nodes can be in-between.  Also relations between a
// parent and child cannot be set in the parent's node, because
// that is the place for relations between the parent and its
// parent.
//
Recursively output symbol relationships.
Walks down syntax tree getting relation information found
at tree nodes.  After finding the child symbol that relates
to a parent symbol it outputs a relation entry.

Relationships and their attributes need not be set
in the child symbol tree node, but can be any non-symbol node between
the parent symbol node and the child symbol node.  However, a
relation is between two (and only two) symbols, so only
non-symbol nodes can be in-between.  Also relations between a
parent and child cannot be set in the parent's node, because
that is the place for relations between the parent and its
parent.
Recursively output symbol relationships . Walks down syntax tree getting relation information found at tree nodes . After finding the child symbol that relates to a parent symbol it outputs a relation entry . Relationships and their attributes need not be set in the child symbol tree node but can be any non - symbol node between the parent symbol node and the child symbol node . However a relation is between two ( and only two ) symbols so only non - symbol nodes can be in - between . Also relations between a parent and child cannot be set in the parent ' s node because that is the place for relations between the parent and its parent .
static int iff_ast_relation (ast_tree * at)
{
   ast_treelist * atl;
   iff_relation rel_save;
   if ( ! at ) {
      return (0);
   }
   if (iff_ast_relation_node (at) < 0) {
      return (-1);
   }
   rel_save = rel;
   for (atl = at->head; atl; atl = atl->next) {
      if (iff_ast_relation (atl->ast) < 0) {
	 return (-1);
      }
      rel = rel_save;
   }
   return (0);
}
static int iff_ast_relation ( ast_tree * at ) { ast_treelist * atl ; iff_relation rel_save ; if ( ! at ) { return ( 0 ) ; } if ( iff_ast_relation_node ( at ) < 0 ) { return ( -1 ) ; } rel_save = rel ; for ( atl = at -> head ; atl ; atl = atl -> next ) { if ( iff_ast_relation ( atl -> ast ) < 0 ) { return ( -1 ) ; } rel = rel_save ; } return ( 0 ) ; }
iff_ast_relation - Recursively output symbol relationships.
iff_ast_relation - Recursively output symbol relationships .
// Find and set any relationship information for this node. // If this is node has a symbol, output a relation entry // for relations between this node and its parent (target) // Save current relation state since it may be cleared // or changed while walking down a tree branch. // The relation state is restored before processing // a parallel branch. // Process each child tree // Finished subtree branch: // restore current state before processing next branch