ANTLR3_TOKEN_STREAM_struct - Online Linux Manual PageSection : 3
Updated : Tue Jan 26 2021
Source : Version 3.3.1
Note : ANTLR3C

NAMEANTLR3_TOKEN_STREAM_struct − Definition of the ANTLR3 common token stream interface​.

SYNOPSIS
#include <antlr3tokenstream​.h>

Data FieldspANTLR3_COMMON_TOKEN(* _LT )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_INT32 k)
Get Token at current input pointer + i ahead where i=1 is next Token​.
pANTLR3_DEBUG_EVENT_LISTENER debugger
Debugger interface, is this is a debugging token stream​.
void(* free )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream)
Function that knows how to free the memory for an ANTLR3_TOKEN_STREAM​.
pANTLR3_COMMON_TOKEN(* get )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 i)
Get a token at an absolute index i; 0​.​.n-1​.
pANTLR3_TOKEN_SOURCE(* getTokenSource )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream)
Where is this stream pulling tokens from? This is not the name, but a pointer into an interface that contains a ANTLR3_TOKEN_SOURCE interface​.
ANTLR3_BOOLEAN initialStreamState
Indicates the initial stream state for dbgConsume()
pANTLR3_INT_STREAM istream
All input streams implement the ANTLR3_INT_STREAM interface​.​.​.
void(* setDebugListener )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Function that sets the token stream into debugging mode​.
void(* setTokenSource )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_TOKEN_SOURCE tokenSource)
Function that installs a token source for teh stream​.
void * super
Whatever is providing this interface needs a pointer to itself so that this can be passed back to it whenever the api functions are called​.
pANTLR3_TOKEN_SOURCE tokenSource
Pointer to the token source for this stream​.
pANTLR3_STRING(* toString )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream)
Return the text of all the tokens in the stream, as the old tramp in Leeds market used to say; 'Get the lot!'​.
pANTLR3_STRING(* toStringSS )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 start, ANTLR3_UINT32 stop)
Return the text of all tokens from start to stop, inclusive​.
pANTLR3_STRING(* toStringTT )(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_COMMON_TOKEN start, pANTLR3_COMMON_TOKEN stop)
Because the user is not required to use a token with an index stored in it, we must provide a means for two token objects themselves to indicate the start/end location​.

Detailed DescriptionDefinition of the ANTLR3 common token stream interface​. Remarks Much of the documentation for this interface is stolen from Ter's Java implementation​.

Field Documentation

pANTLR3_COMMON_TOKEN(* ANTLR3_TOKEN_STREAM_struct::_LT) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_INT32 k)Get Token at current input pointer + i ahead where i=1 is next Token​. i<0 indicates tokens in the past​. So -1 is previous token and -2 is two tokens ago​. LT(0) is undefined​. For i>=n, return Token​.EOFToken​. Return null for LT(0) and any index that results in an absolute address that is negative​. Referenced by _LA(), antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3RecognitionExceptionNew(), dbgConsume(), getMissingSymbol(), and setDebugListener()​.

pANTLR3_DEBUG_EVENT_LISTENER ANTLR3_TOKEN_STREAM_struct::debuggerDebugger interface, is this is a debugging token stream​. Referenced by antlr3CommonTokenDebugStreamSourceNew(), consumeInitialHiddenTokens(), dbgConsume(), dbgLA(), dbgMark(), dbgRewindLast(), dbgRewindStream(), and setDebugListener()​.

void(* ANTLR3_TOKEN_STREAM_struct::free) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream)Function that knows how to free the memory for an ANTLR3_TOKEN_STREAM​. Referenced by antlr3CTSFree(), and antlr3TokenStreamNew()​.

pANTLR3_COMMON_TOKEN(* ANTLR3_TOKEN_STREAM_struct::get) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 i)Get a token at an absolute index i; 0​.​.n-1​. This is really only needed for profiling and debugging and token stream rewriting​. If you don't want to buffer up tokens, then this method makes no sense for you​. Naturally you can't use the rewrite stream feature​. I believe DebugTokenStream can easily be altered to not use this method, removing the dependency​. Referenced by antlr3CommonTokenStreamNew(), consumeInitialHiddenTokens(), dbgConsume(), getTokensSet(), and toStringSS()​.

