Defines the basic structures used to manipulate character streams from any input source. More...
#include <antlr3defs.h>
#include <antlr3string.h>
#include <antlr3commontoken.h>
#include <antlr3intstream.h>
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 |
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 | antlr3AsciiSetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 type) |
Common function to setup function interface for an 8 bit ASCII input stream. | |
void | antlr3GenericSetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 type) |
void | antlr3UCS2SetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 type) |
Common function to setup function interface for a 16 bit "UCS2" input stream. |
Defines the basic structures used to manipulate character streams from any input source.
The first implementation of this stream was ASCII 8 bit, but any character size and encoding can in theory be used, so long as they can return a 32 bit Integer representation of their characters amd efficiently mark and revert to specific offsets into their input streams.
typedef struct ANTLR3_LEX_STATE_struct ANTLR3_LEX_STATE |
Structure for track lex input states as part of mark() and rewind() of lexer.
void antlr3AsciiSetupStream | ( | pANTLR3_INPUT_STREAM | input, |
ANTLR3_UINT32 | type | ||
) |
Common function to setup function interface for an 8 bit ASCII input stream.
input | Input stream context pointer |
References antlr3GenericSetupStream(), antlr3StringFactoryNew(), and ANTLR3_INPUT_STREAM_struct::strFactory.
Referenced by antlr3AsciiFileStreamNew(), antlr3NewAsciiStringCopyStream(), and antlr3NewAsciiStringInPlaceStream().
void antlr3GenericSetupStream | ( | pANTLR3_INPUT_STREAM | input, |
ANTLR3_UINT32 | type | ||
) |
References ANTLR3_INT_STREAM_struct::_LA, ANTLR3_INPUT_STREAM_struct::_LT, ANTLR3_CHARSTREAM, antlr3AsciiConsume(), antlr3AsciiGetCharPosition(), antlr3AsciiGetLine(), antlr3AsciiGetLineBuf(), antlr3AsciiGetSourceName(), antlr3AsciiIndex(), antlr3AsciiLA(), antlr3AsciiLT(), antlr3AsciiMark(), antlr3AsciiRelease(), antlr3AsciiRewind(), antlr3AsciiRewindLast(), antlr3AsciiSeek(), antlr3AsciiSetCharPosition(), antlr3AsciiSetLine(), antlr3AsciiSetNewLineChar(), antlr3AsciiSetUcaseLA(), antlr3AsciiSize(), antlr3AsciiSubstr(), 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_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 antlr3AsciiSetupStream(), and antlr3UCS2SetupStream().
void antlr3UCS2SetupStream | ( | pANTLR3_INPUT_STREAM | input, |
ANTLR3_UINT32 | type | ||
) |
Common function to setup function interface for a 16 bit "UCS2" input stream.
input | Input stream context pointer |
References ANTLR3_INT_STREAM_struct::_LA, antlr3GenericSetupStream(), antlr3UCS2Consume(), antlr3UCS2Index(), antlr3UCS2LA(), antlr3UCS2Seek(), antlr3UCS2StringFactoryNew(), antlr3UCS2Substr(), ANTLR3_INPUT_STREAM_struct::charByteSize, ANTLR3_INT_STREAM_struct::consume, 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 antlr3NewUCS2StringInPlaceStream().