Base functions to initialize and manipulate a UCS2 input stream. More...
#include <antlr3input.h>
Functions | |
static void | antlr3UCS2Consume (pANTLR3_INT_STREAM is) |
Consume the next character in an 8 bit ASCII input stream. | |
static ANTLR3_MARKER | antlr3UCS2Index (pANTLR3_INT_STREAM is) |
Calculate the current index in the output stream. | |
static ANTLR3_UCHAR | antlr3UCS2LA (pANTLR3_INT_STREAM is, ANTLR3_INT32 la) |
Return the input element assuming an 8 bit ascii input. | |
static void | antlr3UCS2Seek (pANTLR3_INT_STREAM is, ANTLR3_MARKER seekPoint) |
Rewind the lexer input to the state specified by the supplied mark. | |
void | antlr3UCS2SetupStream (pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 type) |
Common function to setup function interface for a 16 bit "UCS2" input stream. | |
static pANTLR3_STRING | antlr3UCS2Substr (pANTLR3_INPUT_STREAM input, ANTLR3_MARKER start, ANTLR3_MARKER stop) |
Return a substring of the ucs2 (16 bit) input stream in newly allocated memory. |
Base functions to initialize and manipulate a UCS2 input stream.
static void antlr3UCS2Consume | ( | pANTLR3_INT_STREAM | is ) | [static] |
Consume the next character in an 8 bit ASCII input stream.
input | Input stream context pointer |
References ANTLR3_INPUT_STREAM_struct::charPositionInLine, ANTLR3_INPUT_STREAM_struct::currentLine, ANTLR3_INPUT_STREAM_struct::data, ANTLR3_INPUT_STREAM_struct::line, ANTLR3_INPUT_STREAM_struct::newlineChar, ANTLR3_INPUT_STREAM_struct::nextChar, ANTLR3_INPUT_STREAM_struct::sizeBuf, and ANTLR3_INT_STREAM_struct::super.
Referenced by antlr3UCS2SetupStream().
static ANTLR3_MARKER antlr3UCS2Index | ( | pANTLR3_INT_STREAM | is ) | [static] |
Calculate the current index in the output stream.
[in] | input | Input stream context pointer |
References ANTLR3_INPUT_STREAM_struct::nextChar, and ANTLR3_INT_STREAM_struct::super.
Referenced by antlr3UCS2SetupStream().
static ANTLR3_UCHAR antlr3UCS2LA | ( | pANTLR3_INT_STREAM | is, |
ANTLR3_INT32 | la | ||
) | [static] |
Return the input element assuming an 8 bit ascii input.
[in] | input | Input stream context pointer |
[in] | la | 1 based offset of next input stream element |
References ANTLR3_CHARSTREAM_EOF, ANTLR3_INPUT_STREAM_struct::data, ANTLR3_INPUT_STREAM_struct::nextChar, ANTLR3_INPUT_STREAM_struct::sizeBuf, and ANTLR3_INT_STREAM_struct::super.
Referenced by antlr3UCS2SetupStream().
static void antlr3UCS2Seek | ( | pANTLR3_INT_STREAM | is, |
ANTLR3_MARKER | seekPoint | ||
) | [static] |
Rewind the lexer input to the state specified by the supplied mark.
[in] | input | Input stream context pointer |
References ANTLR3_INT_STREAM_struct::consume, ANTLR3_INPUT_STREAM_struct::nextChar, and ANTLR3_INT_STREAM_struct::super.
Referenced by 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().
static pANTLR3_STRING antlr3UCS2Substr | ( | pANTLR3_INPUT_STREAM | input, |
ANTLR3_MARKER | start, | ||
ANTLR3_MARKER | stop | ||
) | [static] |
Return a substring of the ucs2 (16 bit) input stream in newly allocated memory.
input | Input stream context pointer |
start | Offset in input stream where the string starts |
stop | Offset in the input stream where the string ends. |
References ANTLR3_UINT32_CAST, ANTLR3_STRING_FACTORY_struct::newPtr, and ANTLR3_INPUT_STREAM_struct::strFactory.
Referenced by antlr3UCS2SetupStream().