src/antlr3lexer.c(3)

πŸ“¦ version 3.4, in fedora 43

πŸ¦‹ src/antlr3lexer.c β€” ANTLR3C, section 3 πŸ¦‹

okay bestie, sit down, hydrate, and let me tell you about the absolute blueprint that is the ANTLR3C lexer base file πŸ’…


✨ NAME ✨

src/antlr3lexer.c β€” the base implementation of an antlr 3 lexer. like, the foundation, the whole scaffolding, the main character of the lexer world πŸ‘‘


🌸 SYNOPSIS 🌸

#include <antlr3lexer.h>

πŸŽ€ Functions πŸŽ€

  • ANTLR3_API pANTLR3_LEXER antlr3LexerNew (ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state) β€” no description in the source, she's mysterious, she simply is ✨
  • ANTLR3_API pANTLR3_LEXER antlr3LexerNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state) β€” also no description, we stan a lowkey icon
  • static void displayRecognitionError (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 *tokenNames) β€” the default lexer error handler (works for 8 bit streams only!
  • static pANTLR3_COMMON_TOKEN emit (pANTLR3_LEXER lexer)
  • static void emitNew (pANTLR3_LEXER lexer, pANTLR3_COMMON_TOKEN token)
  • static void freeLexer (pANTLR3_LEXER lexer) β€” free the resources allocated by a lexer 🧹
  • static ANTLR3_MARKER getCharIndex (pANTLR3_LEXER lexer)
  • static ANTLR3_UINT32 getCharPositionInLine (pANTLR3_LEXER lexer)
  • static void * getCurrentInputSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)
  • static ANTLR3_UINT32 getLine (pANTLR3_LEXER lexer)
  • static void * getMissingSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
  • static pANTLR3_STRING getText (pANTLR3_LEXER lexer)
  • static void matchAny (pANTLR3_LEXER lexer)
  • static ANTLR3_BOOLEAN matchc (pANTLR3_LEXER lexer, ANTLR3_UCHAR c) β€” implementation of matchc for the lexer, overrides any base implementation in the base recognizer
  • static ANTLR3_BOOLEAN matchRange (pANTLR3_LEXER lexer, ANTLR3_UCHAR low, ANTLR3_UCHAR high) β€” implementation of match range for the lexer, overrides any base implementation in the base recognizer
  • static ANTLR3_BOOLEAN matchs (pANTLR3_LEXER lexer, ANTLR3_UCHAR *string) β€” implementation of matchs for the lexer, overrides any base implementation in the base recognizer
  • static void mTokens (pANTLR3_LEXER lexer)
  • static pANTLR3_COMMON_TOKEN nextToken (pANTLR3_TOKEN_SOURCE toksource) β€” the default implementation of the nextToken() call for a lexer
  • static ANTLR3_INLINE pANTLR3_COMMON_TOKEN nextTokenStr (pANTLR3_TOKEN_SOURCE toksource) β€” returns the next available token from the current input stream
  • static void popCharStream (pANTLR3_LEXER lexer) β€” stops using the current input stream and reverts to any prior input stream on the stack
  • static void pushCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input) β€” change to a new input stream, remembering the old one
  • static void recover (pANTLR3_LEXER lexer)
  • static void reportError (pANTLR3_BASE_RECOGNIZER rec)
  • static void reset (pANTLR3_BASE_RECOGNIZER rec)
  • static void setCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input)

πŸ’… Detailed Description πŸ’…

Base implementation of an antlr 3 lexer.

