include/antlr3input.h(3)
π include/antlr3input.h β the ANTLR3C input stream header, bestie edition π
okay so this is include/antlr3input.h(3), a page from the ANTLR3C manual, and it's literally the file that defines the basic structures used to manipulate character streams from any input source. yes, any source. she's flexible like that. π
β¨ NAME β¨
include/antlr3input.h β Defines the basic structures used to manipulate character streams from any input source.
πΈ SYNOPSIS πΈ
#include <antlr3defs.h>
#include <antlr3string.h>
#include <antlr3commontoken.h>
#include <antlr3intstream.h>
#include <antlr3convertutf.h>
π Data Structures π
struct ANTLR3_INPUT_STREAM_structβ Master context structure for an ANTLR3 C runtime based input stream. the main character, honestly.struct ANTLR3_LEX_STATE_structβ Structure for track lex input states as part ofmark()andrewind()of lexer.
π¦ Typedefs π¦
typedef struct ANTLR3_INPUT_STREAM_struct ANTLR3_INPUT_STREAMβ Master context structure for an ANTLR3 C runtime based input stream. (yes bestie, the struct and the typedef share a vibe, that's the point)typedef struct ANTLR3_LEX_STATE_struct ANTLR3_LEX_STATEβ Structure for track lex input states as part ofmark()andrewind()of lexer.
π Functions π
void antlr38BitSetupStream (pANTLR3_INPUT_STREAM input)β Common function to setup function interface for an 8 bit input stream.void antlr3EBCDICSetupStream (pANTLR3_INPUT_STREAM input)β Common function to setup function interface for a EBCDIC input stream.void antlr3GenericSetupStream (pANTLR3_INPUT_STREAM input)β no description given, she's mysterious like that πvoid antlr3UTF16SetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN machineBigEndian, ANTLR3_BOOLEAN inputBigEndian)β Common function to setup function interface for a UTF16 or UCS2 input stream.void antlr3UTF32SetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN machineBigEndian, ANTLR3_BOOLEAN inputBigEndian)β Common function to setup function interface for a UTF3 input stream.void antlr3UTF8SetupStream (pANTLR3_INPUT_STREAM input)β Common function to setup function interface for a UTF8 input stream.
π Detailed Description π
Defines the basic structures used to manipulate character streams from any input source.
Any character size and encoding can in theory be used, so long as a set of functinos is provided that can return a 32 bit Integer representation of their characters amd efficiently mark and revert to specific offsets into their input streams.
(yes,functinosandamdare in there exactly like that, bestie β we do not correct the ancestors, we respect the ancestors π«Ά)
π Typedef Documentation π
typedef struct ANTLR3_LEX_STATE_struct ANTLR3_LEX_STATE
Structure for track lex input states as part of mark() and rewind() of lexer.
β¨ Function Documentation β¨
void antlr38BitSetupStream (pANTLR3_INPUT_STREAM input)
Common function to setup function interface for an 8 bit input stream.
Parameters
inputβ Input stream context pointer
Remarks
- Many of the 8 bit oriented file stream handling functions will be usable by any or at least some, other input streams. Therefore it is perfectly acceptable to call this function to install the 8Bit handler then override just those functions that would not work for the particular input encoding, such as
consumefor instance.
References antlr3StringFactoryNew(), ANTLR3_INPUT_STREAM_struct::encoding, and ANTLR3_INPUT_STREAM_struct::strFactory.
Referenced by setupInputStream().
void antlr3EBCDICSetupStream (pANTLR3_INPUT_STREAM input)
Common function to setup function interface for a EBCDIC input stream.
Parameters
inputβ Input stream context pointer
References ANTLR3_INT_STREAM_struct::_LA, antlr3EBCDICLA(), antlr3StringFactoryNew(), ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_INPUT_STREAM_struct::encoding, ANTLR3_INPUT_STREAM_struct::istream, and ANTLR3_INPUT_STREAM_struct::strFactory.
Referenced by setupInputStream().
void antlr3GenericSetupStream (pANTLR3_INPUT_STREAM input)
(no prose, just a lot of references β she's all receipts, no small talk π )
References ANTLR3_INT_STREAM_struct::_LA, ANTLR3_INPUT_STREAM_struct::_LT, antlr38BitConsume(), antlr38BitGetCharPosition(), antlr38BitGetLine(), antlr38BitGetLineBuf(), antlr38BitGetSourceName(), antlr38BitIndex(), antlr38BitLA(), antlr38BitLT(), antlr38BitMark(), antlr38BitRelease(), antlr38BitReuse(), antlr38BitRewind(), antlr38BitRewindLast(), antlr38BitSeek(), antlr38BitSetCharPosition(), antlr38BitSetLine(), antlr38BitSetNewLineChar(), antlr38BitSetUcaseLA(), antlr38BitSize(), antlr38BitSubstr(), ANTLR3_CHARSTREAM, antlr3InputClose(), antlr3InputReset(), antlr3IntStreamNew(), ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_INPUT_STREAM_struct::close, ANTLR3_INT_STREAM_struct::consume, ANTLR3_INPUT_STREAM_struct::free, ANTLR3_INPUT_STREAM_struct::getCharPositionInLine, ANTLR3_INPUT_STREAM_struct::getLine, ANTLR3_INPUT_STREAM_struct::getLineBuf, ANTLR3_INT_STREAM_struct::getSourceName, ANTLR3_INT_STREAM_struct::index, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_INT_STREAM_struct::mark, ANTLR3_INPUT_STREAM_struct::markers, ANTLR3_INT_STREAM_struct::release, ANTLR3_INPUT_STREAM_struct::reset, ANTLR3_INPUT_STREAM_struct::reuse, ANTLR3_INT_STREAM_struct::rewind, ANTLR3_INT_STREAM_struct::rewindLast, ANTLR3_INT_STREAM_struct::seek, ANTLR3_INPUT_STREAM_struct::setCharPositionInLine, ANTLR3_INPUT_STREAM_struct::setLine, ANTLR3_INPUT_STREAM_struct::SetNewLineChar, ANTLR3_INPUT_STREAM_struct::setUcaseLA, ANTLR3_INPUT_STREAM_struct::size, ANTLR3_INPUT_STREAM_struct::substr, ANTLR3_INT_STREAM_struct::super, and ANTLR3_INT_STREAM_struct::type.
Referenced by antlr3CreateFileStream(), and antlr3CreateStringStream().
void antlr3UTF16SetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN machineBigEndian, ANTLR3_BOOLEAN inputBigEndian)
Common function to setup function interface for a UTF16 or UCS2 input stream.
Parameters
inputβ Input stream context pointer
Remarks
- Strictly speaking, there is no such thing as a UCS2 input stream as the term tends to confuse the notions of character encoding, unicode and so on. UCS2 is essentially UTF16 without any surrogates and so the standard UTF16 input stream is able to handle it without any special code.
References ANTLR3_INT_STREAM_struct::_LA, ANTLR3_FALSE, ANTLR3_TRUE, antlr3StringFactoryNew(), antlr3UTF16Consume(), antlr3UTF16ConsumeBE(), antlr3UTF16ConsumeLE(), antlr3UTF16Index(), antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), antlr3UTF16Seek(), antlr3UTF16Substr(), ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_INT_STREAM_struct::consume, ANTLR3_INPUT_STREAM_struct::encoding, ANTLR3_INT_STREAM_struct::index, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_INT_STREAM_struct::seek, ANTLR3_INPUT_STREAM_struct::strFactory, and ANTLR3_INPUT_STREAM_struct::substr.
Referenced by setupInputStream().
void antlr3UTF32SetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN machineBigEndian, ANTLR3_BOOLEAN inputBigEndian)
Common function to setup function interface for a UTF3 input stream.
Parameters
inputβ Input stream context pointer
References ANTLR3_INT_STREAM_struct::_LA, ANTLR3_FALSE, ANTLR3_TRUE, antlr3StringFactoryNew(), antlr3UTF32Consume(), antlr3UTF32Index(), antlr3UTF32LA(), antlr3UTF32LABE(), antlr3UTF32LALE(), antlr3UTF32Seek(), antlr3UTF32Substr(), ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_INT_STREAM_struct::consume, ANTLR3_INPUT_STREAM_struct::encoding, ANTLR3_INT_STREAM_struct::index, ANTLR3_INPUT_STREAM_struct::istream, ANTLR3_INT_STREAM_struct::seek, ANTLR3_INPUT_STREAM_struct::strFactory, and ANTLR3_INPUT_STREAM_struct::substr.
Referenced by setupInputStream().
void antlr3UTF8SetupStream (pANTLR3_INPUT_STREAM input)
Common function to setup function interface for a UTF8 input stream.
Parameters
inputβ Input stream context pointer
References ANTLR3_INT_STREAM_struct::_LA, antlr3StringFactoryNew(), antlr3UTF8Consume(), antlr3UTF8LA(), ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_INT_STREAM_struct::consume, ANTLR3_INPUT_STREAM_struct::encoding, ANTLR3_INPUT_STREAM_struct::istream, and ANTLR3_INPUT_STREAM_struct::strFactory.
Referenced by setupInputStream().
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code.
and that's the whole page, bestie β no notes, no gatekeeping, no cap. Version 3.3.1, dated Tue Jul 29 2025 00:00:00, straight from include/antlr3input.h(3). go forth and stream those characters β¨π¦π
π¦ 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