src/antlr3basetreeadaptor.c(3)
β¨ src/antlr3basetreeadaptor.c β¨ β the ANTLR3C manual page, part 1 π
okay bestie, settle in, grab a boba π§, because we're about to get into src/antlr3basetreeadaptor.c β this is the ANTLR3C page, and it's giving foundational. This file holds the base functions that every tree adaptor starts with. It's long so we're doing it in two parts, and this is part 1, so no signing off yet π
πΈ NAME πΈ
src/antlr3basetreeadaptor.c β contains the base functions that all tree adaptors start with. literally the starter pack for tree adaptors, no cap.
β¨ SYNOPSIS β¨
#include <antlr3basetreeadaptor.h>
π¦ Functions π¦
here's the whole squad of functions this file brings to the group chat:
static void addChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child)β Add a child to the treet.static void addChildToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child)β Use the adaptor implementation to add a child node with the supplied token.ANTLR3_API void antlr3BaseTreeAdaptorInit (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger)β Given a pointer to a base tree adaptor structure (which is usually embedded in the super class the implements the tree adaptor used in the parse), initialize its function pointers and so on.static pANTLR3_BASE_TREE becomeRoot (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRootTree, pANTLR3_BASE_TREE oldRootTree)β If oldRoot is a nil root, just copy or move the children to newRoot.static pANTLR3_BASE_TREE becomeRootToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, void *newRoot, pANTLR3_BASE_TREE oldRoot)β Use the adaptor interface to set a new tree node with the supplied token to the root of the tree.static pANTLR3_BASE_TREE createTypeText (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)static pANTLR3_BASE_TREE createTypeToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)β Use the super class suppliedcreate()method to create a new node from the supplied token.static pANTLR3_BASE_TREE createTypeTokenText (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)static void dbgAddChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child)static void dbgAddChildToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child)static pANTLR3_BASE_TREE dbgBecomeRoot (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)static pANTLR3_BASE_TREE dbgBecomeRootToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, void *newRoot, pANTLR3_BASE_TREE oldRoot)static pANTLR3_BASE_TREE dbgCreateTypeText (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)static pANTLR3_BASE_TREE dbgCreateTypeToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)static pANTLR3_BASE_TREE dbgCreateTypeTokenText (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)static pANTLR3_BASE_TREE dbgDupTree (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)static pANTLR3_BASE_TREE dbgNil (pANTLR3_BASE_TREE_ADAPTOR adaptor)static void defineDotEdges (pANTLR3_BASE_TREE_ADAPTOR adaptor, void *t, pANTLR3_STRING dotSpec)static void defineDotNodes (pANTLR3_BASE_TREE_ADAPTOR adaptor, void *t, pANTLR3_STRING dotSpec)static pANTLR3_BASE_TREE dupTree (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)β Return a duplicate of the entire tree (implementation provided by the BASE_TREE interface.)static pANTLR3_BASE_TREE dupTreeTT (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE parent)static pANTLR3_BASE_TREE getChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i)static ANTLR3_UINT32 getChildCount (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)static pANTLR3_STRING getText (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)β Dummy implementation - will be supplied by super class.static ANTLR3_UINT32 getType (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)β Dummy implementation - will be supplied by super class.static ANTLR3_UINT32 getUniqueID (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE node)β Returns a uniqueID for the node.static ANTLR3_BOOLEAN isNilNode (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)static pANTLR3_STRING makeDot (pANTLR3_BASE_TREE_ADAPTOR adaptor, void *theTree)β Produce a DOT specification for graphviz.static pANTLR3_BASE_TREE nilNode (pANTLR3_BASE_TREE_ADAPTOR adaptor)β Create and return a nil tree node (no token payload)static pANTLR3_BASE_TREE rulePostProcessing (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE root)β Transform^(nil x)tox.static void setText (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_STRING t)β Dummy implementation - will be supplied by super class.static void setText8 (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_UINT8 t)β Dummy implementation - will be supplied by super class.static void setType (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 type)β Dummy implementation - will be supplied by super class.static void simulateTreeConstruction (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE tree)β Sends the required debugging events for duplicating a tree to the debugger.
π Detailed Description π
Contains the base functions that all tree adaptors start with. π«Ά
this implementation can then be overridden by any higher implementation. (so it's the blueprint, and your fancy subclass gets to do the glow-up β¨)
π Function Documentation π
void addChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child) [static]
Add a child to the tree t. If child is a flat tree (a list), make all in list children of t. Warning: if t has no children, but child does and child isNilNode then it is ok to move children to t via t.children = child.children; i.e., without copying the array. This is for construction and I'm not sure it's completely general for a tree's addChild method to work this way. Make sure you differentiate between your tree's addChild and this parser tree construction addChild if it's not ok to move children to t with a simple assignment. π
References ANTLR3_BASE_TREE_struct::addChild.
void addChildToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child) [static]
Use the adaptor implementation to add a child node with the supplied token.
References ANTLR3_BASE_TREE_ADAPTOR_struct::addChild, and ANTLR3_BASE_TREE_ADAPTOR_struct::create.
Referenced by antlr3BaseTreeAdaptorInit().
ANTLR3_API void antlr3BaseTreeAdaptorInit (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Given a pointer to a base tree adaptor structure (which is usually embedded in the super class the implements the tree adaptor used in the parse), initialize its function pointers and so on. π
References ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, addChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::addChild, addChildToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::addChildToken, ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRoot, becomeRoot(), ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRootToken, becomeRootToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeText, createTypeText(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeToken, createTypeToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeTokenText, createTypeTokenText(), dbgAddChild(), dbgAddChildToken(), dbgBecomeRoot(), dbgBecomeRootToken(), dbgCreateTypeText(), dbgCreateTypeToken(), dbgCreateTypeTokenText(), dbgDupTree(), dbgNil(), ANTLR3_BASE_TREE_ADAPTOR_struct::dupTree, dupTree(), ANTLR3_BASE_TREE_ADAPTOR_struct::dupTreeTT, dupTreeTT(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, getChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, getChildCount(), ANTLR3_BASE_TREE_ADAPTOR_struct::getText, getText(), ANTLR3_BASE_TREE_ADAPTOR_struct::getType, getType(), ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, getUniqueID(), ANTLR3_BASE_TREE_ADAPTOR_struct::isNilNode, isNilNode(), ANTLR3_BASE_TREE_ADAPTOR_struct::makeDot, makeDot(), ANTLR3_BASE_TREE_ADAPTOR_struct::nilNode, nilNode(), ANTLR3_BASE_TREE_ADAPTOR_struct::rulePostProcessing, rulePostProcessing(), ANTLR3_BASE_TREE_ADAPTOR_struct::setText, setText(), ANTLR3_BASE_TREE_ADAPTOR_struct::setText8, setText8(), ANTLR3_BASE_TREE_ADAPTOR_struct::setType, and setType().
Referenced by ANTLR3_TREE_ADAPTORDebugNew(), ANTLR3_TREE_ADAPTORNew(), and setDebugEventListener().
pANTLR3_BASE_TREE becomeRoot (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRootTree, pANTLR3_BASE_TREE oldRootTree) [static]
If oldRoot is a nil root, just copy or move the children to newRoot. If not a nil root, make oldRoot a child of newRoot. π
old=^(nil a b c), new=r yields ^(r a b c)
old=^(a b c), new=r yields ^(r ^(a b c))
If newRoot is a nil-rooted single child tree, use the single child as the new root node.
old=^(nil a b c), new=^(nil r) yields ^(r a b c)
old=^(a b c), new=^(nil r) yields ^(r ^(a b c))
If oldRoot was null, it's ok, just return newRoot (even if isNilNode).
old=null, new=r yields r
old=null, new=^(nil r) yields ^(nil r)
Return newRoot. Throw an exception if newRoot is not a simple node or nil root with a single child node--it must be a root node. If newRoot is ^(nil x)</endcode> return x as newRoot.
Be advised that it's ok fornewRootto point atoldRoot's children; i.e., you don't have to copy the list. We are constructing these nodes so we should have this control for efficiency.
References ANTLR3_BASE_TREE_struct::addChild, ANTLR3_BASE_TREE_struct::getChild, ANTLR3_BASE_TREE_struct::getChildCount, ANTLR3_BASE_TREE_struct::isNilNode, and ANTLR3_BASE_TREE_struct::reuse.
Referenced by antlr3BaseTreeAdaptorInit(), antlr3DebugListenerNew(), and dbgBecomeRoot().
pANTLR3_BASE_TREE becomeRootToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, void * newRoot, pANTLR3_BASE_TREE oldRoot) [static]
Use the adaptor interface to set a new tree node with the supplied token to the root of the tree.
References ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRoot, and ANTLR3_BASE_TREE_ADAPTOR_struct::create.
Referenced by antlr3BaseTreeAdaptorInit().
pANTLR3_BASE_TREE createTypeText (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text) [static]
References ANTLR3_BASE_TREE_ADAPTOR_struct::create, and ANTLR3_BASE_TREE_ADAPTOR_struct::createToken.
Referenced by antlr3BaseTreeAdaptorInit(), and dbgCreateTypeText().
pANTLR3_BASE_TREE createTypeToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken) [static]
Use the super class supplied create() method to create a new node from the supplied token. π
References ANTLR3_BASE_TREE_ADAPTOR_struct::create, ANTLR3_BASE_TREE_ADAPTOR_struct::createTokenFromToken, and ANTLR3_COMMON_TOKEN_struct::setType.
that's part 1 bestie, and we are NOT done β part 2 is right behind this one, so don't go anywhere π
πΈ createTypeTokenText πΈ
pANTLR3_BASE_TREE createTypeTokenText (pANTLR3_BASE_TREE_ADAPTOR adaptor,
ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8
text)
miss girl is a [static] one, so she's staying in her lane π. She References ANTLR3_BASE_TREE_ADAPTOR_struct::create, ANTLR3_BASE_TREE_ADAPTOR_struct::createTokenFromToken, ANTLR3_COMMON_TOKEN_struct::setText8, and ANTLR3_COMMON_TOKEN_struct::setType.
She's Referenced by antlr3BaseTreeAdaptorInit(), and dbgCreateTypeTokenText().
π
dbgAddChild π
void dbgAddChild (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t,
pANTLR3_BASE_TREE child)
also [static], obviously β¨. References ANTLR3_BASE_TREE_struct::addChild, ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild, and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π¦ dbgAddChildToken π¦
void dbgAddChildToken (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE
t, pANTLR3_COMMON_TOKEN child)
[static] π
. References ANTLR3_BASE_TREE_ADAPTOR_struct::addChild, ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild, ANTLR3_BASE_TREE_ADAPTOR_struct::create, and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
β dbgBecomeRoot β
pANTLR3_BASE_TREE dbgBecomeRoot (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)
[static] bestie, keep up π. References ANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRoot, becomeRoot(), and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π dbgBecomeRootToken π
pANTLR3_BASE_TREE dbgBecomeRootToken (pANTLR3_BASE_TREE_ADAPTOR adaptor,
void * newRoot, pANTLR3_BASE_TREE oldRoot)
[static] π. References ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRoot, ANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRoot, ANTLR3_BASE_TREE_ADAPTOR_struct::create, and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π dbgCreateTypeText π
pANTLR3_BASE_TREE dbgCreateTypeText (pANTLR3_BASE_TREE_ADAPTOR adaptor,
ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
[static] β¨. References ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, createTypeText(), and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π dbgCreateTypeToken π
pANTLR3_BASE_TREE dbgCreateTypeToken (pANTLR3_BASE_TREE_ADAPTOR adaptor,
ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)
[static] π. References ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, createTypeToken(), and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π dbgCreateTypeTokenText π
pANTLR3_BASE_TREE dbgCreateTypeTokenText (pANTLR3_BASE_TREE_ADAPTOR adaptor,
ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8
text)
[static] π«Ά. References ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, createTypeTokenText(), and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π dbgDupTree π
pANTLR3_BASE_TREE dbgDupTree (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE t)
[static] π
. References ANTLR3_BASE_TREE_ADAPTOR_struct::dupTreeTT, and simulateTreeConstruction().
Referenced by antlr3BaseTreeAdaptorInit().
π§ dbgNil π§
pANTLR3_BASE_TREE dbgNil (pANTLR3_BASE_TREE_ADAPTOR adaptor)
[static] β. References ANTLR3_BASE_TREE_ADAPTOR_struct::create, ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, and ANTLR3_BASE_TREE_ADAPTOR_struct::debugger.
Referenced by antlr3BaseTreeAdaptorInit().
π defineDotEdges π
void defineDotEdges (pANTLR3_BASE_TREE_ADAPTOR adaptor, void * t,
pANTLR3_STRING dotSpec)
[static] β¨. References ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::append8, ANTLR3_STRING_struct::charAt, defineDotEdges(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, ANTLR3_BASE_TREE_ADAPTOR_struct::getText, and ANTLR3_STRING_struct::len.
Referenced by defineDotEdges(), and makeDot().
bestie look at her calling herself up there π recursive queen behaviour, no cap.
π¦ defineDotNodes π¦
void defineDotNodes (pANTLR3_BASE_TREE_ADAPTOR adaptor, void * t,
pANTLR3_STRING dotSpec)
[static] π. References ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::append8, ANTLR3_STRING_struct::charAt, defineDotNodes(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, ANTLR3_BASE_TREE_ADAPTOR_struct::getText, and ANTLR3_STRING_struct::len.
Referenced by defineDotNodes(), and makeDot().
πΈ dupTree πΈ
pANTLR3_BASE_TREE dupTree (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE t)
[static] π
. Return a duplicate of the entire tree (implementation provided by the BASE_TREE interface.) β so like, she clones the whole vibe, but the actual doing-it is somebody else's job π.
References ANTLR3_BASE_TREE_ADAPTOR_struct::dupTreeTT.
π dupTreeTT π
pANTLR3_BASE_TREE dupTreeTT (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE parent)
[static] β¨. References ANTLR3_BASE_TREE_ADAPTOR_struct::addChild, ANTLR3_BASE_TREE_struct::dupNode, ANTLR3_BASE_TREE_ADAPTOR_struct::dupTreeTT, ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, ANTLR3_BASE_TREE_struct::getChildIndex, ANTLR3_BASE_TREE_ADAPTOR_struct::setChildIndex, and ANTLR3_BASE_TREE_ADAPTOR_struct::setParent.
Referenced by antlr3BaseTreeAdaptorInit().
β the trio: getChild, getChildCount, getText β
pANTLR3_BASE_TREE getChild (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE t, ANTLR3_UINT32 i) [static]
ANTLR3_UINT32 getChildCount (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE t) [static]
pANTLR3_STRING getText (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE
t) [static]
Dummy implementation - will be supplied by super class. π yeah bestie she's just a placeholder, the super class is gonna show up later with the real tea.
Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3BaseTreeAdaptorInit(), antlr3LexerNew(), antlr3SetCTAPI(), and antlr3SetTokenAPI().
π getType π
ANTLR3_UINT32 getType (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE
t)
[static] π
. Dummy implementation - will be supplied by super class. again, not her moment yet π.
Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3BaseTreeAdaptorInit(), antlr3SetCTAPI(), and antlr3SetTokenAPI().
π getUniqueID π
ANTLR3_UINT32 getUniqueID (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE node)
[static] β¨. Returns a uniqueID for the node. Because this is the C implementation we can just use its address suitably converted/cast to an integer. okay that's genuinely iconic β the pointer IS the ID, main character energy fr fr π₯.
References ANTLR3_UINT32_CAST.
Referenced by antlr3BaseTreeAdaptorInit().
π§ isNilNode π§
ANTLR3_BOOLEAN isNilNode (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE t)
[static] π. References ANTLR3_BASE_TREE_struct::isNilNode.
Referenced by antlr3BaseTreeAdaptorInit(), and antlr3SetCTAPI().
π makeDot π
pANTLR3_STRING makeDot (pANTLR3_BASE_TREE_ADAPTOR adaptor, void * theTree)
[static] π. Produce a DOT specification for graphviz. yes bestie we're making cute little graph pictures πβ¨.
References ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::append8, ANTLR3_STRING_struct::charAt, defineDotEdges(), defineDotNodes(), ANTLR3_BASE_TREE_ADAPTOR_struct::getText, ANTLR3_STRING_struct::len, ANTLR3_STRING_FACTORY_struct::newStr8, and ANTLR3_BASE_TREE_ADAPTOR_struct::strFactory.
Referenced by antlr3BaseTreeAdaptorInit().
π nilNode π
pANTLR3_BASE_TREE nilNode (pANTLR3_BASE_TREE_ADAPTOR adaptor)
[static] β¨. Create and return a nil tree node (no token payload) β a lil empty node, vibes only, no baggage π«Ά.
References ANTLR3_BASE_TREE_ADAPTOR_struct::create.
Referenced by antlr3BaseTreeAdaptorInit(), antlr3DebugListenerNew(), fillBuffer(), and toString().
π rulePostProcessing π
pANTLR3_BASE_TREE rulePostProcessing (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE root)
[static] π
. Transform ^(nil x) to x. just... glow-up the tree, remove the extra layer, periodt β¨.
References ANTLR3_BASE_TREE_struct::getChild, ANTLR3_BASE_TREE_struct::getChildCount, ANTLR3_BASE_TREE_struct::isNilNode, ANTLR3_BASE_TREE_struct::reuse, ANTLR3_BASE_TREE_struct::setChildIndex, and ANTLR3_BASE_TREE_struct::setParent.
Referenced by antlr3BaseTreeAdaptorInit().
π¦ setText π¦
void setText (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_STRING t)
[static] β. Dummy implementation - will be supplied by super class. π placeholder again bestie.
Referenced by antlr3BaseTreeAdaptorInit(), and antlr3SetTokenAPI().
πΈ setText8 πΈ
void setText8 (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_UINT8 t)
[static] π. Dummy implementation - will be supplied by super class. π same story, different function.
Referenced by antlr3BaseTreeAdaptorInit(), and antlr3SetTokenAPI().
π setType π
void setType (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t,
ANTLR3_UINT32 type)
[static] π. Dummy implementation - will be supplied by super class. the super class really said "I'll handle it" and dipped π.
Referenced by antlr3BaseTreeAdaptorInit(), and antlr3SetTokenAPI().
π§ simulateTreeConstruction π§
void simulateTreeConstruction (pANTLR3_BASE_TREE_ADAPTOR adaptor,
pANTLR3_BASE_TREE tree)
[static] π. Sends the required debugging events for duplicating a tree to the debugger β she's basically the PR person for the debugger, keeps it in the loop on every clone π
.
References ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild, ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, ANTLR3_BASE_TREE_ADAPTOR_struct::debugger, ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, and simulateTreeConstruction().
Referenced by dbgDupTree(), and simulateTreeConstruction().
not her referencing herself again π recursive bestie stays booked and busy.
β¨ Author β¨
Generated automatically by Doxygen for ANTLR3C from the source code. yes bestie a robot wrote this and honestly? she ate π€π .
okay and that's a wrap on src/antlr3basetreeadaptor.c(3), Version 3.3.1, dated Tue Jul 29 2025 00:00 π«Άπ go forth and adapt those trees, bestie, you've got this β¨π³π
π¦ 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