An ANTLR3 lexer implements a base recongizer, a token source and a lexer interface. It constructs a base recognizer with default functions, then overrides any of these that are parser specific (usual default implementation of base recognizer.

fr fr that's the whole vibe β€” build the default, then swap in whatever the parser needs 🫢

πŸ‘‘ Function Documentation πŸ‘‘

🌈 ANTLR3_API pANTLR3_LEXER antlr3LexerNew (ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)

References: ANTLR3_TEXT_NONE, ANTLR3_TOKEN_EOF, ANTLR3_TOKEN_INVALID, ANTLR3_TRUE, ANTLR3_TYPE_LEXER, antlr3BaseRecognizerNew(), antlr3SetTokenAPI(), ANTLR3_COMMON_TOKEN_struct::custom, ANTLR3_BASE_RECOGNIZER_struct::displayRecognitionError, displayRecognitionError(), ANTLR3_LEXER_struct::emit, emit(), ANTLR3_LEXER_struct::emitNew, emitNew(), ANTLR3_TOKEN_SOURCE_struct::eofToken, ANTLR3_COMMON_TOKEN_struct::factoryMade, ANTLR3_BASE_RECOGNIZER_struct::free, ANTLR3_LEXER_struct::free, freeLexer(), ANTLR3_LEXER_struct::getCharIndex, getCharIndex(), ANTLR3_LEXER_struct::getCharPositionInLine, getCharPositionInLine(), ANTLR3_BASE_RECOGNIZER_struct::getCurrentInputSymbol, getCurrentInputSymbol(), ANTLR3_LEXER_struct::getLine, getLine(), ANTLR3_BASE_RECOGNIZER_struct::getMissingSymbol, getMissingSymbol(), ANTLR3_LEXER_struct::getText, getText(), ANTLR3_LEXER_struct::matchAny, matchAny(), ANTLR3_LEXER_struct::matchc, matchc(), ANTLR3_LEXER_struct::matchRange, matchRange(), ANTLR3_LEXER_struct::matchs, matchs(), ANTLR3_LEXER_struct::mTokens, mTokens(), ANTLR3_TOKEN_SOURCE_struct::nextToken, nextToken(), ANTLR3_LEXER_struct::popCharStream, popCharStream(), ANTLR3_LEXER_struct::pushCharStream, pushCharStream(), ANTLR3_LEXER_struct::rec, ANTLR3_LEXER_struct::recover, recover(), ANTLR3_BASE_RECOGNIZER_struct::reportError, reportError(), ANTLR3_BASE_RECOGNIZER_struct::reset, reset(), ANTLR3_LEXER_struct::setCharStream, setCharStream(), ANTLR3_COMMON_TOKEN_struct::setType, ANTLR3_TOKEN_SOURCE_struct::skipToken, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_COMMON_TOKEN_struct::strFactory, ANTLR3_TOKEN_SOURCE_struct::strFactory, ANTLR3_BASE_RECOGNIZER_struct::super, ANTLR3_TOKEN_SOURCE_struct::super, ANTLR3_COMMON_TOKEN_struct::textState, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokSource, ANTLR3_COMMON_TOKEN_struct::user1, ANTLR3_COMMON_TOKEN_struct::user2, and ANTLR3_COMMON_TOKEN_struct::user3.

Referenced by: antlr3LexerNewStream().


πŸ¦‹ ANTLR3_API pANTLR3_LEXER antlr3LexerNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state)

References: antlr3LexerNew(), and setCharStream().


πŸ’– void displayRecognitionError (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 * tokenNames) [static]

Default lexer error handler (works for 8 bit streams only! !!)

lowkey a limitation bestie, she said 8 bit streams and she MEANT it 😭

References: ANTLR3_UINT32_CAST, ANTLR3_EXCEPTION_struct::c, ANTLR3_EXCEPTION_struct::charPositionInLine, ANTLR3_STRING_struct::chars, ANTLR3_INPUT_STREAM_struct::data, ANTLR3_RECOGNIZER_SHARED_STATE_struct::exception, ANTLR3_EXCEPTION_struct::index, ANTLR3_LEXER_struct::input, ANTLR3_EXCEPTION_struct::line, ANTLR3_EXCEPTION_struct::message, ANTLR3_EXCEPTION_struct::name, ANTLR3_LEXER_struct::rec, ANTLR3_INPUT_STREAM_struct::size, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_EXCEPTION_struct::streamName, ANTLR3_BASE_RECOGNIZER_struct::super, ANTLR3_STRING_struct::to8, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharPositionInLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartLine, and ANTLR3_EXCEPTION_struct::type.


