src/antlr3commontree.c(3)
π src/antlr3commontree.c β the ANTLR3C manual page bestie π
okay so. welcome to the glow-up of the ANTLR3C manpage for src/antlr3commontree.c, like the whole common-tree situation in the C runtime. it's giving "trees but make it C" and honestly? iconic. let's get into it. π
β¨ NAME β¨
src/antlr3commontree.c
π¦ SYNOPSIS π¦
the vibe starts here, bestie:
#include <antlr3commontree.h>
πΈ Functions πΈ
here's the whole cast of characters, no cap, every single one:
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)β literally makes a brand-new vector for holding child nodes, using the inbuilt vector factory. slay.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)β cleans up any child vector the tree might be carrying around so it can be reused, then drops it into the reuse stack. so tidy of it. π§Ή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 π
π«Ά ANTLR3_API pANTLR3_ARBORETUM antlr3ArboretumNew (pANTLR3_STRING_FACTORY strFactory)
References: antlr3SetCTAPI(), antlr3StackNew(), antlr3VectorFactoryNew(), ANTLR3_COMMON_TREE_struct::baseTree, ANTLR3_ARBORETUM_struct::close, ANTLR3_COMMON_TREE_struct::factory, factoryClose(), ANTLR3_ARBORETUM_struct::newFromToken, newFromToken(), ANTLR3_ARBORETUM_struct::newFromTree, newFromTree(), newPool(), newPoolTree(), ANTLR3_ARBORETUM_struct::newTree, ANTLR3_ARBORETUM_struct::nilStack, ANTLR3_ARBORETUM_struct::pools, ANTLR3_BASE_TREE_struct::strFactory, ANTLR3_ARBORETUM_struct::thisPool, ANTLR3_ARBORETUM_struct::unTruc, and ANTLR3_ARBORETUM_struct::vFactory.
Referenced by: ANTLR3_TREE_ADAPTORNew().
π
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew (void )
References: antlr3SetCTAPI().
Referenced by: antlr3CommonTreeNewFromToken().
β¨ ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken (pANTLR3_COMMON_TOKEN token)
References: antlr3CommonTreeNew(), and ANTLR3_COMMON_TREE_struct::token.
Referenced by: newDownNode(), and newUpNode().
π ANTLR3_API void antlr3SetCTAPI (pANTLR3_COMMON_TREE tree)
References: antlr3BaseTreeNew(), ANTLR3_COMMON_TREE_struct::baseTree, ANTLR3_COMMON_TREE_struct::childIndex, ANTLR3_BASE_TREE_struct::children, ANTLR3_BASE_TREE_struct::createChildrenList, createChildrenList(), ANTLR3_BASE_TREE_struct::dupNode, dupNode(), ANTLR3_BASE_TREE_struct::free, ANTLR3_BASE_TREE_struct::getCharPositionInLine, getCharPositionInLine(), ANTLR3_BASE_TREE_struct::getChildIndex, getChildIndex(), ANTLR3_BASE_TREE_struct::getLine, getLine(), ANTLR3_BASE_TREE_struct::getParent, getParent(), ANTLR3_BASE_TREE_struct::getText, getText(), ANTLR3_BASE_TREE_struct::getToken, getToken(), ANTLR3_BASE_TREE_struct::getType, getType(), ANTLR3_BASE_TREE_struct::isNilNode, isNilNode(), ANTLR3_COMMON_TREE_struct::parent, ANTLR3_BASE_TREE_struct::reuse, reuse(), ANTLR3_BASE_TREE_struct::setChildIndex, setChildIndex(), ANTLR3_BASE_TREE_struct::setParent, setParent(), ANTLR3_COMMON_TREE_struct::startIndex, ANTLR3_COMMON_TREE_struct::stopIndex, ANTLR3_BASE_TREE_struct::super, ANTLR3_COMMON_TREE_struct::token, ANTLR3_BASE_TREE_struct::toString, toString(), and ANTLR3_BASE_TREE_struct::u.
Referenced by: antlr3ArboretumNew(), antlr3CommonTreeNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and newPoolTree().
π 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().
π¦ 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: ANTLR3_TREE_ADAPTORNew(), and antlr3SetCTAPI().
π void factoryClose (pANTLR3_ARBORETUM factory) [static]
References: ANTLR3_VECTOR_FACTORY_struct::close, ANTLR3_STACK_struct::free, ANTLR3_ARBORETUM_struct::nilStack, ANTLR3_ARBORETUM_struct::pools, ANTLR3_ARBORETUM_struct::thisPool, and ANTLR3_ARBORETUM_struct::vFactory.
π ANTLR3_UINT32 getCharPositionInLine (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_BASE_TREE_struct::getCharPositionInLine, ANTLR3_COMMON_TOKEN_struct::getCharPositionInLine, ANTLR3_BASE_TREE_struct::getChild, ANTLR3_BASE_TREE_struct::getChildCount, and ANTLR3_BASE_TREE_struct::super.
πΈ ANTLR3_INT32 getChildIndex (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_BASE_TREE_struct::super.
Referenced by: ANTLR3_TREE_ADAPTORNew(), and antlr3SetCTAPI().
β ANTLR3_UINT32 getLine (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_BASE_TREE_struct::getChild, ANTLR3_BASE_TREE_struct::getChildCount, ANTLR3_BASE_TREE_struct::getLine, ANTLR3_COMMON_TOKEN_struct::getLine, ANTLR3_BASE_TREE_struct::super, and ANTLR3_COMMON_TREE_struct::token.
π§ pANTLR3_BASE_TREE getParent (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_BASE_TREE_struct::super.
Referenced by: ANTLR3_TREE_ADAPTORNew(), and antlr3SetCTAPI().
π pANTLR3_STRING getText (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_BASE_TREE_struct::toString.
π₯ pANTLR3_COMMON_TOKEN getToken (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_BASE_TREE_struct::super.
Referenced by: antlr3SetCTAPI().
π 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.
π«Ά ANTLR3_BOOLEAN isNilNode (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_FALSE, ANTLR3_TRUE, and ANTLR3_BASE_TREE_struct::super.
β¨ 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().
πΈ pANTLR3_BASE_TREE newFromTree (pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TREE tree) [static]
References: ANTLR3_COMMON_TREE_struct::baseTree, ANTLR3_ARBORETUM_struct::newTree, ANTLR3_BASE_TREE_struct::super, ANTLR3_COMMON_TREE_struct::token, and ANTLR3_BASE_TREE_struct::u.
Referenced by: antlr3ArboretumNew().
π ANTLR3_BOOLEAN newPool (pANTLR3_ARBORETUM factory) [static]
References: ANTLR3_FACTORY_POOL_SIZE, ANTLR3_FALSE, ANTLR3_TRUE, ANTLR3_ARBORETUM_struct::nextTree, ANTLR3_ARBORETUM_struct::pools, and ANTLR3_ARBORETUM_struct::thisPool.
Referenced by: antlr3ArboretumNew(), and newPoolTree().
π
pANTLR3_BASE_TREE newPoolTree (pANTLR3_ARBORETUM factory) [static]
References: ANTLR3_FACTORY_POOL_SIZE, antlr3SetCTAPI(), ANTLR3_COMMON_TREE_struct::baseTree, ANTLR3_COMMON_TREE_struct::factory, newPool(), ANTLR3_ARBORETUM_struct::nextTree, ANTLR3_ARBORETUM_struct::nilStack, ANTLR3_STACK_struct::peek, ANTLR3_ARBORETUM_struct::pools, ANTLR3_STACK_struct::pop, ANTLR3_BASE_TREE_struct::strFactory, ANTLR3_BASE_TREE_struct::super, ANTLR3_ARBORETUM_struct::thisPool, and ANTLR3_ARBORETUM_struct::unTruc.
Referenced by: antlr3ArboretumNew().
π§Ή 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().
π void setChildIndex (pANTLR3_BASE_TREE tree, ANTLR3_INT32 i) [static]
References: ANTLR3_BASE_TREE_struct::super.
Referenced by: ANTLR3_TREE_ADAPTORNew(), and antlr3SetCTAPI().
π¦ void setParent (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE parent) [static]
References: ANTLR3_BASE_TREE_struct::super.
Referenced by: ANTLR3_TREE_ADAPTORNew(), and antlr3SetCTAPI().
β pANTLR3_STRING toString (pANTLR3_BASE_TREE tree) [static]
References: ANTLR3_TRUE, ANTLR3_BASE_TREE_struct::isNilNode, ANTLR3_STRING_FACTORY_struct::newPtr, nilNode(), ANTLR3_BASE_TREE_struct::strFactory, and ANTLR3_BASE_TREE_struct::super.
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code.
and that's the whole page, bestie π every function, everyReferences, everyReferenced by, nothing skipped, periodt. β¨
this was Version 3.3.1, dated Tue Jul 29 2025 00:00:00, and it's the manpage for src/antlr3commontree.c(3) in the ANTLR3C manual β k bye, go read a tree ππ«Άπ
π¦ where this page comes from
- fedora 43: antlr3-C-devel 1:3.4-3.5.3.14.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms