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. More...
 
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. More...
 
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 ANTLR3_CALLOC, and antlr3SetCTAPI().

Referenced by 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(), and ANTLR3_COMMON_TREE_struct::token.

Referenced by newDownNode(), and newUpNode().

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

◆ antlr3SetCTAPI()

◆ createChildrenList()

static 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, and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ dupNode()

static pANTLR3_BASE_TREE dupNode ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_COMMON_TREE_struct::factory, ANTLR3_ARBORETUM_struct::newFromTree, and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ factoryClose()

◆ getCharPositionInLine()

◆ getChildIndex()

static ANTLR3_INT32 getChildIndex ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ getLine()

◆ getParent()

static pANTLR3_BASE_TREE getParent ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ getText()

static pANTLR3_STRING getText ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_BASE_TREE_struct::toString.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ getToken()

static pANTLR3_COMMON_TOKEN getToken ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ getType()

static ANTLR3_UINT32 getType ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_COMMON_TOKEN_struct::getType, ANTLR3_BASE_TREE_struct::super, and ANTLR3_COMMON_TREE_struct::token.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ isNilNode()

static ANTLR3_BOOLEAN isNilNode ( pANTLR3_BASE_TREE  tree)
static

References ANTLR3_FALSE, ANTLR3_TRUE, and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ newFromToken()

static pANTLR3_BASE_TREE newFromToken ( pANTLR3_ARBORETUM  factory,
pANTLR3_COMMON_TOKEN  token 
)
static

References ANTLR3_ARBORETUM_struct::newTree, and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3ArboretumNew().

Here is the caller graph for this function:

◆ newFromTree()

◆ newPool()

◆ newPoolTree()

◆ reuse()

static 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, and ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ setChildIndex()

static void setChildIndex ( pANTLR3_BASE_TREE  tree,
ANTLR3_INT32  i 
)
static

References ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ setParent()

static void setParent ( pANTLR3_BASE_TREE  tree,
pANTLR3_BASE_TREE  parent 
)
static

References ANTLR3_BASE_TREE_struct::super.

Referenced by antlr3SetCTAPI().

Here is the caller graph for this function:

◆ toString()

static pANTLR3_STRING toString ( pANTLR3_BASE_TREE  tree)
static