ANTLR3C 3.3.1
antlr3commontree.c File Reference
#include <antlr3commontree.h>
Include dependency graph for antlr3commontree.c:

Functions

ANTLR3_API pANTLR3_ARBORETUM antlr3ArboretumNew (pANTLR3_STRING_FACTORY strFactory)
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew ()
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken (pANTLR3_COMMON_TOKEN token)
ANTLR3_API void antlr3SetCTAPI (pANTLR3_COMMON_TREE tree)
static void createChildrenList (pANTLR3_BASE_TREE tree)
 Create a new vector for holding child nodes using the inbuilt vector factory.
static pANTLR3_BASE_TREE dupNode (pANTLR3_BASE_TREE tree)
static void factoryClose (pANTLR3_ARBORETUM factory)
static ANTLR3_UINT32 getCharPositionInLine (pANTLR3_BASE_TREE tree)
static ANTLR3_INT32 getChildIndex (pANTLR3_BASE_TREE tree)
static ANTLR3_UINT32 getLine (pANTLR3_BASE_TREE tree)
static pANTLR3_BASE_TREE getParent (pANTLR3_BASE_TREE tree)
static pANTLR3_STRING getText (pANTLR3_BASE_TREE tree)
static pANTLR3_COMMON_TOKEN getToken (pANTLR3_BASE_TREE tree)
static ANTLR3_UINT32 getType (pANTLR3_BASE_TREE tree)
static ANTLR3_BOOLEAN isNilNode (pANTLR3_BASE_TREE tree)
static pANTLR3_BASE_TREE newFromToken (pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TOKEN token)
static pANTLR3_BASE_TREE newFromTree (pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TREE tree)
static ANTLR3_BOOLEAN newPool (pANTLR3_ARBORETUM factory)
static pANTLR3_BASE_TREE newPoolTree (pANTLR3_ARBORETUM factory)
static void reuse (pANTLR3_BASE_TREE tree)
 Clean up any child vector that the tree might have, so it can be reused, then add it into the reuse stack.
static void setChildIndex (pANTLR3_BASE_TREE tree, ANTLR3_INT32 i)
static void setParent (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE parent)
static pANTLR3_STRING toString (pANTLR3_BASE_TREE tree)

Function Documentation

◆ antlr3ArboretumNew()

◆ antlr3CommonTreeNew()

ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew ( void )

References antlr3CommonTreeNew(), and antlr3SetCTAPI().

Referenced by antlr3CommonTreeNew(), and antlr3CommonTreeNewFromToken().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ antlr3CommonTreeNewFromToken()

ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken ( pANTLR3_COMMON_TOKEN token)

References antlr3CommonTreeNew(), antlr3CommonTreeNewFromToken(), and ANTLR3_COMMON_TREE_struct::token.

Referenced by antlr3CommonTreeNewFromToken(), antlr3CommonTreeNewFromTree(), newDownNode(), and newUpNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ antlr3SetCTAPI()

◆ createChildrenList()

void createChildrenList ( pANTLR3_BASE_TREE tree)
static

Create a new vector for holding child nodes using the inbuilt vector factory.

References ANTLR3_BASE_TREE_struct::children, createChildrenList(), and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI(), and createChildrenList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dupNode()

pANTLR3_BASE_TREE dupNode ( pANTLR3_BASE_TREE tree)
static

References dupNode(), ANTLR3_COMMON_TREE_struct::factory, ANTLR3_ARBORETUM_struct::newFromTree, and ANTLR3_BASE_TREE_struct::super.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3SetCTAPI(), dupNode(), and dupNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factoryClose()

◆ getCharPositionInLine()

◆ getChildIndex()

ANTLR3_INT32 getChildIndex ( pANTLR3_BASE_TREE tree)
static

References getChildIndex(), and ANTLR3_BASE_TREE_struct::super.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3SetCTAPI(), getChildIndex(), getChildIndex(), and getToken().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLine()

◆ getParent()

pANTLR3_BASE_TREE getParent ( pANTLR3_BASE_TREE tree)
static

References getParent(), and ANTLR3_BASE_TREE_struct::super.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3SetCTAPI(), getParent(), getParent(), and getToken().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getText()

pANTLR3_STRING getText ( pANTLR3_BASE_TREE tree)
static

References getText(), and ANTLR3_BASE_TREE_struct::toString.

Here is the call graph for this function:

◆ getToken()

pANTLR3_COMMON_TOKEN getToken ( pANTLR3_BASE_TREE tree)
static

References getToken(), and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI(), getToken(), and getToken().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getType()

ANTLR3_UINT32 getType ( pANTLR3_BASE_TREE tree)
static

◆ isNilNode()

ANTLR3_BOOLEAN isNilNode ( pANTLR3_BASE_TREE tree)
static

References ANTLR3_FALSE, ANTLR3_TRUE, isNilNode(), and ANTLR3_BASE_TREE_struct::super.

Here is the call graph for this function:

◆ newFromToken()

pANTLR3_BASE_TREE newFromToken ( pANTLR3_ARBORETUM factory,
pANTLR3_COMMON_TOKEN token )
static

References newFromToken(), ANTLR3_ARBORETUM_struct::newTree, and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3ArboretumNew(), and newFromToken().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newFromTree()

pANTLR3_BASE_TREE newFromTree ( pANTLR3_ARBORETUM factory,
pANTLR3_COMMON_TREE tree )
static

References ANTLR3_COMMON_TREE_struct::baseTree, newFromTree(), ANTLR3_ARBORETUM_struct::newTree, ANTLR3_BASE_TREE_struct::super, ANTLR3_COMMON_TREE_struct::token, and ANTLR3_BASE_TREE_struct::u.

Referenced by antlr3ArboretumNew(), and newFromTree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newPool()

◆ newPoolTree()

◆ reuse()

void reuse ( pANTLR3_BASE_TREE tree)
static

Clean up any child vector that the tree might have, so it can be reused, then add it into the reuse stack.

References ANTLR3_COMMON_TREE_struct::baseTree, ANTLR3_BASE_TREE_struct::children, ANTLR3_VECTOR_struct::clear, ANTLR3_COMMON_TREE_struct::factory, ANTLR3_ARBORETUM_struct::nilStack, ANTLR3_STACK_struct::push, reuse(), and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI(), and reuse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setChildIndex()

void setChildIndex ( pANTLR3_BASE_TREE tree,
ANTLR3_INT32 i )
static

References setChildIndex(), and ANTLR3_BASE_TREE_struct::super.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3SetCTAPI(), getToken(), setChildIndex(), and setChildIndex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParent()

void setParent ( pANTLR3_BASE_TREE tree,
pANTLR3_BASE_TREE parent )
static

References setParent(), and ANTLR3_BASE_TREE_struct::super.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3SetCTAPI(), getToken(), setParent(), and setParent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()