⭐ pANTLR3_COMMON_TOKEN emit (pANTLR3_LEXER lexer) [static]

References: ANTLR3_TEXT_NONE, ANTLR3_TEXT_STRING, ANTLR3_COMMON_TOKEN_struct::channel, ANTLR3_RECOGNIZER_SHARED_STATE_struct::channel, ANTLR3_COMMON_TOKEN_struct::charPosition, ANTLR3_INPUT_STREAM_struct::currentLine, ANTLR3_COMMON_TOKEN_struct::custom, ANTLR3_RECOGNIZER_SHARED_STATE_struct::custom, ANTLR3_LEXER_struct::getCharIndex, ANTLR3_LEXER_struct::input, ANTLR3_COMMON_TOKEN_struct::line, ANTLR3_COMMON_TOKEN_struct::lineStart, ANTLR3_TOKEN_FACTORY_struct::newToken, ANTLR3_LEXER_struct::rec, ANTLR3_COMMON_TOKEN_struct::start, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_COMMON_TOKEN_struct::stop, ANTLR3_COMMON_TOKEN_struct::text, ANTLR3_RECOGNIZER_SHARED_STATE_struct::text, ANTLR3_COMMON_TOKEN_struct::textState, ANTLR3_RECOGNIZER_SHARED_STATE_struct::token, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharPositionInLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory, ANTLR3_COMMON_TOKEN_struct::tokText, ANTLR3_COMMON_TOKEN_struct::type, ANTLR3_RECOGNIZER_SHARED_STATE_struct::type, ANTLR3_COMMON_TOKEN_struct::user1, ANTLR3_RECOGNIZER_SHARED_STATE_struct::user1, ANTLR3_COMMON_TOKEN_struct::user2, ANTLR3_RECOGNIZER_SHARED_STATE_struct::user2, ANTLR3_COMMON_TOKEN_struct::user3, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::user3.

Referenced by: antlr3LexerNew(), and nextTokenStr().


πŸ“ void emitNew (pANTLR3_LEXER lexer, pANTLR3_COMMON_TOKEN token) [static]

References: ANTLR3_LEXER_struct::rec, ANTLR3_BASE_RECOGNIZER_struct::state, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::token.

Referenced by: antlr3LexerNew().


🧚 void freeLexer (pANTLR3_LEXER lexer) [static]

Free the resources allocated by a lexer.

she's doing cleanup duty and honestly? we love a responsible queen πŸ§ΉπŸ’–

References: ANTLR3_TOKEN_FACTORY_struct::close, ANTLR3_BASE_RECOGNIZER_struct::free, ANTLR3_STACK_struct::free, ANTLR3_LEXER_struct::rec, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_RECOGNIZER_SHARED_STATE_struct::streams, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokSource.

Referenced by: antlr3LexerNew().


🌸 ANTLR3_MARKER getCharIndex (pANTLR3_LEXER lexer) [static]

References: ANTLR3_INT_STREAM_struct::index, ANTLR3_LEXER_struct::input, and ANTLR3_INPUT_STREAM_struct::istream.

Referenced by: antlr3LexerNew().


πŸ’œ ANTLR3_UINT32 getCharPositionInLine (pANTLR3_LEXER lexer) [static]

References: ANTLR3_INPUT_STREAM_struct::charPositionInLine, and ANTLR3_LEXER_struct::input.


🌈 void * getCurrentInputSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream) [static]

(no references listed in the source, she's keeping it mysterious ✨)


πŸŽ€ ANTLR3_UINT32 getLine (pANTLR3_LEXER lexer) [static]

References: ANTLR3_INPUT_STREAM_struct::getLine, and ANTLR3_LEXER_struct::input.


πŸ¦‹ void * getMissingSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow) [static]

(also no references listed β€” quiet, iconic, no notes πŸ’…)


πŸ”₯ pANTLR3_STRING getText (pANTLR3_LEXER lexer) [static]

