antlr3input.h man page

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.
struct ANTLR3_LEX_STATE_struct
Structure for track lex input states as part of mark() and rewind() of lexer.

Typedefs

typedef struct ANTLR3_INPUT_STREAM_struct ANTLR3_INPUT_STREAM
Master context structure for an ANTLR3 C runtime based input stream.
typedef struct ANTLR3_LEX_STATE_struct ANTLR3_LEX_STATE
Structure for track lex input states as part of mark() and rewind() 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)

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.

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 consume for 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)

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.

Referenced By

antlr38BitSetupStream(3), antlr3EBCDICSetupStream(3), antlr3GenericSetupStream(3), antlr3UTF16SetupStream(3), antlr3UTF32SetupStream(3) and antlr3UTF8SetupStream(3) are aliases of antlr3input.h(3).

Tue Oct 4 2016 Version 3.3.1 ANTLR3C