antlr3basetree.c File Reference

#include <antlr3basetree.h>

Include dependency graph for antlr3basetree.c:


Functions

static void addChild (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child)
static void addChildren (pANTLR3_BASE_TREE tree, pANTLR3_LIST kids)
 Add all elements of the supplied list as children of this node.
ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew (pANTLR3_BASE_TREE tree)
static void * deleteChild (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
static void * dupTree (pANTLR3_BASE_TREE tree)
static void freshenPACIndexes (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 offset)
 Set the parent and child indexes for some of the children of the supplied tree, starting with the child at the supplied index.
static void freshenPACIndexesAll (pANTLR3_BASE_TREE tree)
 Set the parent and child indexes for all children of the supplied tree.
static ANTLR3_UINT32 getCharPositionInLine (pANTLR3_BASE_TREE tree)
static void * getChild (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
static ANTLR3_UINT32 getChildCount (pANTLR3_BASE_TREE tree)
static pANTLR3_BASE_TREE getFirstChildWithType (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 type)
static ANTLR3_UINT32 getLine (pANTLR3_BASE_TREE tree)
static void replaceChildren (pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE newTree)
 Delete children from start to stop and replace with t even if t is a list (nil-root tree).
static void setChild (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i, void *child)
static pANTLR3_STRING toStringTree (pANTLR3_BASE_TREE tree)

Function Documentation

void addChild ( pANTLR3_BASE_TREE  tree,
pANTLR3_BASE_TREE  child 
) [static]

static void addChildren ( pANTLR3_BASE_TREE  tree,
pANTLR3_LIST  kids 
) [static]

Add all elements of the supplied list as children of this node.

References ANTLR3_BASE_TREE_struct::addChild, ANTLR3_LIST_struct::get, and ANTLR3_LIST_struct::size.

Referenced by antlr3BaseTreeNew().

Here is the caller graph for this function:

ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew ( pANTLR3_BASE_TREE  tree  ) 

static void * deleteChild ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  i 
) [static]

References ANTLR3_BASE_TREE_struct::children, and ANTLR3_VECTOR_struct::remove.

Referenced by ANTLR3_TREE_ADAPTORNew(), and antlr3BaseTreeNew().

Here is the caller graph for this function:

static void * dupTree ( pANTLR3_BASE_TREE  tree  )  [static]

static void freshenPACIndexes ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  offset 
) [static]

Set the parent and child indexes for some of the children of the supplied tree, starting with the child at the supplied index.

References ANTLR3_BASE_TREE_struct::getChild, ANTLR3_BASE_TREE_struct::getChildCount, ANTLR3_BASE_TREE_struct::setChildIndex, and ANTLR3_BASE_TREE_struct::setParent.

Referenced by antlr3BaseTreeNew().

Here is the caller graph for this function:

static void freshenPACIndexesAll ( pANTLR3_BASE_TREE  tree  )  [static]

Set the parent and child indexes for all children of the supplied tree.

References ANTLR3_BASE_TREE_struct::freshenPACIndexes.

Referenced by addChild(), and antlr3BaseTreeNew().

Here is the caller graph for this function:

static ANTLR3_UINT32 getCharPositionInLine ( pANTLR3_BASE_TREE  tree  )  [static]

Referenced by antlr3BaseTreeNew(), antlr3LexerNew(), antlr3RecognitionExceptionNew(), antlr3SetCTAPI(), and antlr3SetTokenAPI().

Here is the caller graph for this function:

static void * getChild ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  i 
) [static]

static ANTLR3_UINT32 getChildCount ( pANTLR3_BASE_TREE  tree  )  [static]

References ANTLR3_BASE_TREE_struct::children, and ANTLR3_VECTOR_struct::size.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3BaseTreeAdaptorInit(), and antlr3BaseTreeNew().

Here is the caller graph for this function:

static pANTLR3_BASE_TREE getFirstChildWithType ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  type 
) [static]

static ANTLR3_UINT32 getLine ( pANTLR3_BASE_TREE  tree  )  [static]

Referenced by antlr3BaseTreeNew(), antlr3LexerNew(), antlr3RecognitionExceptionNew(), antlr3SetCTAPI(), and antlr3SetTokenAPI().

Here is the caller graph for this function:

static void replaceChildren ( pANTLR3_BASE_TREE  parent,
ANTLR3_INT32  startChildIndex,
ANTLR3_INT32  stopChildIndex,
pANTLR3_BASE_TREE  newTree 
) [static]

Delete children from start to stop and replace with t even if t is a list (nil-root tree).

Num of children can increase or decrease. For huge child lists, inserting children can force walking rest of children to set their child index; could be slow.

References ANTLR3_VECTOR_struct::add, ANTLR3_FALSE, ANTLR3_FPRINTF, ANTLR3_FREE, ANTLR3_TRUE, antlr3VectorNew(), ANTLR3_STRING_struct::chars, ANTLR3_BASE_TREE_struct::children, ANTLR3_VECTOR_struct::elements, ANTLR3_BASE_TREE_struct::freshenPACIndexes, ANTLR3_VECTOR_struct::get, ANTLR3_BASE_TREE_struct::getText, ANTLR3_BASE_TREE_struct::isNilNode, ANTLR3_VECTOR_struct::remove, ANTLR3_VECTOR_struct::set, ANTLR3_BASE_TREE_struct::setChildIndex, ANTLR3_BASE_TREE_struct::setParent, and ANTLR3_VECTOR_struct::size.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3BaseTreeNew(), and antlr3TreeNodeStreamNew().

Here is the call graph for this function:

Here is the caller graph for this function:

static void setChild ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  i,
void *  child 
) [static]

static pANTLR3_STRING toStringTree ( pANTLR3_BASE_TREE  tree  )  [static]


Generated on Mon Nov 29 17:23:15 2010 for ANTLR3C by  doxygen 1.5.5