antlr3input.h File Reference


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.

#include <antlr3defs.h>
#include <antlr3string.h>
#include <antlr3commontoken.h>
#include <antlr3intstream.h>
#include <antlr3convertutf.h>

Include dependency graph for antlr3input.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  ANTLR3_INPUT_STREAM_struct
 Master context structure for an ANTLR3 C runtime based input stream. More...
struct  ANTLR3_LEX_STATE_struct
 Structure for track lex input states as part of mark() and rewind() of lexer. More...

Typedefs

typedef struct
ANTLR3_INPUT_STREAM_struct 
ANTLR3_INPUT_STREAM
typedef struct
ANTLR3_LEX_STATE_struct 
ANTLR3_LEX_STATE

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)
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.

Typedef Documentation


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 consume for instance.

References antlr3StringFactoryNew(), ANTLR3_INPUT_STREAM_struct::encoding, and ANTLR3_INPUT_STREAM_struct::strFactory.

Referenced by setupInputStream().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void antlr3GenericSetupStream ( pANTLR3_INPUT_STREAM  input  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void antlr3UTF32SetupStream ( pANTLR3_INPUT_STREAM  input,
ANTLR3_BOOLEAN  machineBigEndian,
ANTLR3_BOOLEAN  inputBigEndian 
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Mon Nov 29 17:23:11 2010 for ANTLR3C by  doxygen 1.5.5