References: ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_LEXER_struct::getCharIndex, ANTLR3_LEXER_struct::input, ANTLR3_LEXER_struct::rec, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_INPUT_STREAM_struct::substr, ANTLR3_RECOGNIZER_SHARED_STATE_struct::text, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex.


πŸ’€ void matchAny (pANTLR3_LEXER lexer) [static]

References: ANTLR3_INT_STREAM_struct::consume, ANTLR3_LEXER_struct::input, and ANTLR3_INPUT_STREAM_struct::istream.


⭐ ANTLR3_BOOLEAN matchc (pANTLR3_LEXER lexer, ANTLR3_UCHAR c) [static]

Implementation of matchc for the lexer, overrides any base implementation in the base recognizer.

Remarks

Note that the generated code lays down arrays of ints for constant strings so that they are int UTF32 form! like, that's the whole reason bestie, no cap 🫢

References: ANTLR3_INT_STREAM_struct::_LA, ANTLR3_FALSE, ANTLR3_TRUE, ANTLR3_RECOGNIZER_SHARED_STATE_struct::backtracking, ANTLR3_INT_STREAM_struct::consume, ANTLR3_BASE_RECOGNIZER_struct::exConstruct, ANTLR3_RECOGNIZER_SHARED_STATE_struct::failed, ANTLR3_LEXER_struct::input, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_LEXER_struct::rec, ANTLR3_LEXER_struct::recover, and ANTLR3_BASE_RECOGNIZER_struct::state.

Referenced by: antlr3LexerNew().

πŸ’– ANTLR3_BOOLEAN matchRange (pANTLR3_LEXER lexer, ANTLR3_UCHAR low, ANTLR3_UCHAR high) [static]

okay so this is the lexer's very own match range implementation, and it straight-up overrides whatever the base recognizer was doing. main character behaviour, honestly πŸ‘‘

Remarks

fr fr, heads up: the generated code lays down arrays of ints for constant strings so that they are int UTF32 form! 🧠✨

References β€” the way this function is entangled with literally everyone: ANTLR3_INT_STREAM_struct::_LA, ANTLR3_FALSE, ANTLR3_TRUE, ANTLR3_RECOGNIZER_SHARED_STATE_struct::backtracking, ANTLR3_INT_STREAM_struct::consume, ANTLR3_BASE_RECOGNIZER_struct::exConstruct, ANTLR3_RECOGNIZER_SHARED_STATE_struct::failed, ANTLR3_LEXER_struct::input, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_LEXER_struct::rec, ANTLR3_LEXER_struct::recover, and ANTLR3_BASE_RECOGNIZER_struct::state.

Referenced by antlr3LexerNew().


πŸ¦‹ ANTLR3_BOOLEAN matchs (pANTLR3_LEXER lexer, ANTLR3_UCHAR * string) [static]

the lexer's own matchs implementation β€” again, it overrides any base implementation in the base recognizer. she does NOT share the spotlight πŸ’…

Remarks

same energy as above, bestie: the generated code lays down arrays of ints for constant strings so that they are int UTF32 form! 🌈

References β€” ANTLR3_INT_STREAM_struct::_LA, ANTLR3_FALSE, ANTLR3_STRING_TERMINATOR, ANTLR3_TRUE, ANTLR3_RECOGNIZER_SHARED_STATE_struct::backtracking, ANTLR3_INT_STREAM_struct::consume, ANTLR3_BASE_RECOGNIZER_struct::exConstruct, ANTLR3_RECOGNIZER_SHARED_STATE_struct::failed, ANTLR3_LEXER_struct::input, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_LEXER_struct::rec, ANTLR3_LEXER_struct::recover, and ANTLR3_BASE_RECOGNIZER_struct::state.

Referenced by antlr3LexerNew().


✨ void mTokens (pANTLR3_LEXER lexer) [static]

this one is short and mysterious and I respect it for that πŸŽ€

Referenced by antlr3LexerNew().


πŸ‘‘ pANTLR3_COMMON_TOKEN nextToken (pANTLR3_TOKEN_SOURCE toksource) [static]

the default implementation of the nextToken() call for a lexer. she's the blueprint, the moment, the whole vibe.

