ANTLR3_INT_STREAM_struct(3)
β¨ ANTLR3_INT_STREAM_struct β¨
Okay bestie, this is the ANTLR3_INT_STREAM_struct manual page from the ANTLR3C section 3. It's giving interface struct energy, and we're about to break it down. No cap. π
πΈ NAME πΈ
ANTLR3_INT_STREAM_struct β the struct that defines the integer stream interface, fr fr. π¦
π SYNOPSIS π
#include <antlr3intstream.h>
π¦ Data Fields π¦
ANTLR3_UINT32(* _LA )(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_INT32 i)β Get anANTLR3_UINT32at the current input pointer +iahead, wherei=1means the nextANTLR3_UINT32. It's the peek-into-the-future move, but make it tokens. πβ¨ANTLR3_UINT32 cachedSizeβ Because the indirect call, though small in individual cases, can mount up if there are thousands of tokens (very large input streams), callers ofsizecan optionally use this cached size field. It's the "already counted, bestie" shortcut. ππvoid(* consume )(struct ANTLR3_INT_STREAM_struct *intStream)β Consume the nextANTR3_UINT32in the stream. And yes, that'sANTR3_UINT32exactly β original spelling, no autocorrect, we respect the typo. πvoid(* free )(struct ANTLR3_INT_STREAM_struct *stream)β Frees any resources that were allocated for the implementation of this interface. Cleanup era, we love to see it. π§Ήπ«ΆpANTLR3_STRING(* getSourceName )(struct ANTLR3_INT_STREAM_struct *intStream)β No extra description in the original, but the name isgetSourceName, so it gets the source name. Iconic, honestly. π·οΈANTLR3_MARKER(* index )(struct ANTLR3_INT_STREAM_struct *intStream)β Return the current input symbol index0..nwherenindicates the last symbol has been read. It's the "where am I" of the stream. πANTLR3_MARKER lastMarkerβ Last marker position allocated. That's the spot, periodt. π―ANTLR3_MARKER(* mark )(struct ANTLR3_INT_STREAM_struct *intStream)β Tell the stream to start buffering if it hasn't already. Like dropping a pin, but for parsing. πvoid(* release )(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_MARKER mark)β You may want to commit to a backtrack but don't want to force the stream to keep bookkeeping objects around for a marker that is no longer necessary. So release it, let it go. ποΈvoid(* rewind )(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_MARKER marker)β Reset the stream so that next call toindexwould returnmarker. It's the rewind button, but make it streamcore. βͺvoid(* rewindLast )(struct ANTLR3_INT_STREAM_struct *intStream)β Reset the stream to the last marker position, witouh destryoing the last marker position. Yes, "witouh destryoing" β original typo, preserved for the culture. ππvoid(* seek )(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_MARKER index)β Set the input cursor to the position indicated byindex. Teleportation, but for streams. β¨ANTLR3_UINT32(* size )(struct ANTLR3_INT_STREAM_struct *intStream)β Only makes sense for streams that buffer everything up probably, but might be useful to display the entire stream or for testing. It's the "how big is this" vibe check. πpANTLR3_STRING streamNameβ Potentially useful in error reporting and so on, this string is an identification of the input source. Name tag energy. π·οΈvoid * superβ Pointer to the super structure that contains this interface. It's the parent structure, the main character. πANTLR3_UINT32 typeβ Input stream type indicator. The type tag, the little label. π
β¨ Field Documentation β¨
Okay bestie, here's the whole field squad for ANTLR3_INT_STREAM_struct π. Every signature, every referenced-by receipt, every tiny detail β we're keeping all of it. No cap.
πΈ _LA
ANTLR3_UINT32(* ANTLR3_INT_STREAM_struct::_LA) (struct
ANTLR3_INT_STREAM_struct *intStream, ANTLR3_INT32 i)
Gets the ANTLR3_UINT32 at the current input pointer plus i ahead, where i=1 means the next ANTLR3_UINT32. It's giving lookahead energy β¨.
Referenced by: antlr38BitLT(), antlr38BitSetUcaseLA(), antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3dfapredict(), antlr3EBCDICSetupStream(), antlr3GenericSetupStream(), antlr3RecognitionExceptionNew(), antlr3UTF16Seek(), antlr3UTF16SetupStream(), antlr3UTF32Seek(), antlr3UTF32SetupStream(), antlr3UTF8SetupStream(), consumeUntil(), consumeUntilSet(), match(), matchc(), matchRange(), matchs(), mismatchIsMissingToken(), mismatchIsUnwantedToken(), nextTokenStr(), recoverFromMismatchedElement(), and setDebugListener().
π
cachedSize
ANTLR3_UINT32 ANTLR3_INT_STREAM_struct::cachedSize
Because the indirect call, though small in individual cases, can mount up if there are thousands of tokens (very large input streams), callers of size can optionally use this cached size field. Lowkey a performance bestie π
.
Referenced by: fillBuffer(), size(), skipOffTokenChannels(), and tokLT().
π¦ consume
void(* ANTLR3_INT_STREAM_struct::consume) (struct ANTLR3_INT_STREAM_struct
*intStream)
Consumes the next 'ANTR3_UINT32' in the stream. Yes, the source literally says ANTR3_UINT32 β we keep it exact, bestie π.
Referenced by: antlr38BitSeek(), antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3dfapredict(), antlr3GenericSetupStream(), antlr3UTF16Seek(), antlr3UTF16SetupStream(), antlr3UTF32Seek(), antlr3UTF32SetupStream(), antlr3UTF8SetupStream(), consumeUntil(), consumeUntilSet(), match(), matchAny(), matchAny(), matchc(), matchRange(), matchs(), recover(), recover(), recoverFromMismatchedToken(), and setDebugListener().
π§ free
void(* ANTLR3_INT_STREAM_struct::free) (struct ANTLR3_INT_STREAM_struct
*stream)
Frees any resources that were allocated for the implementation of this interface. Usually this is just releasing the memory allocated for the structure itself, but it may of course do anything it needs to so long as it does not stamp on anything else. Cleanup queen behavior π§Ήβ¨.
Referenced by: antlr3CommonTreeNodeStreamFree(), antlr3CTSFree(), antlr3InputClose(), and antlr3IntStreamNew().
π getSourceName
pANTLR3_STRING(* ANTLR3_INT_STREAM_struct::getSourceName) (struct
ANTLR3_INT_STREAM_struct *intStream)
No description in the source, just the receipts π§Ύ. Still iconic though.
Referenced by: antlr3CommonTokenStreamNew(), and antlr3GenericSetupStream().
π index
ANTLR3_MARKER(* ANTLR3_INT_STREAM_struct::index) (struct
ANTLR3_INT_STREAM_struct *intStream)
Returns the current input symbol index 0..n, where n indicates the last symbol has been read.
Referenced by: alreadyParsedRule(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3GenericSetupStream(), antlr3RecognitionExceptionNew(), antlr3UTF16SetupStream(), antlr3UTF32SetupStream(), consumeInitialHiddenTokens(), dbgConsume(), dbgMark(), getCharIndex(), mark(), mark(), memoize(), recover(), and tokLT().
β lastMarker
ANTLR3_MARKER ANTLR3_INT_STREAM_struct::lastMarker
Last marker position allocated. That's it, that's the field π.
Referenced by: antlr38BitMark(), antlr38BitRewindLast(), dbgMark(), dbgRewindLast(), mark(), mark(), reset(), rewindLast(), and rewindLast().
π₯ mark
ANTLR3_MARKER(* ANTLR3_INT_STREAM_struct::mark) (struct
ANTLR3_INT_STREAM_struct *intStream)
Tells the stream to start buffering if it hasn't already. Returns the current input position, index(), or some other marker so that when it's passed to rewind() you get back to the same spot. rewind(mark()) should not affect the input cursor. No cap.
Referenced by: antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3dfapredict(), antlr3GenericSetupStream(), pushCharStream(), setDebugListener(), and synpred().
π release
void(* ANTLR3_INT_STREAM_struct::release) (struct ANTLR3_INT_STREAM_struct
*intStream, ANTLR3_MARKER mark)
You may want to commit to a backtrack but don't want to force the stream to keep bookkeeping objects around for a marker that is no longer necessary. This has the same behavior as rewind() except it releases resources without the backward seek. It's giving "let it go" energy π
.
Referenced by: antlr38BitRewind(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and antlr3GenericSetupStream().
π¦ rewind
void(* ANTLR3_INT_STREAM_struct::rewind) (struct ANTLR3_INT_STREAM_struct
*intStream, ANTLR3_MARKER marker)
Resets the stream so that the next call to index would return marker. The marker will usually be index() but it doesn't have to be. It's just a marker to indicate what state the stream was in. This is essentially calling release() and seek(). If there are markers created after this marker argument, this routine must unroll them like a stack. Assume the state the stream was in when this marker was created. Rewind bestie, we love a backtrack π.
Referenced by: antlr38BitRewindLast(), antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3dfapredict(), antlr3GenericSetupStream(), dbgRewindLast(), rewindLast(), setDebugListener(), and synpred().
π§ rewindLast
void(* ANTLR3_INT_STREAM_struct::rewindLast) (struct
ANTLR3_INT_STREAM_struct *intStream)
Resets the stream to the last marker position, witouh destryoing the last marker position. (Yes, the typo is canon. We don't fix source text around here, bestie π.)
Referenced by: antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3GenericSetupStream(), popCharStream(), and setDebugListener().
π seek
void(* ANTLR3_INT_STREAM_struct::seek) (struct ANTLR3_INT_STREAM_struct
*intStream, ANTLR3_MARKER index)
Sets the input cursor to the position indicated by index. This is normally used to seek ahead in the input stream. No buffering is required to do this unless you know your stream will use seek to move backwards such as when backtracking.
This is different from rewind in its multi-directional requirement and in that its argument is strictly an input cursor (index).
For char streams, seeking forward must update the stream state such as line number. For seeking backwards, you will be presumably backtracking using the mark/rewind mechanism that restores state and so this method does not need to update state when seeking backwards.
Currently, this method is only used for efficient backtracking, but in the future it may be used for incremental parsing.
Referenced by: alreadyParsedRule(), antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3GenericSetupStream(), antlr3UTF16SetupStream(), antlr3UTF32SetupStream(), dbgRewindStream(), pop(), push(), rewindLast(), rewindMark(), rewindStream(), and setDebugListener().
πΈ size
ANTLR3_UINT32(* ANTLR3_INT_STREAM_struct::size) (struct
ANTLR3_INT_STREAM_struct *intStream)
Only makes sense for streams that buffer everything up probably, but might be useful to display the entire stream or for testing. It's giving "how big is this vibe" energy πβ¨.
Referenced by: antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), getTokensSet(), toString(), and toStringSS().
π·οΈ streamName
pANTLR3_STRING ANTLR3_INT_STREAM_struct::streamName
Potentially useful in error reporting and so on, this string is an identification of the input source. It may be NULL, so anything attempting to access it needs to check this and substitute a sensible default. So don't just raw-dog the pointer, bestie π.
Referenced by: antlr38BitGetSourceName(), antlr38BitReuse(), antlr3FileStreamNew(), and antlr3StringStreamNew().
π super
void* ANTLR3_INT_STREAM_struct::super
Pointer to the super structure that contains this interface. This will usually be a token stream or a tree stream. It's the parent energy π.
Referenced by: _LA(), _LA(), antlr38BitConsume(), antlr38BitIndex(), antlr38BitLA(), antlr38BitLA_ucase(), antlr38BitMark(), antlr38BitRelease(), antlr38BitRewind(), antlr38BitSeek(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3CTSFree(), antlr3EBCDICLA(), antlr3GenericSetupStream(), antlr3UTF16Consume(), antlr3UTF16ConsumeBE(), antlr3UTF16ConsumeLE(), antlr3UTF16Index(), antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), antlr3UTF16Seek(), antlr3UTF32Consume(), antlr3UTF32Index(), antlr3UTF32LA(), antlr3UTF32LABE(), antlr3UTF32LALE(), antlr3UTF32Seek(), antlr3UTF8Consume(), antlr3UTF8LA(), consume(), consume(), consumeInitialHiddenTokens(), dbgConsume(), dbgLA(), dbgMark(), dbgRewindLast(), dbgRewindStream(), getCurrentInputSymbol(), getCurrentInputSymbol(), getMissingSymbol(), getMissingSymbol(), getSourceName(), mark(), seek(), seek(), size(), size(), tindex(), and tindex().
π type
ANTLR3_UINT32 ANTLR3_INT_STREAM_struct::type
Input stream type indicator. Sometimes useful for error reporting etc. Vibe check on the stream type π .
Referenced by: antlr3CommonTokenStreamNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3GenericSetupStream(), and antlr3RecognitionExceptionNew().
β¨ Author β¨
Generated automatically by Doxygen for ANTLR3C from the source code. π
That's the whole page, bestie. Version 3.3.1, dated Tue Jul 29 2025 00:00:00, and it's the ANTLR3_INT_STREAM_struct(3) manual. Slay, periodt. π
β¨
π¦ 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