src/antlr3debughandlers.c(3)
π¦ src/antlr3debughandlers.c π¦
okay so bestie, welcome to section 3 of the ANTLR3C manual β yes, the file is src/antlr3debughandlers.c and she is serving. No preamble needed, let's get into it π
β¨
π NAME π
src/antlr3debughandlers.c β Provides the debugging functions invoked by a recognizer built using the debug generator mode of the antlr tool.
That's the whole vibe. She provides, the recognizer invokes, the debug mode is on. Iconic. π«Ά
πΈ SYNOPSIS πΈ
#include <antlr3.h>
β¨ Functions β¨
static void ack (pANTLR3_DEBUG_EVENT_LISTENER delboy)β the lil acknowledgement girlie.static void addChild (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child)β takes arootand achild, does her thing.ANTLR3_API pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNew ()β Create and initialize a new debug event listener that can be connected to by ANTLRWorks and any other debugger via a socket.pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNewPort (ANTLR3_UINT32 port)β same energy, but you bring your ownport.static void becomeRoot (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)βnewRoot,oldRoot, glow-up arc.static void beginBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level)β opens the backtrack era atlevel.static void beginResync (pANTLR3_DEBUG_EVENT_LISTENER delboy)β resync arc, opening night.static void commence (pANTLR3_DEBUG_EVENT_LISTENER delboy)β we commence π«static void consumeHiddenToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)β snacks on a hidden tokent.static void consumeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)β snacks on a tree nodet.static void consumeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)β snacks on a plain old tokent.static void createNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)β makes a node out oft.static void createNodeTok (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token)β node + token, a collab.static void endBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful)β closes the backtrack era, and yes,successfulis anANTLR3_BOOLEAN.static void endResync (pANTLR3_DEBUG_EVENT_LISTENER delboy)β resync arc, closing night.static void enterAlt (pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt)β entering thealt.static void enterDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)β entering decisiondecisionNumber. main character energy fr.static void enterRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)β entering the rule, with the grammar file name and the rule name both asconst char *.static void enterSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)β sub-rule edition.static void errorNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)β the error node era πstatic void exitDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)β leaving decisiondecisionNumber.static void exitRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)β leaving the rule, same twoconst char *besties.static void exitSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)β sub-rule, but leaving.static ANTLR3_BOOLEAN handshake (pANTLR3_DEBUG_EVENT_LISTENER delboy)β she returns anANTLR3_BOOLEAN, she's decisive.static void location (pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos)βline,pos, coordinates of the moment.static void LT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t)β lookahead, token flavour.static void LTT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t)β lookahead, tree flavour.static void mark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)β leaves amarker, as one does.static void nilNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)β the nil node.static void recognitionException (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e)β catches thepANTLR3_EXCEPTION emoment.static void rewindLast (pANTLR3_DEBUG_EVENT_LISTENER delboy)β rewind to the last one, no cap.static void rewindMark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)β rewind to themarker.static void semanticPredicate (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char *predicate)βresult+predicate, the duo.pANTLR3_STRING serializeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node)β she returns apANTLR3_STRING, she's productive.void serializeText (pANTLR3_STRING buffer, pANTLR3_STRING text)β writestextintobuffer, lowkey.pANTLR3_STRING serializeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)β token, but serialized.static void setTokenBoundaries (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex)β sets thetokenStartIndexandtokenStopIndexboundaries. periodt.static int sockSend (SOCKET sock, const char *ptr, int len)β sendslenbytes fromptrdown thesock. Returns anint.static void terminate (pANTLR3_DEBUG_EVENT_LISTENER delboy)β she ends it πstatic void transmit (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *ptr)β pushesptrout there.
π₯ Detailed Description π₯
Provides the debugging functions invoked by a recognizer built using the debug generator mode of the antlr tool.
See antlr3debugeventlistener.h for documentation. π
π Function Documentation π
void ack (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::socket
Referenced by: handshake(), and transmit()
void addChild (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child) [static]
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, and transmit()
ANTLR3_API pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNew ()
Create and initialize a new debug event listener that can be connected to by ANTLRWorks and any other debugger via a socket. π
References:
addChild()ANTLR3_DEBUG_EVENT_LISTENER_struct::addChildANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRootbecomeRoot()ANTLR3_DEBUG_EVENT_LISTENER_struct::beginBacktrackbeginBacktrack()ANTLR3_DEBUG_EVENT_LISTENER_struct::beginResyncbeginResync()ANTLR3_DEBUG_EVENT_LISTENER_struct::commencecommence()ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeHiddenTokenconsumeHiddenToken()ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeNodeconsumeNode()ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeTokenconsumeToken()ANTLR3_DEBUG_EVENT_LISTENER_struct::createNodecreateNode()ANTLR3_DEBUG_EVENT_LISTENER_struct::createNodeTokcreateNodeTok()DEFAULT_DEBUGGER_PORTANTLR3_DEBUG_EVENT_LISTENER_struct::endBacktrackendBacktrack()ANTLR3_DEBUG_EVENT_LISTENER_struct::endResyncendResync()ANTLR3_DEBUG_EVENT_LISTENER_struct::enterAltenterAlt()ANTLR3_DEBUG_EVENT_LISTENER_struct::enterDecisionenterDecision()ANTLR3_DEBUG_EVENT_LISTENER_struct::enterRuleenterRule()ANTLR3_DEBUG_EVENT_LISTENER_struct::enterSubRuleenterSubRule()ANTLR3_DEBUG_EVENT_LISTENER_struct::errorNodeerrorNode()ANTLR3_DEBUG_EVENT_LISTENER_struct::exitDecisionexitDecision()ANTLR3_DEBUG_EVENT_LISTENER_struct::exitRuleexitRule()ANTLR3_DEBUG_EVENT_LISTENER_struct::exitSubRuleexitSubRule()ANTLR3_DEBUG_EVENT_LISTENER_struct::handshakehandshake()ANTLR3_DEBUG_EVENT_LISTENER_struct::locationlocation()ANTLR3_DEBUG_EVENT_LISTENER_struct::LTLT()ANTLR3_DEBUG_EVENT_LISTENER_struct::LTTLTT()ANTLR3_DEBUG_EVENT_LISTENER_struct::markmark()ANTLR3_DEBUG_EVENT_LISTENER_struct::nilNodenilNode()ANTLR3_DEBUG_EVENT_LISTENER_struct::portANTLR3_DEBUG_EVENT_LISTENER_struct::protocol_versionANTLR3_DEBUG_EVENT_LISTENER_struct::recognitionExceptionrecognitionException()ANTLR3_DEBUG_EVENT_LISTENER_struct::rewindANTLR3_DEBUG_EVENT_LISTENER_struct::rewindLastrewindLast()rewindMark()ANTLR3_DEBUG_EVENT_LISTENER_struct::semanticPredicatesemanticPredicate()ANTLR3_DEBUG_EVENT_LISTENER_struct::setTokenBoundariessetTokenBoundaries()ANTLR3_DEBUG_EVENT_LISTENER_struct::terminateterminate()
Referenced by: antlr3DebugListenerNewPort()
pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNewPort (ANTLR3_UINT32 port)
References: antlr3DebugListenerNew(), and ANTLR3_DEBUG_EVENT_LISTENER_struct::port
void becomeRoot (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot) [static]
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, and transmit()
void beginBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level) [static]
References: transmit()
void beginResync (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
References: transmit()
void commence (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
Referenced by: antlr3DebugListenerNew()
void consumeHiddenToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t) [static]
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, serializeToken(), and transmit()
Referenced by: antlr3DebugListenerNew()
void consumeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) [static]
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, serializeNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString, ANTLR3_STRING_struct::toUTF8, and transmit()
Referenced by: antlr3DebugListenerNew()
void consumeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t) [static]
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, serializeToken(), and transmit()
Referenced by: antlr3DebugListenerNew()
void createNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) [static]
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::addi, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::factory, ANTLR3_BASE_TREE_ADAPTOR_struct::getText, ANTLR3_BASE_TREE_ADAPTOR_struct::getType, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName, ANTLR3_STRING_FACTORY_struct::newSize, serializeText(), ANTLR3_STRING_struct::set8, ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString, ANTLR3_STRING_struct::toUTF8, and transmit()
Referenced by: antlr3DebugListenerNew()
void createNodeTok (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token) [static]
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_COMMON_TOKEN_struct::getTokenIndex, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, and transmit()
Referenced by: antlr3DebugListenerNew()
void endBacktrack (pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful) [static]
References: transmit()
void endResync (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
References: transmit()
void enterAlt (pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt) [static]
References: transmit()
Referenced by: antlr3DebugListenerNew()
void enterDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) [static]
References: transmit()
Referenced by: antlr3DebugListenerNew()
void enterRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const char * ruleName) [static]
References: transmit()
Referenced by: antlr3DebugListenerNew()
void enterSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) [static]
References: transmit()
Referenced by: antlr3DebugListenerNew()
πΈ errorNode
void errorNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) [static]
Bestie, when the parser hits a node that's justβ¦ not it, this is the one that shouts about it. Static, so it's housekeeping-only β not for you to call from the outside, no cap. π
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::addi, ANTLR3_TOKEN_INVALID, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::factory, ANTLR3_BASE_TREE_ADAPTOR_struct::getText, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName, ANTLR3_STRING_FACTORY_struct::newSize, serializeText(), ANTLR3_STRING_struct::set8, ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString, ANTLR3_STRING_struct::toUTF8, and transmit().
π exitDecision
void exitDecision (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) [static]
The lil goodbye wave when we leave a decision. π Takes the int decisionNumber so the debugger knows which decision we just dipped out of.
References: transmit().
Referenced by: antlr3DebugListenerNew().
β¨ exitRule
void exitRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * grammarFileName, const char * ruleName) [static]
Closing time for a rule π«Ά β hands over the grammarFileName and the ruleName on the way out so everyone's keeping score.
References: transmit().
Referenced by: antlr3DebugListenerNew().
π¦ exitSubRule
void exitSubRule (pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber) [static]
Same energy as exitDecision but for a subrule, and it carries the decisionNumber so we know exactly which one we're leaving. Not me being thorough or anything. π
References: transmit().
Referenced by: antlr3DebugListenerNew().
π handshake
ANTLR3_BOOLEAN handshake (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
Connection structure with which to wait and accept a connection from a debugger.
THIS IS THE MOMENT. β¨ The debugger and the runtime lock eyes across the room and go "hey bestie, you ready?" and the answer comes back as an ANTLR3_BOOLEAN. Iconic behavior, honestly.
References: ack(), ANTLR3_CLOSESOCKET, ANTLR3_FALSE, ANTLR3_TRUE, ANTLR3_STRING_struct::chars, ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName, ANTLR3_DEBUG_EVENT_LISTENER_struct::initialized, INVALID_SOCKET, ANTLR3_DEBUG_EVENT_LISTENER_struct::port, ANTLR3_DEBUG_EVENT_LISTENER_struct::protocol_version, ANTLR3_DEBUG_EVENT_LISTENER_struct::socket, and sockSend().
Referenced by: antlr3DebugListenerNew().
π location
void location (pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos) [static]
Drop a pin on where we at π β line and pos get sent along so the debugger can point at the exact spot like "her, right there."
References: transmit().
Referenced by: antlr3DebugListenerNew().
β LT
void LT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t) [static]
Lookahead but for tokens, and honestly the way it just inserts stuff into a string is giving main character energy. Takes the offset i and the token t. π₯
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, ANTLR3_STRING_struct::inserti, serializeToken(), and transmit().
Referenced by: antlr3DebugListenerNew().
π§ LTT
void LTT (pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t) [static]
Lookahead, but tree-flavored π³β¨ Same i offset energy, but now it's a whole pANTLR3_BASE_TREE instead of a lone token.
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::insert8, ANTLR3_STRING_struct::inserti, serializeNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString, ANTLR3_STRING_struct::toUTF8, and transmit().
Referenced by: antlr3DebugListenerNew().
π mark
void mark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker) [static]
Bookmarking the current moment in the input stream π so rewindMark can come back to it later. ANTLR3_MARKER in, good vibes out.
References: transmit().
π nilNode
void nilNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t) [static]
A node that's literally nothing. Not a mood, just a fact. π It still grabs a unique ID though, because even the void deserves an identity.
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, and transmit().
π recognitionException
void recognitionException (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e) [static]
Oh no bestie, something went WRONG π and this is how the debugger finds out. It ships over the exception's name, line, charPositionInLine, and index so the whole situation is fully documented, periodt.
References: ANTLR3_EXCEPTION_struct::charPositionInLine, ANTLR3_EXCEPTION_struct::index, ANTLR3_EXCEPTION_struct::line, ANTLR3_EXCEPTION_struct::name, and transmit().
Referenced by: antlr3DebugListenerNew().
π«Ά rewindLast
void rewindLast (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
Be kind, rewind π β just goes back to the most recent mark, no marker needed.
References: transmit().
π rewindMark
void rewindMark (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker) [static]
Same rewind energy, but you get to choose which ANTLR3_MARKER to hop back to. Choose wisely, bestie. β¨
References: transmit().
πΈ semanticPredicate
void semanticPredicate (pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char * predicate) [static]
A predicate got evaluated and it was either ANTLR3_TRUE or not, and the predicate string comes along for the ride so everyone knows which one we're talking about. π¦
References: ANTLR3_TRUE, and transmit().
Referenced by: antlr3DebugListenerNew().
π
serializeNode
pANTLR3_STRING serializeNode (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node)
Turning a whole tree node into a pANTLR3_STRING like it's nothing π₯ β grabs the token, its type, its text, its line and char position, its token start index, and its unique ID, then hands back a shiny string. Slay.
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::addi, ANTLR3_STRING_struct::factory, ANTLR3_COMMON_TOKEN_struct::getCharPositionInLine, ANTLR3_COMMON_TOKEN_struct::getLine, ANTLR3_BASE_TREE_ADAPTOR_struct::getText, ANTLR3_BASE_TREE_ADAPTOR_struct::getToken, ANTLR3_BASE_TREE_ADAPTOR_struct::getTokenStartIndex, ANTLR3_BASE_TREE_ADAPTOR_struct::getType, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName, ANTLR3_STRING_FACTORY_struct::newSize, serializeText(), ANTLR3_STRING_struct::set, ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString, and ANTLR3_STRING_struct::toUTF8.
Referenced by: consumeNode(), and LTT().
β¨ serializeText
void serializeText (pANTLR3_STRING buffer, pANTLR3_STRING text)
Not me escaping text character by character so the debugger protocol doesn't choke π It walks the whole text string and writes the safe version into buffer. Lowkey the unsung hero of this whole file.
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::append, ANTLR3_STRING_struct::charAt, and ANTLR3_STRING_struct::len.
Referenced by: createNode(), errorNode(), serializeNode(), and serializeToken().
π serializeToken
pANTLR3_STRING serializeToken (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
The token version of the glow-up β¨π Type, text, token index, channel, line, char position in line β all of it goes in, a fresh pANTLR3_STRING comes out.
References: ANTLR3_STRING_struct::addc, ANTLR3_STRING_struct::addi, ANTLR3_STRING_struct::factory, ANTLR3_COMMON_TOKEN_struct::getChannel, ANTLR3_COMMON_TOKEN_struct::getCharPositionInLine, ANTLR3_COMMON_TOKEN_struct::getLine, ANTLR3_COMMON_TOKEN_struct::getText, ANTLR3_COMMON_TOKEN_struct::getTokenIndex, ANTLR3_COMMON_TOKEN_struct::getType, ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName, ANTLR3_STRING_FACTORY_struct::newSize, serializeText(), ANTLR3_STRING_struct::set, ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString, and ANTLR3_STRING_struct::toUTF8.
Referenced by: consumeHiddenToken(), consumeToken(), and LT().
π setTokenBoundaries
void setTokenBoundaries (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex) [static]
Marking where a tree node starts and stops in the token stream, like drawing a little box around it π¦π tokenStartIndex and tokenStopIndex both, plus the node's unique ID so we know which node we boxed.
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, and transmit().
π sockSend
int sockSend (SOCKET sock, const char * ptr, int len) [static]
The actual pipe. π° Shoves len bytes from ptr down sock and tells you how it went. Everything else in this file is basically just vibes on top of this function, fr fr.
References: ANTLR3_FALSE, and ANTLR3_TRUE.
Referenced by: handshake(), terminate(), and transmit().
π¦ terminate
void terminate (pANTLR3_DEBUG_EVENT_LISTENER delboy) [static]
Hanging up the phone βοΈπ Says bye to the debugger and shuts that socket situation down.
References: ANTLR3_DEBUG_EVENT_LISTENER_struct::socket, and sockSend().
Referenced by: antlr3DebugListenerNew().
π transmit
void transmit (pANTLR3_DEBUG_EVENT_LISTENER delboy, const char * ptr) [static]
The messenger of the whole operation π«Ά Takes your ptr, gets an ack(), and sends it out over the socket. And bestie, the way literally everything calls this one? It's the main character, no question. π
References: ack(), ANTLR3_DEBUG_EVENT_LISTENER_struct::socket, and sockSend().
Referenced by: addChild(), becomeRoot(), beginBacktrack(), beginResync(), consumeHiddenToken(), consumeNode(), consumeToken(), createNode(), createNodeTok(), endBacktrack(), endResync(), enterAlt(), enterDecision(), enterRule(), enterSubRule(), errorNode(), exitDecision(), exitRule(), exitSubRule(), location(), LT(), LTT(), mark(), nilNode(), recognitionException(), rewindLast(), rewindMark(), semanticPredicate(), and setTokenBoundaries().
π AUTHOR π
Generated automatically by Doxygen for ANTLR3C from the source code.
No human wrote this one, bestie β it's pure machine-made β¨ Doxygen did that.
And that's the whole page, periodt. π
This was src/antlr3debughandlers.c(3), Version 3.3.1, dated Tue Jul 29 2025 β thanks for reading all the way to the end, you're literally the bestie of all time π«Άπβ¨
π¦ 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