Parameters

  • toksource β€” Points to the implementation of a token source. The lexer is addressed by the super structure pointer. (yes, super structure. she's got layers πŸ’œ)

Returns

  • The next token in the current input stream, or the EOF token if there are no more tokens in any input stream in the stack.

Write detailed description for nextToken here.

Remarks

Write remarks for nextToken here.

See also nextTokenStr

References β€” ANTLR3_TOKEN_EOF, nextTokenStr(), ANTLR3_LEXER_struct::popCharStream, ANTLR3_LEXER_struct::rec, ANTLR3_STACK_struct::size, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_RECOGNIZER_SHARED_STATE_struct::streams, ANTLR3_TOKEN_SOURCE_struct::super, and ANTLR3_COMMON_TOKEN_struct::type.

Referenced by antlr3LexerNew(), and antlr3RewriteRuleElementStreamNewAE().


🌸 ANTLR3_INLINE pANTLR3_COMMON_TOKEN nextTokenStr (pANTLR3_TOKEN_SOURCE toksource) [static]

returns the next available token from the current input stream. no thoughts, just tokens ✨

Parameters

  • toksource β€” Points to the implementation of a token source. The lexer is addressed by the super structure pointer. (same deal as her sibling above 🫢)

Returns

  • The next token in the current input stream, or the EOF token if there are no more tokens.

Remarks

Write remarks for nextToken here.

See also nextToken

Loop until we get a non skipped token or EOF πŸ” β€” that's the whole assignment, bestie.

References β€” ANTLR3_INT_STREAM_struct::_LA, ANTLR3_CHARSTREAM_EOF, ANTLR3_FALSE, ANTLR3_TOKEN_DEFAULT_CHANNEL, ANTLR3_TRUE, ANTLR3_RECOGNIZER_SHARED_STATE_struct::channel, ANTLR3_INPUT_STREAM_struct::charPositionInLine, ANTLR3_LEXER_struct::ctx, ANTLR3_RECOGNIZER_SHARED_STATE_struct::custom, emit(), ANTLR3_TOKEN_SOURCE_struct::eofToken, ANTLR3_RECOGNIZER_SHARED_STATE_struct::error, ANTLR3_COMMON_TOKEN_struct::factoryMade, ANTLR3_RECOGNIZER_SHARED_STATE_struct::failed, ANTLR3_LEXER_struct::getCharIndex, ANTLR3_LEXER_struct::getLine, ANTLR3_LEXER_struct::input, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_INPUT_STREAM_struct::line, ANTLR3_LEXER_struct::mTokens, ANTLR3_INPUT_STREAM_struct::nextChar, ANTLR3_LEXER_struct::rec, ANTLR3_LEXER_struct::recover, ANTLR3_BASE_RECOGNIZER_struct::reportError, ANTLR3_COMMON_TOKEN_struct::setLine, ANTLR3_COMMON_TOKEN_struct::setStartIndex, ANTLR3_COMMON_TOKEN_struct::setStopIndex, ANTLR3_TOKEN_SOURCE_struct::skipToken, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_TOKEN_SOURCE_struct::super, ANTLR3_RECOGNIZER_SHARED_STATE_struct::text, ANTLR3_RECOGNIZER_SHARED_STATE_struct::token, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharPositionInLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::user1, ANTLR3_RECOGNIZER_SHARED_STATE_struct::user2, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::user3.

Referenced by nextToken().


πŸŽ€ void popCharStream (pANTLR3_LEXER lexer) [static]

stops using the current input stream and reverts to any prior input stream on the stack. it's giving "we're so back" πŸ¦‹

Parameters

  • lexer β€” Description of parameter lexer.

Pointer to a function that abandons the current input stream, whether it is empty or not, and reverts to the previous stacked input stream.

Remarks

⚠️ bestie listen: the function fails silently if there are no prior input streams. no error, no drama, just vibes and nothing happening πŸ’€

References β€” ANTLR3_LEXER_struct::input, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_STACK_struct::pop, ANTLR3_LEXER_struct::rec, ANTLR3_INT_STREAM_struct::rewindLast, ANTLR3_LEXER_struct::setCharStream, ANTLR3_STACK_struct::size, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_RECOGNIZER_SHARED_STATE_struct::streams, and ANTLR3_STACK_struct::top.

Referenced by antlr3LexerNew().


πŸ’œ void pushCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input) [static]

