ANTLR3_PARSER_struct(3)
π ANTLR3_PARSER_struct β bestie's guide to the parser interface π
okay so. this is a page from the ANTLR3C manual, and we're talking about ANTLR3_PARSER_struct β¨ buckle up, it's giving struct energy and honestly? iconic.
β¨ NAME β¨
ANTLR3_PARSER_struct β this is the main interface for an ANTLR3 parser. the whole main character. π
πΈ SYNOPSIS πΈ
#include <antlr3parser.h>
π¦ Data Fields π¦
void(* free )(struct ANTLR3_PARSER_struct *parser)β a pointer to a function that knows how to free resources of anANTLR3parser. it's the cleanup crew πpANTLR3_TOKEN_STREAM(* getTokenStream )(struct ANTLR3_PARSER_struct *parser)β a pointer to a function that returns the token stream for this parser.pANTLR3_BASE_RECOGNIZER recβ a pointer to the base recognizer, where most of the parser functions actually live, because they are shared between parser and tree parser and this is the easier way than copying the interface all over the place.void(* setDebugListener )(struct ANTLR3_PARSER_struct *parser, pANTLR3_DEBUG_EVENT_LISTENER dbg)β a pointer to a function that installs a debugger object (it also installs the debugging versions of the parser methods.void(* setTokenStream )(struct ANTLR3_PARSER_struct *parser, pANTLR3_TOKEN_STREAM)β a pointer to a function that installs a token stream for the parser.void * superβ all superstructure implementers of this interface require a pointer to their selves, which they can reference using thesuperpointer here.pANTLR3_TOKEN_STREAM tstreamβ a provider of a tokenstream interface, for the parser to consume tokens from.
π Detailed Description π
This is the main interface for an ANTLR3 parser. fr fr, that's the whole vibe check. β¨
π Field Documentation π
π void(* ANTLR3_PARSER_struct::free) (struct ANTLR3_PARSER_struct *parser)
Pointer to a function that knows how to free resources of an ANTLR3 parser. π§Ή
Referenced by antlr3ParserNew().
π pANTLR3_TOKEN_STREAM(* ANTLR3_PARSER_struct::getTokenStream) (struct ANTLR3_PARSER_struct *parser)
A pointer to a function that returns the token stream for this parser.
Referenced by antlr3ParserNew().
π pANTLR3_BASE_RECOGNIZER ANTLR3_PARSER_struct::rec
A pointer to the base recognizer, where most of the parser functions actually live because they are shared between parser and tree parser and this is the easier way than copying the interface all over the place. Macros hide this for the generated code so it is easier on the eye (though not the debugger ;-). π honestly the debugger is catching strays here.
Referenced by antlr3ParserNew(), freeParser(), setDebugListener(), and setTokenStream().
π void(* ANTLR3_PARSER_struct::setDebugListener) (struct ANTLR3_PARSER_struct *parser, pANTLR3_DEBUG_EVENT_LISTENER dbg)
A pointer to a function that installs a debugger object (it also installs the debugging versions of the parser methods. This means that a non debug parser incurs no overhead because of the debugging stuff. π«Ά lowkey a slay optimization ngl.
Referenced by antlr3ParserNew(), and antlr3ParserNewStreamDbg().
π void(* ANTLR3_PARSER_struct::setTokenStream) (struct ANTLR3_PARSER_struct *parser, pANTLR3_TOKEN_STREAM)
A pointer to a function that installs a token stream for the parser.
Referenced by antlr3ParserNew(), and antlr3ParserNewStream().
π void* ANTLR3_PARSER_struct::super
All superstructure implementers of this interface require a pointer to their selves, which they can reference using the super pointer here.
π pANTLR3_TOKEN_STREAM ANTLR3_PARSER_struct::tstream
A provider of a tokenstream interface, for the parser to consume tokens from.
Referenced by alreadyParsedRule(), antlr3RecognitionExceptionNew(), consumeUntil(), consumeUntilSet(), displayRecognitionError(), getTokenStream(), match(), matchAny(), memoize(), mismatch(), recover(), recoverFromMismatchedElement(), recoverFromMismatchedSet(), recoverFromMismatchedToken(), setDebugListener(), setTokenStream(), and synpred(). look at that list, it's booked and busy π
π₯
π«Ά Author π«Ά
Generated automatically by Doxygen for ANTLR3C from the source code. not a human bestie, it's the machine π€β¨
Version 3.3.1 Β· Tue Jul 29 2025 00:00:00 β that's the tea, the date, and the version, all in one cute lil sign-off. periodt. πππ¦ no cap, you now know ANTLR3_PARSER_struct better than you knew yourself this morning. go forth and parse, bestie ππβ
π¦ 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