ANTLR3_DEBUG_E...ISTENER_struct(3)
โจ ANTLR3_DEBUG_EVENT_LISTENER_struct โจ
okay bestie, welcome to the ANTLR3C manual, and specifically the page for ANTLR3_DEBUG_EVENT_LISTENER_struct (yes it's a mouthful, we're gonna get through it together ๐). This is part 1 of 3, so buckle up, hydrate, and let's go ๐ธ
๐ NAME ๐
ANTLR3_DEBUG_EVENT_LISTENER_struct โ the ANTLR3 debugging interface for communicating with ANLTR Works (yes, that's spelled "ANLTR" in the source, no cap, we keep it exactly as-is ๐ซถ).
๐ฆ SYNOPSIS ๐ฆ
#include <antlr3debugeventlistener.h>
๐ Data Fields ๐
so this struct is basically a whole group chat of function pointers plus a few data members, and every single one of them is listed right here, no skipping, periodt ๐
void(* ack )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ grab the acknowledge response back from the debugger.pANTLR3_BASE_TREE_ADAPTOR adaptorโ lets the debug event system peek at the adapter the recognizer is using, if this is a tree parser of some sort.void(* addChild )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child)โ makechildIDa child ofrootID.void(* becomeRoot )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)โ make a node the new root of an existing root.void(* beginBacktrack )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level)โ (no description given, it just vibes ๐)void(* beginResync )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ signals that the recognizer is about to eat tokens to resynchronize the parser.void(* commence )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ announce that parsing has begun.void(* consumeHiddenToken )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)โ an off-channel input token got consumed.void(* consumeNode )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)โ input for a tree parser is an AST, but we don't know anything for sure about a node except its type and text (pulled from the adaptor).void(* consumeToken )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)โ an input token got consumed; matched by any kind of element.void(* createNode )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)โ announce a new node built from token elements like type etc...void(* createNodeTok )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token)โ announce a new node built from an existing token.void(* endBacktrack )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful)โ (no description, again, mysterious queen energy ๐)void(* endResync )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ signals that the recognizer has finished consuming tokens in order to resynchronize.void(* enterAlt )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt)โ since rules can have a ton of alternatives, it's super useful to know which alt you're entering.void(* enterDecision )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)โ every decision, fixed k or arbitrary, gets an enter/exit event so a GUI can easily track what LT/consume events go with prediction.void(* enterRule )(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)โ the parser just entered a rule.void(* enterSubRule )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)โ track entry into any(...)subrule other EBNF construct.void(* errorNode )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)โ if a syntax error happens, recognizers bracket the error with an error node if they're building ASTs.void(* exitDecision )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)โ (no description given ๐)void(* exitRule )(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)โ this is literally the last thing executed before leaving a rule.void(* exitSubRule )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)โ (no description given โจ)void(* free )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ free up the resources allocated to this structure.pANTLR3_STRING grammarFileNameโ the name of the grammar file we're debugging.ANTLR3_BOOLEAN(* handshake )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ wait for a connection from the debugger and kick off the debugging session.ANTLR3_BOOLEAN initializedโ tells you whether we've already connected or not.void(* location )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos)โ to watch a parser move through the grammar, the parser has to tell the debugger what line/charPos it's passing in the grammar.void(* LT )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t)โ somebody (anybody) looked ahead.void(* LTT )(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t)โ the tree parser looked ahead.void(* mark )(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)โ the parser is about to look arbitrarily ahead; mark this location, and the token stream's marker gets sent in case you need it.void(* nilNode )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)โ a nil was created (even nil nodes have a unique ID... they are not null"perse).ANTLR3_UINT32 portโ the port number the debug listener should listen on for a connection.int protocol_versionโ the version of the debugging protocol supported by the providing instance of the debug event listener.void(* recognitionException )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e)โ a recognition exception happened, likeNoViableAltException.void(* rewind )(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)โ after an arbitrarily long lookahead as with a cyclic DFA (or with any backtrack), this tells the debugger the stream should be rewound to the position associated withmarker.void(* rewindLast )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ rewind to the input position of the last marker.void(* semanticPredicate )(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char *predicate)โ a semantic predicate was evaluated with this result and action text.void(* setTokenBoundaries )(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex)โ set the token start/stop token index for a subtree root or node.SOCKET socketโ the socket structure we receive after a successful accept on theserverSocket.void(* terminate )(pANTLR3_DEBUG_EVENT_LISTENER delboy)โ parsing is over; successfully or not.pANTLR3_STRING tokenStringโ used to serialize the values of any particular token we need to send back to the debugger.
๐ Detailed Description ๐
The ANTLR3 debugging interface for communicating with ANLTR Works.
Function comments mostly taken from the Java version. (ngl, shoutout to the Java girlies for the lore ๐)
๐ Field Documentation ๐
๐ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::ack) ๐
(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Retrieve acknowledge response from the debugger. in fact this response is never used at the moment. So we just read whatever is in the socket buffer and throw it away. (iconic honestly, read it and ghost it ๐ )
๐ธ pANTLR3_BASE_TREE_ADAPTOR ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor ๐ธ
Allows the debug event system to access the adapter in use by the recognizer, if this is a tree parser of some sort.
Referenced by addChild(), antlr3BaseTreeAdaptorInit(), becomeRoot(), createNode(), createNodeTok(), errorNode(), nilNode(), serializeNode(), and setTokenBoundaries().
๐ฆ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild) ๐ฆ
(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root,
pANTLR3_BASE_TREE child)
Make childID a child of rootID. If you are receiving this event over a socket via RemoteDebugEventSocketListener then only IDs are set.
See also: org.antlr.runtime.tree.TreeAdaptor.addChild()
Referenced by antlr3DebugListenerNew(), dbgAddChild(), dbgAddChildToken(), and simulateTreeConstruction().
โญ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRoot) โญ
(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot,
pANTLR3_BASE_TREE oldRoot)
Make a node the new root of an existing root. See
Note: thenewRootIDparameter is possibly different than theTreeAdaptor.becomeRoot()newRootparameter. In our case, it will always be the result of callingTreeAdaptor.becomeRoot()and notroot_nor whatever.
The listener should assume that this event occurs only when the current subrule (or rule) subtree is being reset to newRootID.
If you are receiving this event over a socket via RemoteDebugEventSocketListener then only IDs are set.
See also: org.antlr.runtime.tree.TreeAdaptor.becomeRoot()
Referenced by antlr3DebugListenerNew(), dbgBecomeRoot(), and dbgBecomeRootToken().
๐ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::beginBacktrack) ๐
(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level)
Referenced by antlr3DebugListenerNew(), and beginBacktrack().
๐ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::beginResync) ๐
(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Indicates the recognizer is about to consume tokens to resynchronize the parser. Any consume events from here until the recovered event are not part of the parseโthey are dead tokens. (rip to those tokens, gone but not forgotten ๐)
Referenced by antlr3DebugListenerNew(), beginResync(), and recoverFromMismatchedToken().
๐ง void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::commence) ๐ง
(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Announce that parsing has begun. Not technically useful except for sending events over a socket. A GUI for example will launch a thread to connect and communicate with a remote parser. The thread will want to notify the GUI when a connection is made. ANTLR parsers trigger this upon entry to the first rule (the ruleLevel is used to figure this out).
Referenced by antlr3DebugListenerNew().
๐ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeHiddenToken) ๐
(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
An off-channel input token was consumed. Trigger after the token was matched by things like match(), matchAny(). (unless of course the hidden token is first stuff in the input stream).
Referenced by antlr3DebugListenerNew(), consumeInitialHiddenTokens(), and dbgConsume().
๐ void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeNode) ๐
(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Input for a tree parser is an AST, but we know nothing for sure about a node except its type and text (obtained from the adaptor). This is the analog of the consumeToken method. The ID is usually the memory address of the node. If the type is UP or DOWN, then the ID is not really meaningful as it's fixedโthere is just one UP node and one DOWN navigation node.
Note: unlike the Java version, the node type of the C parsers is always fixed aspANTLR3_BASE_TREEbecause all such structures contain a super pointer to their parent, which is generallyCOMMON_TREEand within that there is a super pointer that can point to a user type that encapsulates it. Almost akin to saying that it is an interface pointer except we don't need to know what the interface is in full, just those bits that are the base.
Parameters
t
(part 1 done, bestie โ more incoming ๐)
๐
consumeToken
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeToken)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
okay so an input token got consumed โ matched by literally any kind of element. This one fires after the token was matched by things like match(), matchAny(). bestie, that's the whole vibe.
Referenced by: antlr3DebugListenerNew(), and dbgConsume().
๐ฑ createNode
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
announcing a brand new node built out of token elements like type etc... โจ and heads up: if you're getting this event over a socket via RemoteDebugEventSocketListener, then only t.ID, type, text are set. that's it, that's all you get.
Referenced by: antlr3DebugListenerNew(), dbgCreate(), dbgCreateTypeText(), dbgCreateTypeToken(), dbgCreateTypeTokenText(), dbgNil(), and simulateTreeConstruction().
๐ createNodeTok
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::createNodeTok)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token)
announcing a new node built from an existing token. and same deal as before โ if you're receiving this event over a socket via RemoteDebugEventSocketListener, then only node.ID and token.tokenIndex are set. ๐
Referenced by: antlr3DebugListenerNew().
โช endBacktrack
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::endBacktrack)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful)
Referenced by: antlr3DebugListenerNew(), and endBacktrack().
๐งน endResync
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::endResync)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
this one's saying the recognizer has finished consuming tokens in order to resynchronize. lowkey important detail: there may be multiple beginResync/endResync pairs before the recognizer comes out of errorRecovery mode (and in that mode, multiple errors get suppressed, no cap). super useful in a gui where you'd probably want to grey out tokens that are consumed but not matched to anything in the grammar. everything between a beginResync/endResync pair got tossed out by the parser. ๐
Referenced by: antlr3DebugListenerNew(), endResync(), and recoverFromMismatchedToken().
๐ช enterAlt
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::enterAlt)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt)
because rules can have so many alternatives, it's genuinely very useful to know which alt you're entering. this is 1..n for n alts, periodt.
Referenced by: antlr3DebugListenerNew().
๐งญ enterDecision
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::enterDecision)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
every decision โ fixed k or arbitrary โ has an enter/exit event so a GUI can easily track what LT/consume events are associated with prediction. ๐ heads up though: you'll see a single enter/exit subrule but multiple enter/exit decision events, one for each loop iteration. it's giving thorough.
Referenced by: antlr3DebugListenerNew().
๐ enterRule
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::enterRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
the parser has just entered a rule. no decision has been made yet about which alt is predicted. and the timing bestie: this fires AFTER init actions have been executed. attributes are defined and available etc... โจ
Referenced by: antlr3DebugListenerNew().
๐ช enterSubRule
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::enterSubRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
tracks entry into any (...) subrule โ and any other EBNF construct too.
Referenced by: antlr3DebugListenerNew().
๐ญ errorNode
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::errorNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
if a syntax error happens, recognizers bracket the error with an error node when they're building ASTs. this event is the listener being told "yep, that's the case." ๐
Referenced by: antlr3DebugListenerNew().
๐ช exitDecision
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::exitDecision)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Referenced by: antlr3DebugListenerNew().
๐ exitRule
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::exitRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
this is the last thing executed before leaving a rule. and it gets executed even if an exception is thrown, no cap. it's triggered after error reporting and recovery have occurred (unless the exception is not caught in this rule). also it implies an "exitAlt" event. iykyk.
Referenced by: antlr3DebugListenerNew().
๐ exitSubRule
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::exitSubRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Referenced by: antlr3DebugListenerNew().
๐ง free
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::free)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
free up the resources allocated to this structure. tidy up, bestie. ๐งน
๐ grammarFileName
pANTLR3_STRING ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName
the name of the grammar file that we are debugging. iconic.
Referenced by: createNode(), errorNode(), handshake(), serializeNode(), and serializeToken().
๐ค handshake
ANTLR3_BOOLEAN(* ANTLR3_DEBUG_EVENT_LISTENER_struct::handshake)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
wait for a connection from the debugger and initiate the debugging session. โจ
Referenced by: antlr3DebugListenerNew().
โ
initialized
ANTLR3_BOOLEAN ANTLR3_DEBUG_EVENT_LISTENER_struct::initialized
indicates whether we have already connected or not.
Referenced by: handshake().
๐ location
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::location)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos)
so to watch a parser move through the grammar, the parser needs to inform the debugger what line/charPos it is passing in the grammar. for now, this does not know how to switch from one grammar to the other and back for island grammars etc...
this should also allow breakpoints, because the debugger can stop the parser whenever it hits this line/pos. ๐
Referenced by: antlr3DebugListenerNew().
๐ LT
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::LT)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t)
somebody (anybody) looked ahead. note that this actually gets triggered by both LA and LT calls. the debugger is gonna want to know which Token object was examined. like consumeToken, this indicates what token was seen at that depth. and the reason it works like that: a remote debugger cannot look ahead into a file it doesn't have, so LT events must pass the token even if the info is redundant. periodt.
Referenced by: antlr3DebugListenerNew(), and dbgLA().
๐ณ LTT
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::LTT)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t)
the tree parser looked ahead. heads up: if the type is UP or DOWN, then the ID is not really meaningful as it's fixed โ there is just one UP node and one DOWN navigation node. ๐ฆ
Referenced by: antlr3DebugListenerNew().
๐ mark
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::mark)(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
the parser is going to look arbitrarily ahead; mark this location โ the token stream's marker is sent in case you need it.
Referenced by: antlr3DebugListenerNew(), and dbgMark().
๐ซง nilNode
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::nilNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
a nil was created โ and even nil nodes have a unique ID... they are not "null" per se. as of 4/28/2006, this seems to be uniquely triggered when starting a new subtree, like when entering a subrule in automatic mode and when building a tree in rewrite mode. ๐ธ
and if you are receiving this event over a socket via RemoteDebugEventSocketListener, then only t.ID is set.
Referenced by: antlr3DebugListenerNew().
๐ port
ANTLR3_UINT32 ANTLR3_DEBUG_EVENT_LISTENER_struct::port
the port number which the debug listener should listen on for a connection.
Referenced by: antlr3DebugListenerNew(), antlr3DebugListenerNewPort(), and handshake().
๐ท๏ธ protocol_version
int ANTLR3_DEBUG_EVENT_LISTENER_struct::protocol_version
the version of the debugging protocol supported by the providing instance of the debug event listener.
Referenced by: antlr3DebugListenerNew(), and handshake().
๐จ recognitionException
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::recognitionException)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e)
a recognition exception occurred, like NoViableAltException. i made this a generic event so that i can alter the exception hierarchy later without having to alter all the debug objects. ๐
upon error, the stack of enter rule/subrule must be properly unwound. if no viable alt occurs it is within an enter/exit decision, which also must be rewound. even the rewind for each mark must be unwound. in the Java target this is pretty easy using try/finally, if a bit ugly in the generated code. the rewind is generated in DFA.predict() actually, so no code needs to be generated for that. for languages w/o this "finally" feature (C++?), the target implementor will have to build an event stack or something. ๐ญ
across a socket for remote debugging, only the RecognitionException data fields are transmitted. the token object or whatever that caused the problem was the last object referenced by LT. the immediately preceding LT event should hold the unexpected Token or char.
here is a sample event trace for grammar:
b : C ({;}A|B) // {;} is there to prevent A|B becoming a set | D ;
the sequence for this rule (with no viable alt in the subrule) for input 'c c' (there are 3 tokens) is:
commence
LT(1)
enterRule b
location 7 1
enter decision 3
LT(1)
exit decision 3
enterAlt1
location 7 5
LT(1)
consumeToken [c/<4>,1:0]
location 7 7
enterSubRule 2
enter decision 2
LT(1)
LT(1)
recognitionException NoViableAltException 2 1 2
exit decision 2
exitSubRule 2
beginResync
LT(1)
consumeToken [c/<4>,1:1]
LT(1)
endResync
LT(-1)
exitRule b
terminate
Referenced by: antlr3DebugListenerNew(), and reportError().
โช rewind
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::rewind)(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
after an arbitrarily long lookahead as with a cyclic DFA (or with any backtrack), this informs the debugger that stream should be rewound to the position associated with marker. ๐
Referenced by: antlr3DebugListenerNew(), and dbgRewindStream().
โฎ๏ธ rewindLast
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::rewindLast)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
rewind to the input position of the last marker. used currently only after a cyclic DFA and just before starting a sem/syn predicate, to get the input position back to the start of the decision. and bestie, do not "pop" the marker off the state. mark(i) and rewind(i) should balance still. don't be messy with it. ๐
Referenced by: antlr3DebugListenerNew(), and dbgRewindLast().
๐ง semanticPredicate
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::semanticPredicate)(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char *predicate)
a semantic predicate was evaluate with this result and action text.
Referenced by: antlr3DebugListenerNew().
๐
setTokenBoundaries
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::setTokenBoundaries)
(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER
tokenStartIndex, ANTLR3_MARKER tokenStopIndex)
okay so this one is literally the girl who writes down where a thing starts and where it stops โ she sets the token start/stop token index for a subtree root or node. that's it, that's the job. she marks the boundaries, no cap. ๐
bestie heads up: if you're receiving this event over a socket viaRemoteDebugEventSocketListener, then onlyt.IDis set. that's it. nothing else comes through. don't be surprised, it's giving minimalist. ๐
referenced by antlr3DebugListenerNew(), and dbgSetTokenBoundaries().
๐ socket
SOCKET ANTLR3_DEBUG_EVENT_LISTENER_struct::socket
this is the socket structure we receive after a successful accept on the serverSocket. like, the server said "hey bestie, come in" and this is the lil handshake token that came back. the vibes are connected fr fr. โจ
referenced by ack(), handshake(), terminate(), and transmit().
๐ terminate
void(* ANTLR3_DEBUG_EVENT_LISTENER_struct::terminate)
(pANTLR3_DEBUG_EVENT_LISTENER delboy)
parsing is over. successfully or not โ she does not judge, she does not ask questions, she just closes the door. mostly useful for telling remote debugging listeners that it's time to quit. and here's the exact moment it happens: when the rule invocation level goes to zero at the end of a rule, we are done parsing. zero. that's the number. that's the cue. periodt. ๐
referenced by antlr3DebugListenerNew().
๐งต tokenString
pANTLR3_STRING ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString
used to serialize the values of any particular token we need to send back to the debugger. so like, whatever token needs to go home to the debugger, this is the little string that carries it there. she's the messenger, the icon, the moment. ๐ฆ
referenced by consumeNode(), createNode(), errorNode(), LTT(), serializeNode(), and serializeToken().
๐ Author
generated automatically by Doxygen for ANTLR3C from the source code. yeah, a robot wrote her, but she ate regardless. ๐
and that's the whole page bestie, we made it to the end ๐ซถ this one is version 3.3.1, dated Tue Jul 29 2025, and it came to you from ANTLR3C โ go forth and debug slayfully, iykyk โญ๐
๐ฆ 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