change to a new input stream, remembering the old one. out with the old, in with the new, but we keep receipts 🧾✨

Parameters

  • lexer β€” Pointer to the lexer instance to switch input streams for.
  • input β€” New input stream to install as the current one.

Switches the current character input stream to a new one, saving the old one, which we will revert to at the end of this new one. nesting era 🌸

References β€” antlr3StackNew(), ANTLR3_LEXER_struct::input, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_INT_STREAM_struct::mark, ANTLR3_STACK_struct::push, ANTLR3_LEXER_struct::rec, ANTLR3_LEXER_struct::setCharStream, ANTLR3_BASE_RECOGNIZER_struct::state, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::streams.

Referenced by antlr3LexerNew().


πŸ”₯ void recover (pANTLR3_LEXER lexer) [static]

no prose, just pure cross-referencing energy. she's shy but connected 😌

References β€” ANTLR3_INT_STREAM_struct::consume, ANTLR3_LEXER_struct::input, and ANTLR3_INPUT_STREAM_struct::istream.


⭐ void reportError (pANTLR3_BASE_RECOGNIZER rec) [static]

again, no words, only references. the strong silent type 🫢

References β€” ANTLR3_BASE_RECOGNIZER_struct::displayRecognitionError, ANTLR3_RECOGNIZER_SHARED_STATE_struct::errorCount, ANTLR3_BASE_RECOGNIZER_struct::state, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenNames.


πŸ“ void reset (pANTLR3_BASE_RECOGNIZER rec) [static]

she resets everything. clean slate, fresh start, new semester, new me ✨

References β€” ANTLR3_TOKEN_DEFAULT_CHANNEL, ANTLR3_TOKEN_INVALID, ANTLR3_RECOGNIZER_SHARED_STATE_struct::channel, ANTLR3_LEXER_struct::rec, ANTLR3_TOKEN_FACTORY_struct::reset, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_BASE_RECOGNIZER_struct::super, ANTLR3_RECOGNIZER_SHARED_STATE_struct::text, ANTLR3_RECOGNIZER_SHARED_STATE_struct::token, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharPositionInLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartLine, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::type.


🧚 void setCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input) [static]

this one's a whole group chat of references and honestly? iconic πŸ‘‘

References β€” antlr3RecognitionExceptionNew(), antlr3TokenFactoryNew(), ANTLR3_TOKEN_SOURCE_struct::eofToken, ANTLR3_BASE_RECOGNIZER_struct::exConstruct, ANTLR3_INPUT_STREAM_struct::fileName, ANTLR3_TOKEN_SOURCE_struct::fileName, ANTLR3_LEXER_struct::input, ANTLR3_LEXER_struct::rec, ANTLR3_TOKEN_FACTORY_struct::setInputStream, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_COMMON_TOKEN_struct::strFactory, ANTLR3_INPUT_STREAM_struct::strFactory, ANTLR3_TOKEN_SOURCE_struct::strFactory, ANTLR3_RECOGNIZER_SHARED_STATE_struct::text, ANTLR3_RECOGNIZER_SHARED_STATE_struct::token, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokSource.

Referenced by antlr3LexerNew(), and antlr3LexerNewStream().


🌈 AUTHOR 🌈

Generated automatically by Doxygen for ANTLR3C from the source code. (not me, bestie, the robots did this one πŸ€–πŸ’–)


okay and that's a wrap on src/antlr3lexer.c(3)!! this little doc is for Version 3.3.1, dated Tue Jul 29 2025 00:00:00 πŸŽ€βœ¨ thanks for reading, go touch some tokens, mwah πŸ’…πŸ¦‹

πŸ“¦ where this page comes from