pANTLR3_TOKEN_SOURCE(* ANTLR3_TOKEN_STREAM_struct::getTokenSource) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream)Where is this stream pulling tokens from? This is not the name, but a pointer into an interface that contains a ANTLR3_TOKEN_SOURCE interface​. The Token Source interface contains a pointer to the input stream and a pointer to a function that returns the next token​. Referenced by antlr3CommonTokenStreamNew(), and toStringSS()​.

ANTLR3_BOOLEAN ANTLR3_TOKEN_STREAM_struct::initialStreamStateIndicates the initial stream state for dbgConsume() Referenced by antlr3CommonTokenDebugStreamSourceNew(), consumeInitialHiddenTokens(), dbgConsume(), dbgLA(), dbgTokLT(), and setDebugListener()​.

pANTLR3_INT_STREAM ANTLR3_TOKEN_STREAM_struct::istreamAll input streams implement the ANTLR3_INT_STREAM interface​.​.​. Referenced by alreadyParsedRule(), antlr3CommonTokenDebugStreamSourceNew(), antlr3CommonTokenStreamNew(), antlr3CTSFree(), antlr3RecognitionExceptionNew(), consumeUntil(), consumeUntilSet(), dbgTokLT(), displayRecognitionError(), fillBuffer(), getTokensSet(), match(), matchAny(), memoize(), mismatch(), recover(), recoverFromMismatchedElement(), recoverFromMismatchedSet(), recoverFromMismatchedToken(), setDebugListener(), skipOffTokenChannels(), synpred(), tokLT(), toString(), and toStringSS()​.

void(* ANTLR3_TOKEN_STREAM_struct::setDebugListener) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_DEBUG_EVENT_LISTENER debugger)Function that sets the token stream into debugging mode​. Referenced by antlr3CommonTokenStreamNew(), and setDebugListener()​.

void(* ANTLR3_TOKEN_STREAM_struct::setTokenSource) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_TOKEN_SOURCE tokenSource)Function that installs a token source for teh stream​. Referenced by antlr3CommonTokenStreamNew(), and antlr3CommonTokenStreamSourceNew()​.

void* ANTLR3_TOKEN_STREAM_struct::superWhatever is providing this interface needs a pointer to itself so that this can be passed back to it whenever the api functions are called​. Referenced by antlr3CommonTokenStreamNew(), antlr3CTSFree(), antlr3RecognitionExceptionNew(), consume(), get(), getMissingSymbol(), seek(), size(), tindex(), tokLT(), toString(), and toStringSS()​.

pANTLR3_TOKEN_SOURCE ANTLR3_TOKEN_STREAM_struct::tokenSourcePointer to the token source for this stream​. Referenced by fillBuffer(), getTokenSource(), setTokenSource(), and tokLT()​.

pANTLR3_STRING(* ANTLR3_TOKEN_STREAM_struct::toString) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream)Return the text of all the tokens in the stream, as the old tramp in Leeds market used to say; 'Get the lot!'​. Referenced by antlr3CommonTokenStreamNew()​.

pANTLR3_STRING(* ANTLR3_TOKEN_STREAM_struct::toStringSS) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 start, ANTLR3_UINT32 stop)Return the text of all tokens from start to stop, inclusive​. If the stream does not buffer all the tokens then it can just return an empty ANTLR3_STRING or NULL; Grammars should not access $ruleLabel​.text in an action in that case​. Referenced by antlr3CommonTokenStreamNew(), toString(), and toStringTT()​.

pANTLR3_STRING(* ANTLR3_TOKEN_STREAM_struct::toStringTT) (struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_COMMON_TOKEN start, pANTLR3_COMMON_TOKEN stop)Because the user is not required to use a token with an index stored in it, we must provide a means for two token objects themselves to indicate the start/end location​. Most often this will just delegate to the other toString(int,int)​. This is also parallel with the pTREENODE_STREAM->toString(Object,Object)​. Referenced by antlr3CommonTokenStreamNew()​.

AuthorGenerated automatically by Doxygen for ANTLR3C from the source code​.
0
Johanes Gumabo
Data Size   :   33,016 byte
man-ANTLR3_TOKEN_STREAM_struct.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 174,940
Visitor ID   :     :  
Visitor IP   :   3.133.145.168   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.