antlr3basetree.c man page

src/antlr3basetree.c —

Synopsis

#include <antlr3basetree.h>

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]

References ANTLR3_VECTOR_struct::add, ANTLR3_CDECL, ANTLR3_FPRINTF, ANTLR3_TRUE, ANTLR3_BASE_TREE_struct::children, ANTLR3_BASE_TREE_struct::createChildrenList, ANTLR3_BASE_TREE_struct::free, freshenPACIndexesAll(), ANTLR3_VECTOR_struct::get, ANTLR3_BASE_TREE_struct::isNilNode, ANTLR3_BASE_TREE_struct::setChildIndex, ANTLR3_BASE_TREE_struct::setParent, and ANTLR3_VECTOR_struct::size.

Referenced by antlr3BaseTreeNew().

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().

ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew (pANTLR3_BASE_TREE tree)

References addChild(), ANTLR3_BASE_TREE_struct::addChild, addChildren(), ANTLR3_BASE_TREE_struct::addChildren, ANTLR3_BASE_TREE_struct::children, deleteChild(), ANTLR3_BASE_TREE_struct::deleteChild, dupTree(), ANTLR3_BASE_TREE_struct::dupTree, freshenPACIndexes(), ANTLR3_BASE_TREE_struct::freshenPACIndexes, freshenPACIndexesAll(), ANTLR3_BASE_TREE_struct::freshenPACIndexesAll, getCharPositionInLine(), ANTLR3_BASE_TREE_struct::getCharPositionInLine, getChild(), ANTLR3_BASE_TREE_struct::getChild, getChildCount(), ANTLR3_BASE_TREE_struct::getChildCount, getFirstChildWithType(), ANTLR3_BASE_TREE_struct::getFirstChildWithType, getLine(), ANTLR3_BASE_TREE_struct::getLine, replaceChildren(), ANTLR3_BASE_TREE_struct::replaceChildren, setChild(), ANTLR3_BASE_TREE_struct::setChild, ANTLR3_BASE_TREE_struct::strFactory, toStringTree(), and ANTLR3_BASE_TREE_struct::toStringTree.

Referenced by antlr3SetCTAPI().

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

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

Referenced by antlr3BaseTreeNew().

static void * dupTree (pANTLR3_BASE_TREE tree) [static]

References ANTLR3_BASE_TREE_struct::addChild, ANTLR3_BASE_TREE_struct::children, ANTLR3_BASE_TREE_struct::dupNode, ANTLR3_BASE_TREE_struct::dupTree, ANTLR3_VECTOR_struct::get, and ANTLR3_VECTOR_struct::size.

Referenced by antlr3BaseTreeNew().

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().

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().

static ANTLR3_UINT32 getCharPositionInLine (pANTLR3_BASE_TREE tree) [static]

Referenced by antlr3BaseTreeNew(), and antlr3RecognitionExceptionNew().

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

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

Referenced by antlr3BaseTreeNew().

static ANTLR3_UINT32 getChildCount (pANTLR3_BASE_TREE tree) [static]

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

Referenced by antlr3BaseTreeNew().

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

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

Referenced by antlr3BaseTreeNew().

static ANTLR3_UINT32 getLine (pANTLR3_BASE_TREE tree) [static]

Referenced by antlr3BaseTreeNew(), and antlr3RecognitionExceptionNew().

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 antlr3BaseTreeNew().

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

References ANTLR3_FALSE, ANTLR3_BASE_TREE_struct::children, ANTLR3_BASE_TREE_struct::createChildrenList, and ANTLR3_VECTOR_struct::set.

Referenced by antlr3BaseTreeNew().

static pANTLR3_STRING toStringTree (pANTLR3_BASE_TREE tree) [static]

References ANTLR3_FALSE, ANTLR3_STRING_struct::append8, ANTLR3_BASE_TREE_struct::children, ANTLR3_VECTOR_struct::get, ANTLR3_BASE_TREE_struct::isNilNode, ANTLR3_STRING_FACTORY_struct::newRaw, ANTLR3_VECTOR_struct::size, ANTLR3_BASE_TREE_struct::strFactory, ANTLR3_BASE_TREE_struct::toString, and ANTLR3_BASE_TREE_struct::toStringTree.

Referenced by antlr3BaseTreeNew().

Author

Generated automatically by Doxygen for ANTLR3C from the source code.

Referenced By

antlr3-addChild(3), antlr3-addChildren(3), antlr3-deleteChild(3), antlr3-dupTree(3), antlr3-freshenPACIndexes(3), antlr3-freshenPACIndexesAll(3), antlr3-getCharPositionInLine(3), antlr3-getChild(3), antlr3-getChildCount(3), antlr3-getFirstChildWithType(3), antlr3-getLine(3), antlr3-replaceChildren(3), antlr3-setChild(3) and antlr3-toStringTree(3) are aliases of antlr3basetree.c(3).

Tue Oct 4 2016 Version 3.3.1 ANTLR3C