src/antlr3baserecognizer.c(3)
π¦ src/antlr3baserecognizer.c β the ANTLR3C manual page, but make it make sense β¨
okay so bestie, welcome to the ANTLR3C manual. this one's about src/antlr3baserecognizer.c, and honestly? it's giving backbone. it holds the base functions that every single recognizer needs. lexers, parsers, tree parsers β they all pull up to this file like it's the group chat π
πΈ NAME πΈ
src/antlr3baserecognizer.c β contains the base functions that all recognizers require.
β¨ SYNOPSIS β¨
#include <antlr3baserecognizer.h>
π Functions π
every function in here, one by one, no skips, no cap. some of them came with a lil description, some just rolled up with a signature and vibes π
static ANTLR3_BOOLEAN alreadyParsedRule (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex)β has this rule already parsed input at the current index in the input stream? πANTLR3_API pANTLR3_BASE_RECOGNIZER antlr3BaseRecognizerNew (ANTLR3_UINT32 type, ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)β no description in the source, bestie. signature only. mysterious. iconic.ANTLR3_API void antlr3MTExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)β creates a new Mismatched Token Exception and inserts in the recognizer exception stack πANTLR3_API void antlr3RecognitionExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)β again, just the signature, no blurb. we respect the silence π«Άstatic void beginBacktrack (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level)β signature only, no description given.static void beginResync (pANTLR3_BASE_RECOGNIZER recognizer)β signature only, no description given.static pANTLR3_BITSET combineFollows (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_BOOLEAN exact)β compute the current followset for the input stream β¨static pANTLR3_BITSET computeCSRuleFollow (pANTLR3_BASE_RECOGNIZER recognizer)β compute the context-sensitive FOLLOW set for current rule.static pANTLR3_BITSET computeErrorRecoverySet (pANTLR3_BASE_RECOGNIZER recognizer)β compute the error recovery set for the current rule πstatic void consumeUntil (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 tokenType)β eat tokens from the input stream until we get one of JUST the right type. JUST the right type, mind you. no substitutes π½οΈstatic void consumeUntilSet (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET set)β eat tokens from the input stream until we find one that belongs to the supplied set.static void displayRecognitionError (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 *tokenNames)β standard/Example error display method. yes it says "Standard/Example", that's the actual wording, we don't make the rules πstatic void endBacktrack (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level, ANTLR3_BOOLEAN successful)β signature only, no description given.static void endResync (pANTLR3_BASE_RECOGNIZER recognizer)β signature only, no description given.static void freeBR (pANTLR3_BASE_RECOGNIZER recognizer)β signature only, no description given.static void ANTLR3_CDECL freeIntTrie (void *trie)β signature only, no description given.static void * getCurrentInputSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)β signature only, no description given.static void * getMissingSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)β signature only, no description given.static ANTLR3_UINT32 getNumberOfSyntaxErrors (pANTLR3_BASE_RECOGNIZER recognizer)β return how many syntax errors were detected by this recognizer π’static pANTLR3_STACK getRuleInvocationStack (pANTLR3_BASE_RECOGNIZER recognizer)β return the rule invocation stack (how we got here in the parse. β yes, the parenthesis is left hanging open in the original. we keep it exactly like that, fr fr πstatic pANTLR3_STACK getRuleInvocationStackNamed (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 name)β signature only, no description given.static ANTLR3_MARKER getRuleMemoization (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_INTKEY ruleIndex, ANTLR3_MARKER ruleParseStart)β pointer to a function to return whether the rule has parsed input starting at the supplied start index before.static void * match (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)β match current input symbol against ttype.static void matchAny (pANTLR3_BASE_RECOGNIZER recognizer)β consumes the next token, whatever it is, and resets the recognizer state so that it is not in error. "whatever it is" is so real of it πstatic void memoize (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex, ANTLR3_MARKER ruleParseStart)β record whether or not this rule parsed the input at this position successfully.static void mismatch (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)β factor out what to do upon token mismatch so tree parsers can behave differently.static ANTLR3_BOOLEAN mismatchIsMissingToken (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_BITSET_LIST follow)β signature only, no description given.static ANTLR3_BOOLEAN mismatchIsUnwantedToken (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, ANTLR3_UINT32 ttype)β signature only, no description given.static void recover (pANTLR3_BASE_RECOGNIZER recognizer)β recover from an error found on the input stream π©Ήstatic ANTLR3_BOOLEAN recoverFromMismatchedElement (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST followBits)β this code is factored out from mismatched token and mismatched set recovery.static void * recoverFromMismatchedSet (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST follow)β signature only, no description given.static void * recoverFromMismatchedToken (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)β attempt to recover from a single missing or extra token.static void reportError (pANTLR3_BASE_RECOGNIZER recognizer)β report a recognition problem π’static void reset (pANTLR3_BASE_RECOGNIZER recognizer)β signature only, no description given.static ANTLR3_BOOLEAN synpred (pANTLR3_BASE_RECOGNIZER recognizer, void *ctx, void(*predicate)(void *ctx))β a syntactic predicate.static pANTLR3_HASH_TABLE toStrings (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_HASH_TABLE tokens)β convenience method for template rewrites - NYI. NYI as in not yet implemented, bestie, don't come for it π
π Detailed Description π
contains the base functions that all recognizers require.
any function can be overridden by a lexer/parser/tree parser or by the ANTLR3 programmer. so like. it's a base file that knows it's a base file. main character energy, honestly π
π¦ Author π¦
generated automatically by Doxygen for ANTLR3C from the source code.
okay that's the whole page, you ate that π
and for the cute sign-off: this lil masterpiece is Version 3.3.1, dated Tue Jul 29 2025, and the page is src/antlr3baserecognizer.c(3) from the ANTLR3C manual. go forth and recognize things, 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