ANTLR3C  3.3.1
doxygen/atsections.dox File Reference
ANTLR3_BASE_TREE_ADAPTOR_struct::errorNode
void *(* errorNode)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, pANTLR3_TOKEN_STREAM tnstream, pANTLR3_COMMON_TOKEN startToken, pANTLR3_COMMON_TOKEN stopToken, pANTLR3_EXCEPTION e)
Definition: antlr3basetreeadaptor.h:84
ANTLR3_TOKENSTREAM
#define ANTLR3_TOKENSTREAM
Type indicator for a Token stream.
Definition: antlr3intstream.h:76
ANTLR3_UINT64
uint64_t ANTLR3_UINT64
Definition: antlr3defs.h:409
ANTLR3_VECTOR_struct::factoryMade
ANTLR3_BOOLEAN factoryMade
Indicates if the structure was made by a factory, in which case only the factory can free the memory ...
Definition: antlr3collections.h:259
ANTLR3_COMMON_TOKEN_STREAM_struct::setTokenTypeChannel
void(* setTokenTypeChannel)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 ttype, ANTLR3_UINT32 channel)
A simple filter mechanism whereby you can tell this token stream to force all tokens of type ttype to...
Definition: antlr3tokenstream.h:247
ANTLR3_INPUT_STREAM_struct
Master context structure for an ANTLR3 C runtime based input stream.
Definition: antlr3input.h:56
ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild
void(* addChild)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child)
Make childID a child of rootID.
Definition: antlr3debugeventlistener.h:377
antlr38BitConsume
static void antlr38BitConsume(pANTLR3_INT_STREAM is)
Consume the next character in an 8 bit input stream.
Definition: antlr3inputstream.c:315
pANTLR3_INPUT_STREAM
struct ANTLR3_INPUT_STREAM_struct * pANTLR3_INPUT_STREAM
Pointer to an instantiation of 'class' ANTLR3_INPUT_STREAM
Definition: antlr3interfaces.h:120
dbgTokLT
static pANTLR3_COMMON_TOKEN dbgTokLT(pANTLR3_TOKEN_STREAM ts, ANTLR3_INT32 k)
As per the normal tokLT but sends information to the debugger.
Definition: antlr3tokenstream.c:437
ANTLR3_ERR_NOFILE
#define ANTLR3_ERR_NOFILE
Definition: antlr3errors.h:50
ANTLR3_API
#define ANTLR3_API
Definition: antlr3defs.h:415
insertiUTF16
static pANTLR3_UINT8 insertiUTF16(pANTLR3_STRING string, ANTLR3_UINT32 point, ANTLR3_INT32 i)
Definition: antlr3string.c:1056
ANTLR3_TOKEN_SOURCE_struct::nextToken
pANTLR3_COMMON_TOKEN(* nextToken)(struct ANTLR3_TOKEN_SOURCE_struct *tokenSource)
Pointer to a function that returns the next token in the stream.
Definition: antlr3tokenstream.h:61
antlr3VectorGet
static void * antlr3VectorGet(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
Definition: antlr3collections.c:1231
ANTLR3_LEXER
struct ANTLR3_LEXER_struct ANTLR3_LEXER
antlr3Fread
ANTLR3_API ANTLR3_UINT32 antlr3Fread(ANTLR3_FDSC fdsc, ANTLR3_UINT32 count, void *data)
Definition: antlr3filestream.c:428
ANTLR3_HASH_ENTRY_struct
Internal structure representing an element in a hash bucket.
Definition: antlr3collections.h:62
recoverFromMismatchedElement
static ANTLR3_BOOLEAN recoverFromMismatchedElement(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST follow)
This code is factored out from mismatched token and mismatched set recovery.
Definition: antlr3baserecognizer.c:1619
getLookaheadSize
static ANTLR3_UINT32 getLookaheadSize(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Definition: antlr3commontreenodestream.c:882
ANTLR3_COMMON_TOKEN_STREAM_struct
Common token stream is an implementation of ANTLR_TOKEN_STREAM for the default parsers and recognizer...
Definition: antlr3tokenstream.h:191
ANTLR3_BASE_RECOGNIZER_struct::match
void *(* match)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Pointer to a function that matches the current input symbol against the supplied type.
Definition: antlr3baserecognizer.h:119
ANTLR3_TREE_WALK_STATE_struct::lookAhead
pANTLR3_BASE_TREE * lookAhead
Definition: antlr3commontreenodestream.h:325
ANTLR3_BASE_RECOGNIZER_struct::reset
void(* reset)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Reset the recognizer.
Definition: antlr3baserecognizer.h:350
ANTLR3_INPUT_STREAM_struct::charByteSize
ANTLR3_UINT8 charByteSize
Indicates the size, in 8 bit units, of a single character.
Definition: antlr3input.h:230
LT
static void LT(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t)
Definition: antlr3debughandlers.c:668
ANTLR3_INT_TRIE_struct::root
pANTLR3_INT_TRIE_NODE root
Definition: antlr3collections.h:377
toStringTree
static pANTLR3_STRING toStringTree(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:292
ANTLR3_STRING_struct::append
pANTLR3_UINT8(* append)(struct ANTLR3_STRING_struct *string, const char *newbit)
Pointer to function adds a raw char * type pointer in the default encoding for this string.
Definition: antlr3string.h:102
isLegalUTF8Sequence
ANTLR3_BOOLEAN isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd)
Definition: antlr3convertutf.c:319
pANTLR3_TREE_WALK_STATE
struct ANTLR3_TREE_WALK_STATE_struct * pANTLR3_TREE_WALK_STATE
Pointer to an instantiation of 'class' ANTLR3_TREE_WALK_STATE
Definition: antlr3interfaces.h:190
ANTLR3_HASH_KEY
struct ANTLR3_HASH_KEY_struct ANTLR3_HASH_KEY
charAtUTF16
static ANTLR3_UCHAR charAtUTF16(pANTLR3_STRING string, ANTLR3_UINT32 offset)
Definition: antlr3string.c:1324
antlr38BitRewind
static void antlr38BitRewind(pANTLR3_INT_STREAM is, ANTLR3_MARKER mark)
Rewind the lexer input to the state specified by the supplied mark.
Definition: antlr3inputstream.c:517
antlr3FileStreamNew
ANTLR3_API pANTLR3_INPUT_STREAM antlr3FileStreamNew(pANTLR3_UINT8 fileName, ANTLR3_UINT32 encoding)
Definition: antlr3filestream.c:54
popCharStream
static void popCharStream(pANTLR3_LEXER lexer)
Stops using the current input stream and reverts to any prior input stream on the stack.
Definition: antlr3lexer.c:610
pANTLR3_BASE_TREE
struct ANTLR3_BASE_TREE_struct * pANTLR3_BASE_TREE
Pointer to an instantiation of 'class' ANTLR3_BASE_TREE
Definition: antlr3interfaces.h:165
ANTLR3_HASH_TABLE
struct ANTLR3_HASH_TABLE_struct ANTLR3_HASH_TABLE
Structure that tracks a hash table.
ANTLR3_STACK_struct::top
void * top
Used for quick access to the top of the stack.
Definition: antlr3collections.h:207
pANTLR3_INT32
int32_t * pANTLR3_INT32
Definition: antlr3defs.h:403
antlr3Hash
ANTLR3_API ANTLR3_UINT32 antlr3Hash(void *key, ANTLR3_UINT32 keylen)
Given an input key of arbitrary length, return a hash value of it.
Definition: antlr3collections.c:834
ANTLR3_TOKEN_FACTORY
struct ANTLR3_TOKEN_FACTORY_struct ANTLR3_TOKEN_FACTORY
ANTLR3 Token factory interface to create lots of tokens efficiently rather than creating and freeing ...
ANTLR3_PARSER_struct::setTokenStream
void(* setTokenStream)(struct ANTLR3_PARSER_struct *parser, pANTLR3_TOKEN_STREAM)
A pointer to a function that installs a token stream for the parser.
Definition: antlr3parser.h:75
ANTLR3_TREE_NODE_STREAM_struct::setUniqueNavigationNodes
void(* setUniqueNavigationNodes)(struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_BOOLEAN uniqueNavigationNodes)
As we flatten the tree, we use UP, DOWN nodes to represent the tree structure.
Definition: antlr3commontreenodestream.h:96
antlr3LexerNewStream
ANTLR3_API pANTLR3_LEXER antlr3LexerNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3lexer.c:384
ANTLR3_BITSET_struct::numBits
ANTLR3_UINT32(* numBits)(struct ANTLR3_BITSET_struct *bitset)
Definition: antlr3bitset.h:101
_LA
static ANTLR3_UINT32 _LA(pANTLR3_INT_STREAM is, ANTLR3_INT32 i)
Definition: antlr3tokenstream.c:800
ANTLR3_VECTOR_struct::internal
ANTLR3_VECTOR_ELEMENT internal[ANTLR3_VECTOR_INTERNAL_SIZE]
Many times, a vector holds just a few nodes in an AST and it is too much overhead to malloc the space...
Definition: antlr3collections.h:252
ANTLR3_TEXT_NONE
#define ANTLR3_TEXT_NONE
Definition: antlr3commontoken.h:96
ANTLR3_STRING_struct::encoding
ANTLR3_UINT8 encoding
Occasionally it is useful to know what the encoding of the string actually is, hence it is stored her...
Definition: antlr3string.h:81
ANTLR3_HASH_ENUM_struct::bucket
ANTLR3_UINT32 bucket
Definition: antlr3collections.h:165
ANTLR3_TOKEN_SOURCE_struct::fileName
pANTLR3_STRING fileName
When the token source is constructed, it is populated with the file name from whence the tokens were ...
Definition: antlr3tokenstream.h:92
ANTLR3_BASE_TREE_ADAPTOR_struct::createTokenFromToken
pANTLR3_COMMON_TOKEN(* createTokenFromToken)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, pANTLR3_COMMON_TOKEN fromToken)
Definition: antlr3basetreeadaptor.h:120
bitIndex
static ANTLR3_UINT8 bitIndex[256]
Array of left most significant bit positions for an 8 bit element provides an efficient way to find t...
Definition: antlr3collections.c:1752
antlr3RecognitionExceptionNew
ANTLR3_API void antlr3RecognitionExceptionNew(pANTLR3_BASE_RECOGNIZER recognizer)
Definition: antlr3baserecognizer.c:269
ANTLR3_CYCLIC_DFA
struct ANTLR3_CYCLIC_DFA_struct ANTLR3_CYCLIC_DFA
Definition of a cyclic dfa structure such that it can be initialized at compile time and have only a ...
ANTLR3_VECTOR_struct::count
ANTLR3_UINT32 count
Number of entries currently in the list;.
Definition: antlr3collections.h:243
getTreeSource
static pANTLR3_BASE_TREE getTreeSource(pANTLR3_TREE_NODE_STREAM tns)
Where is this stream pulling nodes from? This is not the name, but the object that provides node obje...
Definition: antlr3commontreenodestream.c:607
dbgCreateTypeTokenText
static pANTLR3_BASE_TREE dbgCreateTypeTokenText(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.c:806
intTrieAdd
static ANTLR3_BOOLEAN intTrieAdd(pANTLR3_INT_TRIE trie, ANTLR3_INTKEY key, ANTLR3_UINT32 type, ANTLR3_INTKEY intType, void *data, void(ANTLR3_CDECL *freeptr)(void *))
Add an entry into the INT trie.
Definition: antlr3collections.c:1953
ANTLR3_COMMON_TREE_NODE_STREAM_struct::previousNode
pANTLR3_BASE_TREE previousNode
Which node did we last visit? Used for LT(-1)
Definition: antlr3commontreenodestream.h:228
antlr3TreeNodeStreamFree
static void antlr3TreeNodeStreamFree(pANTLR3_TREE_NODE_STREAM tns)
Definition: antlr3commontreenodestream.c:110
nextTokenStr
static ANTLR3_INLINE pANTLR3_COMMON_TOKEN nextTokenStr(pANTLR3_TOKEN_SOURCE toksource)
Returns the next available token from the current input stream.
Definition: antlr3lexer.c:217
ANTLR3_INT_TRIE_struct
Structure that defines an ANTLR3_INT_TRIE.
Definition: antlr3collections.h:376
pushCharStream
static void pushCharStream(pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input)
Change to a new input stream, remembering the old one.
Definition: antlr3lexer.c:564
ANTLR3_TREE_NODE_STREAM_struct::_LT
pANTLR3_BASE_TREE(* _LT)(struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_INT32 k)
Get tree node at current input pointer + i ahead where i=1 is next node.
Definition: antlr3commontreenodestream.h:78
ConvertUTF32toUTF8
ConversionResult ConvertUTF32toUTF8(const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:402
bitMask
static ANTLR3_UINT64 bitMask(ANTLR3_UINT32 bitNumber)
Definition: antlr3bitset.c:476
ANTLR3_LEXER_struct::free
void(* free)(struct ANTLR3_LEXER_struct *lexer)
Pointer to a function that knows how to free the resources of a lexer.
Definition: antlr3lexer.h:184
ANTLR3_LEXER_struct::emit
pANTLR3_COMMON_TOKEN(* emit)(struct ANTLR3_LEXER_struct *lexer)
Pointer to a function that constructs a new token from the lexer stored information.
Definition: antlr3lexer.h:130
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::dup
void *(* dup)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream, void *el)
When constructing trees, sometimes we need to dup a token or AST subtree.
Definition: antlr3rewritestreams.h:126
ANTLR3_BOOLEAN
uint32_t ANTLR3_BOOLEAN
Definition: antlr3defs.h:412
dbgMark
static ANTLR3_MARKER dbgMark(pANTLR3_INT_STREAM is)
As per mark() but with a call to tell the debugger we are doing this.
Definition: antlr3tokenstream.c:846
ANTLR3_VECTOR_ELEMENT_struct
Definition: antlr3collections.h:221
getChildCount
static ANTLR3_UINT32 getChildCount(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3basetreeadaptor.c:890
ANTLR3_BASE_TREE_ADAPTOR_struct::setType
void(* setType)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, ANTLR3_UINT32 type)
Definition: antlr3basetreeadaptor.h:102
ANTLR3_COMMON_TREE_NODE_STREAM_struct::walkBackToMostRecentNodeWithUnvisitedChildren
void(* walkBackToMostRecentNodeWithUnvisitedChildren)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:287
setTokenBoundaries
static void setTokenBoundaries(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex)
Definition: antlr3debughandlers.c:1036
ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeToken
void(* consumeToken)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
An input token was consumed; matched by any kind of element.
Definition: antlr3debugeventlistener.h:139
ANTLR3_EXCEPTION_struct::charPositionInLine
ANTLR3_INT32 charPositionInLine
Character position in the line where the error occurred.
Definition: antlr3exception.h:177
ANTLR3_INPUT_STREAM_struct::istream
pANTLR3_INT_STREAM istream
Interfaces that provide streams must all provide a generic ANTLR3_INT_STREAM interface and an ANTLR3_...
Definition: antlr3input.h:61
ANTLR3_BASE_RECOGNIZER_struct::computeErrorRecoverySet
pANTLR3_BITSET(* computeErrorRecoverySet)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function to computer the error recovery set for the current rule.
Definition: antlr3baserecognizer.h:211
pANTLR3_INT16
int16_t * pANTLR3_INT16
Definition: antlr3defs.h:402
ANTLR3_COMMON_TOKEN_struct
The definition of an ANTLR3 common token structure, which all implementations of a token stream shoul...
Definition: antlr3commontoken.h:109
ack
static void ack(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:330
antlr3VectorDel
static void antlr3VectorDel(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
Definition: antlr3collections.c:1195
ANTLR3_TOKEN_FACTORY_struct::close
void(* close)(struct ANTLR3_TOKEN_FACTORY_struct *factory)
Pointer to a function the destroys the factory.
Definition: antlr3commontoken.h:359
antlr3UnbufTreeNodeStreamNewTree
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3UnbufTreeNodeStreamNewTree(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint)
ANTLR3_TREE_NODE_STREAM_struct::getTreeAdaptor
pANTLR3_BASE_TREE_ADAPTOR(* getTreeAdaptor)(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
What adaptor can tell me how to interpret/navigate nodes and trees.
Definition: antlr3commontreenodestream.h:88
ANTLR3_INPUT_STREAM_struct::setLine
void(* setLine)(struct ANTLR3_INPUT_STREAM_struct *input, ANTLR3_UINT32 line)
Pointer to function to set the current line number in the input stream.
Definition: antlr3input.h:193
antlr3UTF8SetupStream
void antlr3UTF8SetupStream(pANTLR3_INPUT_STREAM input)
Common function to setup function interface for a UTF8 input stream.
Definition: antlr3inputstream.c:1757
ANTLR3_COMMON_TOKEN_STREAM_struct::getTokensList
pANTLR3_LIST(* getTokensList)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 start, ANTLR3_UINT32 stop, pANTLR3_LIST list)
Function that returns all the tokens indicated by being a member of the supplied List.
Definition: antlr3tokenstream.h:276
ANTLR3_TREE_WALK_STATE_struct::previousNode
pANTLR3_BASE_TREE previousNode
Definition: antlr3commontreenodestream.h:323
antlr3debugeventlistener.h
The definition of all debugging events that a recognizer can trigger.
getTokensType
static pANTLR3_LIST getTokensType(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, ANTLR3_UINT32 stop, ANTLR3_UINT32 type)
Definition: antlr3tokenstream.c:786
ANTLR3_LEX_STATE_struct::line
ANTLR3_UINT32 line
The line number we are traversing in the input file.
Definition: antlr3input.h:255
antlr3BitsetToIntList
static pANTLR3_INT32 antlr3BitsetToIntList(pANTLR3_BITSET bitset)
Produce an integer list of all the bits that are turned on in this bitset.
Definition: antlr3bitset.c:645
destroy
static void destroy(pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string)
Definition: antlr3string.c:637
antlr3VectorResize
static ANTLR3_BOOLEAN antlr3VectorResize(pANTLR3_VECTOR vector, ANTLR3_UINT32 hint)
Definition: antlr3collections.c:1289
dupTreeTT
static pANTLR3_BASE_TREE dupTreeTT(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE parent)
Definition: antlr3basetreeadaptor.c:467
ANTLR3_COMMON_TOKEN_struct::setText8
void(* setText8)(struct ANTLR3_COMMON_TOKEN_struct *token, pANTLR3_UINT8 text)
Pointer to a function that 'might' be able to set the text associated with a token.
Definition: antlr3commontoken.h:242
ANTLR3_BASE_RECOGNIZER_struct::alreadyParsedRule
ANTLR3_BOOLEAN(* alreadyParsedRule)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_MARKER ruleIndex)
Pointer to function that determines whether the rule has parsed input at the current index in the inp...
Definition: antlr3baserecognizer.h:286
ANTLR3_PARSE_TREE_struct::getType
ANTLR3_UINT32(* getType)(struct ANTLR3_PARSE_TREE_struct *tree)
Return the type of this node.
Definition: antlr3parsetree.h:68
_LA
static ANTLR3_UINT32 _LA(pANTLR3_INT_STREAM is, ANTLR3_INT32 i)
Definition: antlr3commontreenodestream.c:631
antlr38BitSetNewLineChar
static void antlr38BitSetNewLineChar(pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 newlineChar)
Set the newline trigger character in the input stream to the supplied parameter.
Definition: antlr3inputstream.c:692
ANTLR3_INPUT_STREAM_struct::SetNewLineChar
void(* SetNewLineChar)(struct ANTLR3_INPUT_STREAM_struct *input, ANTLR3_UINT32 newlineChar)
Pointer to function to override the default newline character that the input stream looks for to trig...
Definition: antlr3input.h:217
consume
static void consume(pANTLR3_INT_STREAM is)
Move the input pointer to the next incoming token.
Definition: antlr3tokenstream.c:600
insertUTF16_UTF16
static pANTLR3_UINT8 insertUTF16_UTF16(pANTLR3_STRING string, ANTLR3_UINT32 point, const char *newbit)
Definition: antlr3string.c:1151
ANTLR3_INT_TRIE_NODE_struct::bitNum
ANTLR3_UINT32 bitNum
This is the left/right bit index for traversal along the nodes
Definition: antlr3collections.h:351
ANTLR3_HASH_TABLE_struct::allowDups
int allowDups
Indicates whether the table allows duplicate keys.
Definition: antlr3collections.h:107
ANTLR3_CYCLIC_DFA_struct::eot
const ANTLR3_INT32 *const eot
Definition: antlr3cyclicdfa.h:77
enterSubRule
static void enterSubRule(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Definition: antlr3debughandlers.c:581
ANTLR3_VECTOR_struct::remove
void *(* remove)(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)
Definition: antlr3collections.h:268
ANTLR3_TOKEN_SOURCE_struct::super
void * super
Whatever is supplying the token source interface, needs a pointer to itself so that this pointer can ...
Definition: antlr3tokenstream.h:85
antlr3SetCTAPI
ANTLR3_API void antlr3SetCTAPI(pANTLR3_COMMON_TREE tree)
Definition: antlr3commontree.c:308
setText
static void setText(pANTLR3_COMMON_TOKEN token, pANTLR3_STRING text)
Install the supplied text string as teh text for the token.
Definition: antlr3commontoken.c:474
ANTLR3_STRING_struct
Base string class tracks the allocations and provides simple string tracking functions.
Definition: antlr3string.h:52
ANTLR3_BASE_TREE_ADAPTOR_struct::getChild
void *(* getChild)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, ANTLR3_UINT32 i)
Definition: antlr3basetreeadaptor.h:109
dbgCreate
static pANTLR3_BASE_TREE dbgCreate(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_COMMON_TOKEN payload)
Definition: antlr3commontreeadaptor.c:272
dbgBecomeRootToken
static pANTLR3_BASE_TREE dbgBecomeRootToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, void *newRoot, pANTLR3_BASE_TREE oldRoot)
Definition: antlr3basetreeadaptor.c:745
ANTLR3_ENC_UTF16BE
#define ANTLR3_ENC_UTF16BE
Definition: antlr3defs.h:86
ANTLR3_TOKEN_UP
#define ANTLR3_TOKEN_UP
Imaginary token type to signal the end of a stream of child nodes.
Definition: antlr3commontoken.h:64
ANTLR3_STRING_struct::toInt32
ANTLR3_INT32(* toInt32)(struct ANTLR3_STRING_struct *string)
Pointer to a function that returns the integer representation of any numeric characters at the beginn...
Definition: antlr3string.h:184
recoverFromMismatchedToken
static void * recoverFromMismatchedToken(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Attempt to recover from a single missing or extra token.
Definition: antlr3baserecognizer.c:1432
antlr3CommonTreeNew
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew(void)
Definition: antlr3commontree.c:356
ANTLR3_COMMON_TOKEN_STREAM_struct::channelOverrides
pANTLR3_LIST channelOverrides
Override map of tokens.
Definition: antlr3tokenstream.h:217
toTreeNode
static pANTLR3_BASE_TREE toTreeNode(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream, void *element)
Ensure stream emits trees; tokens must be converted to AST nodes.
Definition: antlr3rewritestreams.c:738
ANTLR3_INT8
int8_t ANTLR3_INT8
Definition: antlr3defs.h:401
stringFree
static void ANTLR3_CDECL stringFree(pANTLR3_STRING string)
Definition: antlr3string.c:239
ANTLR3_LEXER_struct::getText
pANTLR3_STRING(* getText)(struct ANTLR3_LEXER_struct *lexer)
Pointer to function to return the text so far for the current token being generated.
Definition: antlr3lexer.h:179
ANTLR3_COMMON_TREE_NODE_STREAM_struct::markers
pANTLR3_VECTOR markers
Calls to mark() may be nested so we have to track a stack of them.
Definition: antlr3commontreenodestream.h:264
ANTLR3_BASE_TREE_ADAPTOR_struct::setText
void(* setText)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, pANTLR3_STRING t)
Definition: antlr3basetreeadaptor.h:106
getLine
static ANTLR3_UINT32 getLine(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:862
getMissingSymbol
static void * getMissingSymbol(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
Definition: antlr3treeparser.c:204
antlr3BitsetIsNil
static ANTLR3_BOOLEAN antlr3BitsetIsNil(pANTLR3_BITSET bitset)
Definition: antlr3bitset.c:604
ANTLR3_COMMON_TREE_NODE_STREAM_struct::adaptor
pANTLR3_BASE_TREE_ADAPTOR adaptor
Pointer to tree adaptor interface that manipulates/builds the tree.
Definition: antlr3commontreenodestream.h:208
nextTree
static pANTLR3_BASE_TREE nextTree(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Return the next element in the stream.
Definition: antlr3rewritestreams.c:568
ANTLR3_TOKEN_SOURCE_struct::strFactory
pANTLR3_STRING_FACTORY strFactory
Whoever is providing tokens, needs to provide a string factory too.
Definition: antlr3tokenstream.h:65
getTokenIndex
static ANTLR3_MARKER getTokenIndex(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:527
antlr3ExceptionFree
static void antlr3ExceptionFree(pANTLR3_EXCEPTION ex)
Frees up a chain of ANTLR3 exceptions.
Definition: antlr3exception.c:154
ANTLR3_COMMON_TOKEN_STREAM_struct::discardOffChannel
ANTLR3_BOOLEAN discardOffChannel
If this flag is set to ANTLR3_TRUE, then tokens that the stream sees that are not in the channel that...
Definition: antlr3tokenstream.h:234
pANTLR3_STRING_FACTORY
struct ANTLR3_STRING_FACTORY_struct * pANTLR3_STRING_FACTORY
Pointer to an instantiation of 'class' ANTLR3_STRING_FACTORY
Definition: antlr3interfaces.h:129
DFS
static void DFS(pANTLR3_TOPO topo, ANTLR3_UINT32 node)
Given a starting node, descend its dependent nodes (ones that it has edges to) until we find one with...
Definition: antlr3collections.c:2455
ANTLR3_RECOGNIZER_SHARED_STATE_struct
All the data elements required to track the current state of any recognizer (lexer,...
Definition: antlr3recognizersharedstate.h:58
ANTLR3_DEBUG_EVENT_LISTENER_struct::LTT
void(* LTT)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t)
The tree parser looked ahead.
Definition: antlr3debugeventlistener.h:314
dbgAddChildToken
static void dbgAddChildToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child)
Definition: antlr3basetreeadaptor.c:575
antlr38BitGetLine
static ANTLR3_UINT32 antlr38BitGetLine(pANTLR3_INPUT_STREAM input)
Return the line number as understood by the 8 bit input stream.
Definition: antlr3inputstream.c:621
ConvertUTF32toUTF8
ConversionResult ConvertUTF32toUTF8(const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:402
mark
static ANTLR3_MARKER mark(pANTLR3_INT_STREAM is)
Definition: antlr3tokenstream.c:837
ANTLR3_EXCEPTION_struct::token
void * token
Indicates what the current token/tree was when the error occurred.
Definition: antlr3exception.h:148
antlr3RewriteRuleSubtreeStreamNewAE
ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:373
newRawUTF16
static pANTLR3_STRING newRawUTF16(pANTLR3_STRING_FACTORY factory)
Definition: antlr3string.c:215
offsetsFromUTF8
static const UTF32 offsetsFromUTF8[6]
Magic values subtracted from a buffer value during UTF8 conversion.
Definition: antlr3inputstream.c:1797
ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory
pANTLR3_TOKEN_FACTORY tokFactory
The goal of all lexer rules being to create a token, then a lexer needs to build a token factory to c...
Definition: antlr3recognizersharedstate.h:147
antlr3TokenFactoryNew
ANTLR3_API pANTLR3_TOKEN_FACTORY antlr3TokenFactoryNew(pANTLR3_INPUT_STREAM input)
Definition: antlr3commontoken.c:92
ANTLR3_RECOGNIZER_SHARED_STATE_struct::failed
ANTLR3_BOOLEAN failed
In lieu of a return value, this indicates that a rule or token has failed to match.
Definition: antlr3recognizersharedstate.h:100
antlr3commontoken.h
Defines the interface for a common token.
ANTLR3_DEBUG_EVENT_LISTENER_struct::exitDecision
void(* exitDecision)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Definition: antlr3debugeventlistener.h:134
mismatch
static void mismatch(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Factor out what to do upon token mismatch so tree parsers can behave differently.
Definition: antlr3baserecognizer.c:642
antlr3ParserNewStreamDbg
ANTLR3_API pANTLR3_PARSER antlr3ParserNewStreamDbg(ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_DEBUG_EVENT_LISTENER dbg, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3parser.c:44
ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartLine
ANTLR3_INT32 tokenStartLine
The input line (where it makes sense) on which the first character of the current token resides.
Definition: antlr3recognizersharedstate.h:166
LB
static pANTLR3_BASE_TREE LB(pANTLR3_TREE_NODE_STREAM tns, ANTLR3_INT32 k)
Definition: antlr3commontreenodestream.c:551
ANTLR3_COMMON_TREE_NODE_STREAM_struct::lookAhead
pANTLR3_BASE_TREE * lookAhead
Buffer tree node stream for use with LT(i).
Definition: antlr3commontreenodestream.h:244
ANTLR3_LIST_struct::del
void(* del)(struct ANTLR3_LIST_struct *list, ANTLR3_INTKEY key)
Definition: antlr3collections.h:187
antlr3TopoNew
ANTLR3_API pANTLR3_TOPO antlr3TopoNew()
Allocate and initialize a new ANTLR3 topological sorter, which can be used to define edges that ident...
Definition: antlr3collections.c:2324
deleteChild
static void * deleteChild(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
Definition: antlr3basetree.c:250
antlr3UTF32LA
static ANTLR3_UCHAR antlr3UTF32LA(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming a UTF32 input in natural machine byte order.
Definition: antlr3inputstream.c:1674
antlr3HashPut
static ANTLR3_INT32 antlr3HashPut(pANTLR3_HASH_TABLE table, void *key, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Add the element pointer in to the table, based upon the hash of the provided key.
Definition: antlr3collections.c:594
ANTLR3_BASE_RECOGNIZER_struct::matchAny
void(* matchAny)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that matches the next token/char in the input stream regardless of what it actu...
Definition: antlr3baserecognizer.h:125
ANTLR3_TOKEN_EOF
#define ANTLR3_TOKEN_EOF
End of file token.
Definition: antlr3commontoken.h:73
_LT
static pANTLR3_BASE_TREE _LT(pANTLR3_TREE_NODE_STREAM tns, ANTLR3_INT32 k)
Get tree node at current input pointer + i ahead where i=1 is next node.
Definition: antlr3commontreenodestream.c:577
antlr3CommonTreeNodeStreamNew
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNew(pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint)
Definition: antlr3commontreenodestream.c:270
ANTLR3_TYPE_PARSER
#define ANTLR3_TYPE_PARSER
Type indicator for a parser recognizer.
Definition: antlr3baserecognizer.h:54
ANTLR3_RECOGNIZER_SHARED_STATE_struct::user2
ANTLR3_UINT32 user2
Definition: antlr3recognizersharedstate.h:188
ANTLR3_BASE_TREE_ADAPTOR_struct::nilNode
void *(* nilNode)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor)
Definition: antlr3basetreeadaptor.h:73
dbgLA
static ANTLR3_UINT32 dbgLA(pANTLR3_INT_STREAM is, ANTLR3_INT32 i)
As per _LA() but for debug mode.
Definition: antlr3tokenstream.c:822
ANTLR3_STRING_struct::insert
pANTLR3_UINT8(* insert)(struct ANTLR3_STRING_struct *string, ANTLR3_UINT32 point, const char *newbit)
Pointer to function that inserts the supplied string at the specified offset in the current string in...
Definition: antlr3string.h:115
pANTLR3_INT64
int64_t * pANTLR3_INT64
Definition: antlr3defs.h:404
ANTLR3_TOPO_struct::limit
ANTLR3_UINT32 limit
One more than the largest node index that is contained in edges/sorted.
Definition: antlr3collections.h:454
ANTLR3_PARSER_struct
This is the main interface for an ANTLR3 parser.
Definition: antlr3parser.h:48
ANTLR3_HASH_ENUM_struct::entry
pANTLR3_HASH_ENTRY entry
Definition: antlr3collections.h:169
release
static void release(pANTLR3_INT_STREAM is, ANTLR3_MARKER mark)
Definition: antlr3tokenstream.c:859
pANTLR3_TOPO
struct ANTLR3_TOPO_struct * pANTLR3_TOPO
Pointer to an instantiation of 'class' ANTLR3_TOPO.
Definition: antlr3interfaces.h:115
ANTLR3_COMMON_TREE_ADAPTOR_struct::baseAdaptor
ANTLR3_TREE_ADAPTOR baseAdaptor
Base interface implementation, embedded structure.
Definition: antlr3commontreeadaptor.h:56
ANTLR3_BASE_TREE_struct::free
void(* free)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:133
ANTLR3_EXCEPTION_struct::freeMessage
ANTLR3_BOOLEAN freeMessage
If set to ANTLR3_TRUE, this indicates that the message element of this structure should be freed by c...
Definition: antlr3exception.h:137
antlr3basetreeadaptor.h
Definition of the ANTLR3 base tree adaptor.
ANTLR3_BASE_TREE_struct::isNilNode
ANTLR3_BOOLEAN(* isNilNode)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:119
rewindMark
static void rewindMark(pANTLR3_INT_STREAM is, ANTLR3_MARKER marker)
Rewind the current state of the tree walk to the state it was in when mark() was called and it return...
Definition: antlr3commontreenodestream.c:688
ConvertUTF32toUTF16
ConversionResult ConvertUTF32toUTF16(const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:52
ANTLR3_BASE_TREE_ADAPTOR_struct::addChild
void(* addChild)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, void *child)
Definition: antlr3basetreeadaptor.h:79
ANTLR3_INPUT_STREAM
struct ANTLR3_INPUT_STREAM_struct ANTLR3_INPUT_STREAM
Master context structure for an ANTLR3 C runtime based input stream.
antlr3UTF16Consume
static void antlr3UTF16Consume(pANTLR3_INT_STREAM is)
Consume the next character in a UTF16 input stream.
Definition: antlr3inputstream.c:785
antlr38BitSetLine
static void antlr38BitSetLine(pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 line)
Set the current line number as understood by the input stream.
Definition: antlr3inputstream.c:661
pANTLR3_VECTOR
struct ANTLR3_VECTOR_struct * pANTLR3_VECTOR
Pointer to an instantiation of 'class' ANTLR3_VECTOR
Definition: antlr3interfaces.h:106
toStringSS
static pANTLR3_STRING toStringSS(pANTLR3_TOKEN_STREAM ts, ANTLR3_UINT32 start, ANTLR3_UINT32 stop)
Definition: antlr3tokenstream.c:535
makeDot
static pANTLR3_STRING makeDot(pANTLR3_BASE_TREE_ADAPTOR adaptor, void *theTree)
Produce a DOT specification for graphviz.
Definition: antlr3basetreeadaptor.c:359
pANTLR3_HASH_TABLE
struct ANTLR3_HASH_TABLE_struct * pANTLR3_HASH_TABLE
Pointer to an instantiation of 'class' ANTLR3_HASH_TABLE
Definition: antlr3interfaces.h:93
newFromToken
static pANTLR3_BASE_TREE newFromToken(pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontree.c:252
setTreeNodeStream
static void setTreeNodeStream(pANTLR3_TREE_PARSER parser, pANTLR3_COMMON_TREE_NODE_STREAM input)
Set the input stream and reset the parser.
Definition: antlr3treeparser.c:153
antlr3StackNew
ANTLR3_API pANTLR3_STACK antlr3StackNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:964
ANTLR3_COMMON_TREE_NODE_STREAM_struct::tnstream
pANTLR3_TREE_NODE_STREAM tnstream
Pointer to the tree node stream interface.
Definition: antlr3commontreenodestream.h:155
ANTLR3_INPUT_STREAM_struct::isAllocated
int isAllocated
Indicates if the data pointer was allocated by us, and so should be freed when the stream dies.
Definition: antlr3input.h:77
newPtrUTF16_UTF16
static pANTLR3_STRING newPtrUTF16_UTF16(pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Creates a new UTF16 string initialized with the UTF16 characters at the supplied ptr,...
Definition: antlr3string.c:562
ANTLR3_BASE_TREE_struct::freshenPACIndexes
void(* freshenPACIndexes)(struct ANTLR3_BASE_TREE_struct *tree, ANTLR3_UINT32 offset)
Definition: antlr3basetree.h:129
exitSubRule
static void exitSubRule(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Definition: antlr3debughandlers.c:592
ANTLR3_BASE_TREE_struct::getChildCount
ANTLR3_UINT32(* getChildCount)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:105
antlr3BitsetClone
static pANTLR3_BITSET antlr3BitsetClone(pANTLR3_BITSET inSet)
Definition: antlr3bitset.c:183
ANTLR3_DEBUG_EVENT_LISTENER_struct::free
void(* free)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Free up the resources allocated to this structure.
Definition: antlr3debugeventlistener.h:388
antlr3intstream.h
Defines the the class interface for an antlr3 INTSTREAM.
pANTLR3_VECTOR_ELEMENT
struct ANTLR3_VECTOR_ELEMENT_struct * pANTLR3_VECTOR_ELEMENT
ANTLR3_DEBUG_EVENT_LISTENER_struct::beginBacktrack
void(* beginBacktrack)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level)
Definition: antlr3debugeventlistener.h:176
ANTLR3_VECTOR_struct::elementsSize
ANTLR3_UINT32 elementsSize
Total number of entries in elements at any point in time.
Definition: antlr3collections.h:263
ANTLR3_INT_STREAM_struct::streamName
pANTLR3_STRING streamName
Potentially useful in error reporting and so on, this string is an identification of the input source...
Definition: antlr3intstream.h:104
ANTLR3_HASH_ENTRY_struct::keybase
ANTLR3_HASH_KEY keybase
Key that created this particular entry.
Definition: antlr3collections.h:65
antlr3SetVectorApi
ANTLR3_API void antlr3SetVectorApi(pANTLR3_VECTOR vector, ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:1078
ANTLR3_RECOGNIZER_SHARED_STATE_struct::ruleMemo
pANTLR3_INT_TRIE ruleMemo
ANTLR3_VECTOR of ANTLR3_LIST for rule memoizing.
Definition: antlr3recognizersharedstate.h:120
ANTLR3_ARBORETUM_struct::unTruc
ANTLR3_COMMON_TREE unTruc
Trick to initialize tokens and their API quickly, we set up this token when the factory is created,...
Definition: antlr3commontree.h:130
antlr3RewriteRuleSubtreeStreamNewAEV
ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:418
insertUTF16_8
static pANTLR3_UINT8 insertUTF16_8(pANTLR3_STRING string, ANTLR3_UINT32 point, const char *newbit)
Definition: antlr3string.c:1106
pANTLR3_COMMON_TREE
struct ANTLR3_COMMON_TREE_struct * pANTLR3_COMMON_TREE
Pointer to an instantiation of 'class' ANTLR3_COMMON_TREE
Definition: antlr3interfaces.h:169
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::cursor
ANTLR3_UINT32 cursor
Cursor 0..n-1.
Definition: antlr3rewritestreams.h:68
ANTLR3_COMMON_TREE_NODE_STREAM_struct::push
void(* push)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_INT32 index)
Definition: antlr3commontreenodestream.h:293
getType
static ANTLR3_UINT32 getType(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Dummy implementation - will be supplied by super class.
Definition: antlr3basetreeadaptor.c:845
ANTLR3_CYCLIC_DFA_struct::max
const ANTLR3_INT32 *const max
Definition: antlr3cyclicdfa.h:80
ANTLR3_BASE_TREE_struct::reuse
void(* reuse)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:131
ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeNode
void(* consumeNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Input for a tree parser is an AST, but we know nothing for sure about a node except its type and text...
Definition: antlr3debugeventlistener.h:308
ANTLR3_COMMON_TREE_struct::startIndex
ANTLR3_MARKER startIndex
Start token index that encases this tree.
Definition: antlr3commontree.h:56
ANTLR3_INT_TRIE
struct ANTLR3_INT_TRIE_struct ANTLR3_INT_TRIE
Structure that defines an ANTLR3_INT_TRIE.
ANTLR3_TREE_PARSER_struct::super
void * super
Pointer to any super class.
Definition: antlr3treeparser.h:50
sourceExhausted
@ sourceExhausted
Definition: antlr3convertutf.h:127
antlr3InputClose
static void antlr3InputClose(pANTLR3_INPUT_STREAM input)
Close down an input stream and free any memory allocated by it.
Definition: antlr3inputstream.c:203
nilNode
static pANTLR3_BASE_TREE nilNode(pANTLR3_BASE_TREE_ADAPTOR adaptor)
Create and return a nil tree node (no token payload)
Definition: antlr3basetreeadaptor.c:441
ANTLR3_DEBUG_EVENT_LISTENER_struct::semanticPredicate
void(* semanticPredicate)(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char *predicate)
A semantic predicate was evaluate with this result and action text.
Definition: antlr3debugeventlistener.h:266
rewindLast
static void rewindLast(pANTLR3_INT_STREAM is)
Definition: antlr3commontreenodestream.c:694
ANTLR3_DEBUG_EVENT_LISTENER_struct::ack
void(* ack)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Retrieve acknowledge response from the debugger.
Definition: antlr3debugeventlistener.h:288
ANTLR3_INPUT_STREAM_struct::super
void * super
Whatever super structure is providing the INPUT stream needs a pointer to itself so that this can be ...
Definition: antlr3input.h:67
pANTLR3_INT_TRIE_NODE
struct ANTLR3_INT_TRIE_NODE_struct * pANTLR3_INT_TRIE_NODE
pANTLR3_VECTOR_FACTORY
struct ANTLR3_VECTOR_FACTORY_struct * pANTLR3_VECTOR_FACTORY
Pointer to an instantiation of 'class' ANTLR3_VECTOR_FACTORY
Definition: antlr3interfaces.h:102
ANTLR3_BASE_TREE_ADAPTOR_struct::debugger
pANTLR3_DEBUG_EVENT_LISTENER debugger
If set to something other than NULL, then this structure is points to an instance of the debugger int...
Definition: antlr3basetreeadaptor.h:71
setUniqueNavigationNodes
static void setUniqueNavigationNodes(pANTLR3_TREE_NODE_STREAM tns, ANTLR3_BOOLEAN uniqueNavigationNodes)
Definition: antlr3commontreenodestream.c:800
ANTLR3_COMMON_TOKEN_STREAM_struct::getTokenRange
pANTLR3_LIST(* getTokenRange)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 start, ANTLR3_UINT32 stop)
Function that returns all the tokens between a start and a stop index.
Definition: antlr3tokenstream.h:267
antlr38BitMark
static ANTLR3_MARKER antlr38BitMark(pANTLR3_INT_STREAM is)
Mark the current input point in an 8Bit 8 bit stream such as a file stream, where all the input is av...
Definition: antlr3inputstream.c:445
antlr3BaseTreeNew
ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:58
ANTLR3_TOKEN_STREAM_struct::toStringTT
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 f...
Definition: antlr3tokenstream.h:171
ANTLR3_INPUT_STREAM_struct::markers
pANTLR3_VECTOR markers
List of mark() points in the input stream.
Definition: antlr3input.h:118
ANTLR3_CYCLIC_DFA_struct::decisionNumber
const ANTLR3_INT32 decisionNumber
Decision number that a particular static structure represents.
Definition: antlr3cyclicdfa.h:65
ANTLR3_HASH_TABLE_struct::count
ANTLR3_UINT32 count
How many elements currently exist in the table.
Definition: antlr3collections.h:120
ANTLR3_DEBUG_EVENT_LISTENER_struct::beginResync
void(* beginResync)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Indicates the recognizer is about to consume tokens to resynchronize the parser.
Definition: antlr3debugeventlistener.h:252
ANTLR3_COMMON_TREE_ADAPTOR_struct::super
void * super
Any enclosing structure/class can use this pointer to point to its own interface.
Definition: antlr3commontreeadaptor.h:52
ANTLR3_TREE_WALK_STATE_struct::nodeStackSize
ANTLR3_UINT32 nodeStackSize
Definition: antlr3commontreenodestream.h:324
nextToken
static pANTLR3_COMMON_TOKEN nextToken(pANTLR3_TOKEN_SOURCE toksource)
Default implementation of the nextToken() call for a lexer.
Definition: antlr3lexer.c:330
ANTLR3_INPUT_STREAM_struct::setCharPositionInLine
void(* setCharPositionInLine)(struct ANTLR3_INPUT_STREAM_struct *input, ANTLR3_UINT32 position)
Pointer to function to set the current position in the current line.
Definition: antlr3input.h:197
antlr3RewriteRuleTOKENStreamNewAE
ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:309
freeStream
static void freeStream(pANTLR3_INT_STREAM stream)
Definition: antlr3intstream.c:60
ANTLR3_LEXER_struct::getCharPositionInLine
ANTLR3_UINT32(* getCharPositionInLine)(struct ANTLR3_LEXER_struct *lexer)
Definition: antlr3lexer.h:175
ANTLR3_LEXER_struct::input
pANTLR3_INPUT_STREAM input
A pointer to the character stream whence this lexer is receiving characters.
Definition: antlr3lexer.h:96
ANTLR3_TOKEN_FACTORY_struct::newToken
pANTLR3_COMMON_TOKEN(* newToken)(struct ANTLR3_TOKEN_FACTORY_struct *factory)
Pointer to a function that returns a new token.
Definition: antlr3commontoken.h:346
ANTLR3_DEBUG_EVENT_LISTENER_struct::exitRule
void(* exitRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
This is the last thing executed before leaving a rule.
Definition: antlr3debugeventlistener.h:118
ANTLR3_TOKEN_STREAM_struct::super
void * super
Whatever is providing this interface needs a pointer to itself so that this can be passed back to it ...
Definition: antlr3tokenstream.h:110
antlr3BitsetORInPlace
static void antlr3BitsetORInPlace(pANTLR3_BITSET bitset, pANTLR3_BITSET bitset2)
Definition: antlr3bitset.c:439
ANTLR3_DEBUG_EVENT_LISTENER_struct::errorNode
void(* errorNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
If a syntax error occurs, recognizers bracket the error with an error node if they are building ASTs.
Definition: antlr3debugeventlistener.h:334
addc8
static pANTLR3_UINT8 addc8(pANTLR3_STRING string, ANTLR3_UINT32 c)
Definition: antlr3string.c:985
ANTLR3_TRIE_ENTRY_struct::data
union ANTLR3_TRIE_ENTRY_struct::@1 data
ANTLR3_BITSET_LIST_struct
Definition: antlr3bitset.h:70
ANTLR3_COMMON_TREE_NODE_STREAM_struct::addNavigationNode
void(* addNavigationNode)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_UINT32 ttype)
Definition: antlr3commontreenodestream.h:280
ANTLR3_TOKEN_STREAM_struct::free
void(* free)(struct ANTLR3_TOKEN_STREAM_struct *tokenStream)
Function that knows how to free the memory for an ANTLR3_TOKEN_STREAM.
Definition: antlr3tokenstream.h:182
beginBacktrack
static void beginBacktrack(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level)
Definition: antlr3baserecognizer.c:751
ANTLR3_COMMON_TOKEN_struct::setTokenIndex
void(* setTokenIndex)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_MARKER)
Pointer to a function that can set the token index of this token in the token input stream.
Definition: antlr3commontoken.h:285
growToInclude
static void growToInclude(pANTLR3_BITSET bitset, ANTLR3_INT32 bit)
Definition: antlr3bitset.c:420
ANTLR3_BASE_TREE_ADAPTOR_struct::dupTree
void *(* dupTree)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *tree)
Definition: antlr3basetreeadaptor.h:76
exitDecision
static void exitDecision(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Definition: antlr3debughandlers.c:615
ANTLR3_COMMON_TREE_ADAPTOR_struct::arboretum
pANTLR3_ARBORETUM arboretum
Tree factory for producing new nodes as required without needing to track memory allocation per node.
Definition: antlr3commontreeadaptor.h:61
setTokenBoundaries
static void setTokenBoundaries(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN startToken, pANTLR3_COMMON_TOKEN stopToken)
Track start/stop token for subtree root created for a rule.
Definition: antlr3commontreeadaptor.c:372
ANTLR3_TOKEN_FACTORY_struct::setInputStream
void(* setInputStream)(struct ANTLR3_TOKEN_FACTORY_struct *factory, pANTLR3_INPUT_STREAM input)
Pointer to a function that changes teh curent inptu stream so that new tokens are created with refere...
Definition: antlr3commontoken.h:356
ANTLR3_TREE_NODE_STREAM_struct::free
void(* free)(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Release up any and all space the the interface allocate, including for this structure.
Definition: antlr3commontreenodestream.h:119
simulateTreeConstruction
static void simulateTreeConstruction(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE tree)
Sends the required debugging events for duplicating a tree to the debugger.
Definition: antlr3basetreeadaptor.c:500
getChildIndex
static ANTLR3_INT32 getChildIndex(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:483
toStringWork
static void toStringWork(pANTLR3_TREE_NODE_STREAM tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop, pANTLR3_STRING buf)
Definition: antlr3commontreenodestream.c:830
UNI_MAX_BMP
#define UNI_MAX_BMP
Definition: antlr3convertutf.h:112
ANTLR3_TOKEN_FACTORY_struct::pools
pANTLR3_COMMON_TOKEN * pools
Pointers to the array of tokens that this factory has produced so far.
Definition: antlr3commontoken.h:319
ANTLR3_BASE_TREE_struct::createChildrenList
void(* createChildrenList)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:87
ANTLR3_BITSET_struct::isNilNode
ANTLR3_BOOLEAN(* isNilNode)(struct ANTLR3_BITSET_struct *bitset)
Definition: antlr3bitset.h:103
ANTLR3_COMMON_TOKEN_struct::tokText
union ANTLR3_COMMON_TOKEN_struct::@0 tokText
stringInitUTF8
static void stringInitUTF8(pANTLR3_STRING string)
Definition: antlr3string.c:335
ANTLR3_STRING_FACTORY_struct::strings
pANTLR3_VECTOR strings
List of all the strings that have been allocated by the factory.
Definition: antlr3string.h:213
ANTLR3_ARBORETUM_struct::thisPool
ANTLR3_INT32 thisPool
Current pool tokens we are allocating from.
Definition: antlr3commontree.h:120
ANTLR3_LEXER_struct::mTokens
void(* mTokens)(void *ctx)
Pointer to the user provided (either manually or through code generation function that causes the lex...
Definition: antlr3lexer.h:139
ANTLR3_INT_STREAM_struct::rewind
void(* rewind)(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_MARKER marker)
Reset the stream so that next call to index would return marker.
Definition: antlr3intstream.h:147
ANTLR3_BASE_TREE_struct::replaceChildren
void(* replaceChildren)(struct ANTLR3_BASE_TREE_struct *parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, struct ANTLR3_BASE_TREE_struct *t)
Definition: antlr3basetree.h:91
ANTLR3_BASE_TREE_struct::getType
ANTLR3_UINT32(* getType)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:111
ANTLR3_TYPE_LEXER
#define ANTLR3_TYPE_LEXER
Type indicator for a lexer recognizer.
Definition: antlr3baserecognizer.h:50
antlr3dfapredict
ANTLR3_API ANTLR3_INT32 antlr3dfapredict(void *ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA cdfa)
From the input stream, predict what alternative will succeed using this DFA (representing the coverin...
Definition: antlr3cyclicdfa.c:79
ANTLR3_BASE_RECOGNIZER_struct::recognizer
struct ANTLR3_BASE_RECOGNIZER_struct * recognizer
Pointer to common routine to handle single token insertion for recovery functions.
Definition: antlr3baserecognizer.h:242
antlr3convertutf.h
mismatchIsMissingToken
static ANTLR3_BOOLEAN mismatchIsMissingToken(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_BITSET_LIST follow)
Definition: antlr3baserecognizer.c:552
ANTLR3_COMMON_TOKEN_struct::chars
pANTLR3_UCHAR chars
Pointer that is used when the token just has a pointer to a char *, such as when a rewrite of an imag...
Definition: antlr3commontoken.h:181
antlr3RewriteRuleElementStreamNewAEE
static pANTLR3_REWRITE_RULE_ELEMENT_STREAM antlr3RewriteRuleElementStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:257
antlr3CommonTreeNewFromTree
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromTree(pANTLR3_COMMON_TREE tree)
pANTLR3_UINT32
uint32_t * pANTLR3_UINT32
Definition: antlr3defs.h:408
ANTLR3_COMMON_TOKEN_struct::getText
pANTLR3_STRING(* getText)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to function that returns the text pointer of a token, use toString() if you want a pANTLR3_ST...
Definition: antlr3commontoken.h:224
terminate
static void terminate(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:861
antlr3RewriteRuleNODEStreamNewAEV
ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:485
ANTLR3_FREE_FUNC
#define ANTLR3_FREE_FUNC
Default definition of ANTLR3_FREE_FUNC.
Definition: antlr3defs.h:488
ANTLR3_DEBUG_EVENT_LISTENER_struct::protocol_version
int protocol_version
The version of the debugging protocol supported by the providing instance of the debug event listener...
Definition: antlr3debugeventlistener.h:76
ANTLR3_TOKEN_STREAM_struct::setDebugListener
void(* setDebugListener)(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Function that sets the token stream into debugging mode.
Definition: antlr3tokenstream.h:176
ANTLR3_HASH_ENTRY
struct ANTLR3_HASH_ENTRY_struct ANTLR3_HASH_ENTRY
Internal structure representing an element in a hash bucket.
ANTLR3_BASE_RECOGNIZER_struct::computeCSRuleFollow
pANTLR3_BITSET(* computeCSRuleFollow)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that computes the context-sensitive FOLLOW set for the current rule.
Definition: antlr3baserecognizer.h:217
strictConversion
@ strictConversion
Definition: antlr3convertutf.h:133
replaceChildren
static void replaceChildren(pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t)
Delete children from start to stop and replace with t even if t is a list (nil-root tree).
Definition: antlr3basetree.c:343
antlr3treeparser.h
ANTLR3_BITSET_struct::isMember
ANTLR3_BOOLEAN(* isMember)(struct ANTLR3_BITSET_struct *bitset, ANTLR3_UINT32 bit)
Definition: antlr3bitset.h:100
antlr3CommonTreeNewFromToken
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontree.c:372
matchc
static ANTLR3_BOOLEAN matchc(pANTLR3_LEXER lexer, ANTLR3_UCHAR c)
Implementation of matchc for the lexer, overrides any base implementation in the base recognizer.
Definition: antlr3lexer.c:771
antlr38BitLA
static ANTLR3_UCHAR antlr38BitLA(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming an 8 bit ascii input.
Definition: antlr3inputstream.c:350
ANTLR3_ARBORETUM_struct::newFromTree
pANTLR3_BASE_TREE(* newFromTree)(struct ANTLR3_ARBORETUM_struct *factory, pANTLR3_COMMON_TREE tree)
Definition: antlr3commontree.h:152
newSizeUTF16
static pANTLR3_STRING newSizeUTF16(pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size)
Creates a new string with enough capacity for size UTF16 characters plus a terminator.
Definition: antlr3string.c:451
UNI_SUR_HIGH_END
#define UNI_SUR_HIGH_END
Definition: antlr3convertutf.h:118
getText
static pANTLR3_STRING getText(pANTLR3_COMMON_TOKEN token)
Contains the default implementation of the common token used within java.
Definition: antlr3commontoken.c:374
ANTLR3_COMMON_TOKEN_STREAM_struct::getTokensType
pANTLR3_LIST(* getTokensType)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 start, ANTLR3_UINT32 stop, ANTLR3_UINT32 type)
Function that returns all tokens of a certain type within a range.
Definition: antlr3tokenstream.h:281
ANTLR3_TREE_ADAPTORDebugNew
ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR ANTLR3_TREE_ADAPTORDebugNew(pANTLR3_STRING_FACTORY strFactory, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Debugging version of the tree adaptor (not normally called as generated code calls setDebugEventListe...
Definition: antlr3commontreeadaptor.c:177
pANTLR3_CHAR
int32_t * pANTLR3_CHAR
Definition: antlr3defs.h:398
getText
static pANTLR3_STRING getText(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:459
antlr3ParserNew
ANTLR3_API pANTLR3_PARSER antlr3ParserNew(ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3parser.c:61
ANTLR3_CYCLIC_DFA_struct::predict
ANTLR3_INT32(* predict)(void *ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, struct ANTLR3_CYCLIC_DFA_struct *dfa)
Definition: antlr3cyclicdfa.h:75
antlr3c8toAntlrc
ANTLR3_API ANTLR3_UCHAR antlr3c8toAntlrc(ANTLR3_INT8 inc)
\File Provides basic utility functions to convert between the various Unicode character conversions.
Definition: antlr3encodings.c:47
antlr3VectorAdd
static ANTLR3_UINT32 antlr3VectorAdd(pANTLR3_VECTOR vector, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Add the supplied pointer and freeing function pointer to the list, expanding the vector if needed.
Definition: antlr3collections.c:1344
setUTF16_8
static pANTLR3_UINT8 setUTF16_8(pANTLR3_STRING string, const char *chars)
Definition: antlr3string.c:919
ANTLR3_STRING_struct::compare
ANTLR3_UINT32(* compare)(struct ANTLR3_STRING_struct *string, const char *compStr)
Pointer to a function that compares the text of a string with the supplied character string (which is...
Definition: antlr3string.h:162
ANTLR3_ARBORETUM
struct ANTLR3_ARBORETUM_struct ANTLR3_ARBORETUM
ANTLR3 Tree factory interface to create lots of trees efficiently rather than creating and freeing lo...
ANTLR3_COMMON_TREE_struct::factory
pANTLR3_ARBORETUM factory
Pointer to the tree factory that manufactured this token.
Definition: antlr3commontree.h:80
ANTLR3_STRING_struct::set
pANTLR3_UINT8(* set)(struct ANTLR3_STRING_struct *string, const char *chars)
Pointer to function that sets the string value to a specific string in the default encoding for this ...
Definition: antlr3string.h:88
antlr3BitsetList
ANTLR3_API pANTLR3_BITSET antlr3BitsetList(pANTLR3_HASH_TABLE list)
Definition: antlr3bitset.c:207
setChild
static void setChild(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i, void *child)
Definition: antlr3basetree.c:240
ANTLR3_RECOGNIZER_SHARED_STATE_struct::rStreams
pANTLR3_VECTOR rStreams
A stack of token/tree rewrite streams that are available for use by a parser or tree parser that is u...
Definition: antlr3recognizersharedstate.h:207
CDFA_SPECIAL_FUNC
ANTLR3_INT32(* CDFA_SPECIAL_FUNC)(void *, pANTLR3_BASE_RECOGNIZER, pANTLR3_INT_STREAM, struct ANTLR3_CYCLIC_DFA_struct *, ANTLR3_INT32)
Definition: antlr3cyclicdfa.h:88
ANTLR3_LEXER_struct::matchAny
void(* matchAny)(struct ANTLR3_LEXER_struct *lexer)
Pointer to a function that matches the next token/char in the input stream regardless of what it acta...
Definition: antlr3lexer.h:163
antlr3StringFactoryNew
ANTLR3_API pANTLR3_STRING_FACTORY antlr3StringFactoryNew(ANTLR3_UINT32 encoding)
Definition: antlr3string.c:98
ANTLR3_TOKEN_FACTORY_struct
ANTLR3 Token factory interface to create lots of tokens efficiently rather than creating and freeing ...
Definition: antlr3commontoken.h:316
displayRecognitionError
static void displayRecognitionError(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 *tokenNames)
Standard/Example error display method.
Definition: antlr3baserecognizer.c:1008
antlr3CommonTreeNewFromToken
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken(pANTLR3_COMMON_TOKEN tree)
Definition: antlr3commontree.c:372
nextToken
static void * nextToken(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Return the next element for a caller that wants just the token.
Definition: antlr3rewritestreams.c:592
ANTLR3_COMMON_TOKEN
struct ANTLR3_COMMON_TOKEN_struct ANTLR3_COMMON_TOKEN
The definition of an ANTLR3 common token structure, which all implementations of a token stream shoul...
ANTLR3_PARSE_TREE_struct
Definition: antlr3parsetree.h:46
ANTLR3_VECTOR_FACTORY
struct ANTLR3_VECTOR_FACTORY_struct ANTLR3_VECTOR_FACTORY
Structure that tracks vectors in a vector and auto deletes the vectors in the vector factory when clo...
alreadyParsedRule
static ANTLR3_BOOLEAN alreadyParsedRule(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex)
Has this rule already parsed input at the current index in the input stream? Return ANTLR3_TRUE if we...
Definition: antlr3baserecognizer.c:1918
pANTLR3_UCHAR
uint32_t * pANTLR3_UCHAR
Definition: antlr3defs.h:399
ANTLR3_COMMON_TOKEN_struct::textState
ANTLR3_UINT32 textState
Indicates whether this token is carrying:
Definition: antlr3commontoken.h:171
toInt32_UTF16
static ANTLR3_INT32 toInt32_UTF16(pANTLR3_STRING string)
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Number of elements available in the stream.
Definition: antlr3rewritestreams.h:150
ANTLR3_BASE_TREE_ADAPTOR_struct::getText
pANTLR3_STRING(* getText)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:104
intTrieDel
static ANTLR3_BOOLEAN intTrieDel(pANTLR3_INT_TRIE trie, ANTLR3_INTKEY key)
Definition: antlr3collections.c:1932
antlr3RewriteRuleSubtreeStreamNewAEV
ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:418
createNode
static void createNode(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Definition: antlr3debughandlers.c:916
ANTLR3_CYCLIC_DFA_struct::eof
const ANTLR3_INT32 *const eof
Definition: antlr3cyclicdfa.h:78
ANTLR3_BASE_TREE_ADAPTOR_struct::setDebugEventListener
void(* setDebugEventListener)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Definition: antlr3basetreeadaptor.h:129
antlr3UTF16Seek
static void antlr3UTF16Seek(pANTLR3_INT_STREAM is, ANTLR3_MARKER seekPoint)
Rewind the lexer input to the state specified by the supplied mark.
Definition: antlr3inputstream.c:1020
skipOffTokenChannels
static ANTLR3_UINT32 skipOffTokenChannels(pANTLR3_COMMON_TOKEN_STREAM tokenStream, ANTLR3_INT32 i)
Given a starting index, return the index of the first on-channel token.
Definition: antlr3tokenstream.c:1032
LTT
static void LTT(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_BASE_TREE t)
Definition: antlr3debughandlers.c:889
newVector
static pANTLR3_VECTOR newVector(pANTLR3_VECTOR_FACTORY factory)
Definition: antlr3collections.c:1675
ANTLR3_BASE_TREE_struct::getFirstChildWithType
void *(* getFirstChildWithType)(struct ANTLR3_BASE_TREE_struct *tree, ANTLR3_UINT32 type)
Definition: antlr3basetree.h:113
ANTLR3_STRING_FACTORY_struct::newSize
pANTLR3_STRING(* newSize)(struct ANTLR3_STRING_FACTORY_struct *factory, ANTLR3_UINT32 size)
Pointer to function that manufactures a raw string with no text in it but space for size characters.
Definition: antlr3string.h:226
ANTLR3_COMMON_TOKEN_struct::toString
pANTLR3_STRING(* toString)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that returns this token as a text representation that can be printed with embed...
Definition: antlr3commontoken.h:308
ANTLR3_HASH_BUCKET
struct ANTLR3_HASH_BUCKET_struct ANTLR3_HASH_BUCKET
Internal structure of a hash table bucket, which tracks all keys that hash to the same bucket.
ANTLR3_EXCEPTION_struct::message
void * message
The printable message that goes with this exception, in your preferred encoding format.
Definition: antlr3exception.h:128
create
static pANTLR3_BASE_TREE create(pANTLR3_BASE_TREE_ADAPTOR adpator, pANTLR3_COMMON_TOKEN payload)
Definition: antlr3commontreeadaptor.c:259
createTypeToken
static pANTLR3_BASE_TREE createTypeToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)
Use the super class supplied create() method to create a new node from the supplied token.
Definition: antlr3basetreeadaptor.c:760
antlr3VectorNew
ANTLR3_API pANTLR3_VECTOR antlr3VectorNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:1054
getLine
static ANTLR3_UINT32 getLine(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:464
antlr3ListFree
static void antlr3ListFree(pANTLR3_LIST list)
Definition: antlr3collections.c:904
ANTLR3_VECTOR_struct::del
void(* del)(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)
Definition: antlr3collections.h:266
ANTLR3_TRIE_ENTRY_struct::void
void(ANTLR3_CDECL *freeptr)(void *)
ANTLR3_COMMON_TREE_struct::stopIndex
ANTLR3_MARKER stopIndex
End token that encases this tree.
Definition: antlr3commontree.h:60
ANTLR3_INT_TRIE_NODE_struct
Structure that defines an element/node in an ANTLR3_INT_TRIE.
Definition: antlr3collections.h:350
ANTLR3_RECOGNIZER_SHARED_STATE_struct::userp
void * userp
User programmable pointer that can be used for instance as a place to store some tracking structure s...
Definition: antlr3recognizersharedstate.h:134
seek
static void seek(pANTLR3_INT_STREAM is, ANTLR3_MARKER index)
consume() ahead until we hit index.
Definition: antlr3commontreenodestream.c:703
ANTLR3_LEXER_struct::emitNew
void(* emitNew)(struct ANTLR3_LEXER_struct *lexer, pANTLR3_COMMON_TOKEN token)
Pointer to a function that emits the supplied token as the next token in the stream.
Definition: antlr3lexer.h:126
dupTree
static pANTLR3_BASE_TREE dupTree(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Return a duplicate of the entire tree (implementation provided by the BASE_TREE interface....
Definition: antlr3basetreeadaptor.c:461
ANTLR3_BASE_TREE_ADAPTOR_struct::setChildIndex
void(* setChildIndex)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, ANTLR3_UINT32 i)
Definition: antlr3basetreeadaptor.h:112
antlr3SetCTAPI
ANTLR3_API void antlr3SetCTAPI(pANTLR3_COMMON_TREE tree)
Definition: antlr3commontree.c:308
antlr3HashPutI
static ANTLR3_INT32 antlr3HashPutI(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Add the element pointer in to the table, based upon the hash of the provided key.
Definition: antlr3collections.c:523
ANTLR3_BASE_TREE_struct::getChild
void *(* getChild)(struct ANTLR3_BASE_TREE_struct *tree, ANTLR3_UINT32 i)
Definition: antlr3basetree.h:99
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::hasNext
ANTLR3_BOOLEAN(* hasNext)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Returns ANTLR3_TRUE if there is a next element available.
Definition: antlr3rewritestreams.h:135
antlr3StringFactoryNew
ANTLR3_API pANTLR3_STRING_FACTORY antlr3StringFactoryNew(ANTLR3_UINT32 encoding)
Definition: antlr3string.c:98
antlr38BitGetLineBuf
static void * antlr38BitGetLineBuf(pANTLR3_INPUT_STREAM input)
Return a pointer into the input stream that points at the start of the current input line as triggere...
Definition: antlr3inputstream.c:633
ANTLR3_COMMON_TREE_NODE_STREAM_struct::absoluteNodeIndex
ANTLR3_MARKER absoluteNodeIndex
What node index did we just consume? i=0..n-1 for n node trees.
Definition: antlr3commontreenodestream.h:238
to8_UTF16
static pANTLR3_STRING to8_UTF16(pANTLR3_STRING string)
Definition: antlr3string.c:1425
enterRule
static void enterRule(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
Definition: antlr3debughandlers.c:548
consumeUntil
static void consumeUntil(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 tokenType)
Eat tokens from the input stream until we get one of JUST the right type.
Definition: antlr3baserecognizer.c:1716
size
static ANTLR3_UINT32 size(pANTLR3_INT_STREAM is)
Expensive to compute the size of the whole tree while parsing.
Definition: antlr3commontreenodestream.c:731
antlr38BitRelease
static void antlr38BitRelease(pANTLR3_INT_STREAM is, ANTLR3_MARKER mark)
Rewind the lexer input to the state specified by the supplied mark.
Definition: antlr3inputstream.c:557
nilNode
static void nilNode(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Definition: antlr3debughandlers.c:908
antlr3UTF8LA
static ANTLR3_UCHAR antlr3UTF8LA(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming a UTF8 input.
Definition: antlr3inputstream.c:1877
antlr3CreateFileStream
static pANTLR3_INPUT_STREAM antlr3CreateFileStream(pANTLR3_UINT8 fileName)
Use the contents of an operating system file as the input for an input stream.
Definition: antlr3filestream.c:308
ANTLR3_ERR_HASHDUP
#define ANTLR3_ERR_HASHDUP
Definition: antlr3errors.h:51
newPool
static ANTLR3_BOOLEAN newPool(pANTLR3_ARBORETUM factory)
Definition: antlr3commontree.c:124
newStrUTF16_UTF16
static pANTLR3_STRING newStrUTF16_UTF16(pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string)
Create a new UTF16 string from the supplied, null terminated, UTF16 string pointer.
Definition: antlr3string.c:619
ANTLR3_STRING_TERMINATOR
#define ANTLR3_STRING_TERMINATOR
Definition: antlr3lexer.h:64
ANTLR3_BASE_RECOGNIZER_struct::getRuleMemoization
ANTLR3_MARKER(* getRuleMemoization)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_INTKEY ruleIndex, ANTLR3_MARKER ruleParseStart)
Pointer to a function to return whether the rule has parsed input starting at the supplied start inde...
Definition: antlr3baserecognizer.h:279
freeBR
static void freeBR(pANTLR3_BASE_RECOGNIZER recognizer)
Definition: antlr3baserecognizer.c:198
antlr3commontreeadaptor.h
Definition of the ANTLR3 common tree adaptor.
pop
static ANTLR3_INT32 pop(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Definition: antlr3commontreenodestream.c:961
ANTLR3_BASE_TREE_struct::getChildIndex
ANTLR3_INT32(* getChildIndex)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:103
antlr3CreateStringStream
static pANTLR3_INPUT_STREAM antlr3CreateStringStream(pANTLR3_UINT8 data)
Use the supplied 'string' as input to the stream.
Definition: antlr3filestream.c:442
ANTLR3_BASE_TREE_ADAPTOR_struct
Definition: antlr3basetreeadaptor.h:49
ANTLR3_LIST_struct::table
pANTLR3_HASH_TABLE table
Hash table that is storing the list elements.
Definition: antlr3collections.h:184
ANTLR3_PRINTF
#define ANTLR3_PRINTF
Default definition of printf, set this to something other than printf before including antlr3....
Definition: antlr3defs.h:520
ANTLR3_STACK_struct::peek
void *(* peek)(struct ANTLR3_STACK_struct *stack)
Definition: antlr3collections.h:213
ANTLR3_LEX_STATE_struct::charPositionInLine
ANTLR3_INT32 charPositionInLine
The offset within the current line of the current character.
Definition: antlr3input.h:264
ANTLR3_TOPO_struct::edges
pANTLR3_BITSET * edges
A vector of vectors of edges, built by calling the addEdge method() to indicate that node number n de...
Definition: antlr3collections.h:414
ANTLR3_DEBUG_EVENT_LISTENER_struct::terminate
void(* terminate)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Parsing is over; successfully or not.
Definition: antlr3debugeventlistener.h:282
ANTLR3_INPUT_STREAM_struct::sizeBuf
ANTLR3_UINT32 sizeBuf
Number of characters that can be consumed at this point in time.
Definition: antlr3input.h:96
antlr38BitSetCharPosition
static void antlr38BitSetCharPosition(pANTLR3_INPUT_STREAM input, ANTLR3_UINT32 position)
Set the current offset in the current line to be a particular setting.
Definition: antlr3inputstream.c:676
ANTLR3_ENC_8BIT
#define ANTLR3_ENC_8BIT
General latin-1 or other 8 bit encoding scheme such as straight ASCII.
Definition: antlr3defs.h:77
ANTLR3_BASE_TREE_ADAPTOR_struct::strFactory
pANTLR3_STRING_FACTORY strFactory
We need a string factory for creating imaginary tokens, we take this from the stream we are supplied ...
Definition: antlr3basetreeadaptor.h:58
toUTF8_8
static pANTLR3_STRING toUTF8_8(pANTLR3_STRING string)
Definition: antlr3string.c:349
pANTLR3_PARSER
struct ANTLR3_PARSER_struct * pANTLR3_PARSER
Pointer to an instantiation of 'class' ANTLR3_PARSER
Definition: antlr3interfaces.h:160
ANTLR3_HASH_TABLE_struct::getI
void *(* getI)(struct ANTLR3_HASH_TABLE_struct *table, ANTLR3_INTKEY key)
Definition: antlr3collections.h:139
ANTLR3_VECTOR_FACTORY_struct::freeStack
pANTLR3_STACK freeStack
Consumers from the factory can release a factory produced vector back to the factory so that it may b...
Definition: antlr3collections.h:309
antlr3CTSFree
static void antlr3CTSFree(pANTLR3_COMMON_TOKEN_STREAM stream)
Definition: antlr3tokenstream.c:121
setStartIndex
static void setStartIndex(pANTLR3_COMMON_TOKEN token, ANTLR3_MARKER index)
Definition: antlr3commontoken.c:542
ANTLR3_STRING_struct::insertS
pANTLR3_UINT8(* insertS)(struct ANTLR3_STRING_struct *string, ANTLR3_UINT32 point, struct ANTLR3_STRING_struct *newbit)
Pointer to function that inserts a copy of the characters in the supplied string at the specified off...
Definition: antlr3string.h:136
ANTLR3_COMMON_TOKEN_struct::getCharPositionInLine
ANTLR3_INT32(* getCharPositionInLine)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that gets the offset in the line where this token exists.
Definition: antlr3commontoken.h:262
ANTLR3_COMMON_TOKEN_struct::stop
ANTLR3_MARKER stop
The character offset in the input stream where the text for this token stops.
Definition: antlr3commontoken.h:158
getSourceName
static pANTLR3_STRING getSourceName(pANTLR3_INT_STREAM is)
Return a string that represents the name assoicated with the input source.
Definition: antlr3tokenstream.c:1083
antlr3MTNExceptionNew
ANTLR3_API void antlr3MTNExceptionNew(pANTLR3_BASE_RECOGNIZER recognizer)
Creates a new Mismatched Tree Nde Exception and inserts in the recognizer exception stack.
Definition: antlr3treeparser.c:111
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::getDescription
void *(* getDescription)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Returns the description string if there is one available (check for NULL).
Definition: antlr3rewritestreams.h:154
ANTLR3_COMMON_TOKEN_struct::getLine
ANTLR3_UINT32(* getLine)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that gets the 'line' number where this token resides.
Definition: antlr3commontoken.h:254
antlr3BitsetSize
static ANTLR3_UINT32 antlr3BitsetSize(pANTLR3_BITSET bitset)
Definition: antlr3bitset.c:482
ANTLR3_VECTOR_ELEMENT
struct ANTLR3_VECTOR_ELEMENT_struct ANTLR3_VECTOR_ELEMENT
ANTLR3_RECOGNITION_EXCEPTION
#define ANTLR3_RECOGNITION_EXCEPTION
Indicates that the recognizer received a token in the input that was not predicted.
Definition: antlr3exception.h:42
getChild
static void * getChild(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 i)
Definition: antlr3basetree.c:119
serializeText
void serializeText(pANTLR3_STRING buffer, pANTLR3_STRING text)
Definition: antlr3debughandlers.c:365
tindex
static ANTLR3_MARKER tindex(pANTLR3_INT_STREAM is)
Definition: antlr3commontreenodestream.c:715
recover
static void recover(pANTLR3_BASE_RECOGNIZER recognizer)
Recover from an error found on the input stream.
Definition: antlr3baserecognizer.c:1320
antlr3BitsetMember
static ANTLR3_BOOLEAN antlr3BitsetMember(pANTLR3_BITSET bitset, ANTLR3_UINT32 bit)
Definition: antlr3bitset.c:570
offsetsFromUTF8
static const UTF32 offsetsFromUTF8[6]
Definition: antlr3convertutf.c:181
ANTLR3_RECOGNIZER_SHARED_STATE_struct::text
pANTLR3_STRING text
Text for the current token.
Definition: antlr3recognizersharedstate.h:183
ANTLR3_RECOGNIZER_SHARED_STATE_struct::type
ANTLR3_UINT32 type
The token type for the current token.
Definition: antlr3recognizersharedstate.h:161
charAt8
static ANTLR3_UCHAR charAt8(pANTLR3_STRING string, ANTLR3_UINT32 offset)
Definition: antlr3string.c:1308
antlr3CommonTreeNew
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew()
Definition: antlr3commontree.c:356
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct
A generic list of elements tracked in an alternative to be used in a -> rewrite rule.
Definition: antlr3rewritestreams.h:63
ANTLR3_COMMON_TOKEN_struct::setChannel
void(* setChannel)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_UINT32 channel)
Pointer to a function that sets the channel that this token should belong to.
Definition: antlr3commontoken.h:275
ANTLR3_PARSER_struct::setDebugListener
void(* setDebugListener)(struct ANTLR3_PARSER_struct *parser, pANTLR3_DEBUG_EVENT_LISTENER dbg)
A pointer to a function that installs a debugger object (it also installs the debugging versions of t...
Definition: antlr3parser.h:70
ANTLR3_RECOGNIZER_SHARED_STATE
struct ANTLR3_RECOGNIZER_SHARED_STATE_struct ANTLR3_RECOGNIZER_SHARED_STATE
All the data elements required to track the current state of any recognizer (lexer,...
setDebugEventListener
static void setDebugEventListener(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Causes an existing common tree adaptor to become a debug version.
Definition: antlr3commontreeadaptor.c:202
antlr3TokenFactoryNew
ANTLR3_API pANTLR3_TOKEN_FACTORY antlr3TokenFactoryNew(pANTLR3_INPUT_STREAM input)
Definition: antlr3commontoken.c:92
ANTLR3_BITSET_struct
Definition: antlr3bitset.h:88
ANTLR3_BASE_RECOGNIZER_struct::recoverFromMismatchedToken
void *(* recoverFromMismatchedToken)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Pointer to a function that recovers from a mismatched token in the input stream.
Definition: antlr3baserecognizer.h:229
antlr3c8toAntlrc
ANTLR3_API ANTLR3_UCHAR antlr3c8toAntlrc(ANTLR3_INT8 inc)
\File Provides basic utility functions to convert between the various Unicode character conversions.
Definition: antlr3encodings.c:47
antlr3TreeNodeStreamNew
ANTLR3_API pANTLR3_TREE_NODE_STREAM antlr3TreeNodeStreamNew()
Definition: antlr3commontreenodestream.c:88
ANTLR3_RECOGNIZER_SHARED_STATE_struct::channel
ANTLR3_UINT32 channel
The channel number for the current token.
Definition: antlr3recognizersharedstate.h:157
UNI_MAX_LEGAL_UTF32
#define UNI_MAX_LEGAL_UTF32
Definition: antlr3convertutf.h:115
setCharPositionInLine
static void setCharPositionInLine(pANTLR3_COMMON_TOKEN token, ANTLR3_INT32 pos)
Definition: antlr3commontoken.c:512
antlr3UTF16ConsumeLE
static void antlr3UTF16ConsumeLE(pANTLR3_INT_STREAM is)
Consume the next character in a UTF16 input stream when the input is Little Endian and the machine is...
Definition: antlr3inputstream.c:1067
setChannel
static void setChannel(pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 channel)
Definition: antlr3commontoken.c:522
freeNodeRS
static void freeNodeRS(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Do special nilNode reuse detection for node streams.
Definition: antlr3rewritestreams.c:108
antlr3input.h
Defines the basic structures used to manipulate character streams from any input source.
printable8
static pANTLR3_STRING printable8(pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string)
Definition: antlr3string.c:682
ANTLR3_COMMON_TREE_NODE_STREAM_struct::reset
void(* reset)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:297
ANTLR3_INT_STREAM
struct ANTLR3_INT_STREAM_struct ANTLR3_INT_STREAM
addChildToken
static void addChildToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN child)
Use the adaptor implementation to add a child node with the supplied token.
Definition: antlr3basetreeadaptor.c:567
handshake
static ANTLR3_BOOLEAN handshake(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:194
antlr3UTF8Consume
static void antlr3UTF8Consume(pANTLR3_INT_STREAM is)
Consume the next character in a UTF8 input stream.
Definition: antlr3inputstream.c:1811
antlr3RewriteRuleSubtreeStreamNewAEE
ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:395
newStr8
static pANTLR3_STRING newStr8(pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string)
Create a new 8 bit string from the supplied, null terminated, 8 bit string pointer.
Definition: antlr3string.c:597
ANTLR3_BASE_TREE_ADAPTOR_struct::tokenFactory
pANTLR3_TOKEN_FACTORY tokenFactory
Definition: antlr3basetreeadaptor.h:63
setTokenIndex
static void setTokenIndex(pANTLR3_COMMON_TOKEN token, ANTLR3_MARKER)
Definition: antlr3commontoken.c:532
serializeNode
pANTLR3_STRING serializeNode(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node)
Definition: antlr3debughandlers.c:464
defineDotNodes
static void defineDotNodes(pANTLR3_BASE_TREE_ADAPTOR adaptor, void *t, pANTLR3_STRING dotSpec)
Definition: antlr3basetreeadaptor.c:160
ANTLR3_FALSE
#define ANTLR3_FALSE
Definition: antlr3errors.h:37
antlr3VectorSet
static ANTLR3_UINT32 antlr3VectorSet(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry, void *element, void(ANTLR3_CDECL *freeptr)(void *), ANTLR3_BOOLEAN freeExisting)
Replace the element at the specified entry point with the supplied entry.
Definition: antlr3collections.c:1373
antlr3RewriteRuleTOKENStreamNewAEE
ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:333
antrl3VectorRemove
static void * antrl3VectorRemove(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
Remove the entry from the vector, but do not free any entry, even if it has a free pointer.
Definition: antlr3collections.c:1250
antlr3CommonTreeNodeStreamNewTree
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNewTree(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint)
Definition: antlr3commontreenodestream.c:116
ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode
void(* createNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Announce a new node built from token elements such as type etc...
Definition: antlr3debugeventlistener.h:342
ANTLR3_EXCEPTION_struct::freeEx
void(* freeEx)(struct ANTLR3_EXCEPTION_struct *ex)
Definition: antlr3exception.h:208
ANTLR3_BITSET_struct::free
void(* free)(struct ANTLR3_BITSET_struct *bitset)
Definition: antlr3bitset.h:106
ANTLR3_TOPO_struct::sorted
pANTLR3_UINT32 sorted
A vector used to build up the sorted output order.
Definition: antlr3collections.h:421
ANTLR3_COMMON_TREE_NODE_STREAM_struct::newUpNode
pANTLR3_BASE_TREE(* newUpNode)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:284
ANTLR3_BASE_TREE_ADAPTOR_struct::getTokenStartIndex
ANTLR3_MARKER(* getTokenStartIndex)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:125
ANTLR3_TOPO_struct::sortVector
void(* sortVector)(struct ANTLR3_TOPO_struct *topo, pANTLR3_VECTOR v)
A method that sorts the supplied ANTLR3_VECTOR in place based on the previously supplied edge data.
Definition: antlr3collections.h:498
ANTLR3_BASE_TREE_ADAPTOR_struct::getTokenStopIndex
ANTLR3_MARKER(* getTokenStopIndex)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:127
consume
static void consume(pANTLR3_INT_STREAM is)
Consume the next node from the input stream.
Definition: antlr3commontreenodestream.c:615
ANTLR3_INT_STREAM_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_INT_STREAM_struct *intStream)
Only makes sense for streams that buffer everything up probably, but might be useful to display the e...
Definition: antlr3intstream.h:182
ANTLR3_LEXER_struct
Definition: antlr3lexer.h:77
antlr3LexerNew
ANTLR3_API pANTLR3_LEXER antlr3LexerNew(ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3lexer.c:72
ANTLR3_BASE_RECOGNIZER_struct::combineFollows
pANTLR3_BITSET(* combineFollows)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_BOOLEAN exact)
Pointer to a function to combine follow bitsets.
Definition: antlr3baserecognizer.h:222
setCharStream
static void setCharStream(pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input)
Definition: antlr3lexer.c:492
antlr3RewriteRuleTOKENStreamNewAEV
ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:352
ANTLR3_HASH_KEY_struct::sKey
pANTLR3_UINT8 sKey
Used if type is ANTLR3_HASH_TYPE_STR
Definition: antlr3collections.h:49
setTokenStream
static void setTokenStream(pANTLR3_PARSER parser, pANTLR3_TOKEN_STREAM)
Definition: antlr3parser.c:169
ANTLR3_BITSET_struct::grow
void(* grow)(struct ANTLR3_BITSET_struct *bitset, ANTLR3_INT32 newSize)
Definition: antlr3bitset.h:98
errorNode
static void errorNode(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Definition: antlr3debughandlers.c:959
getTokenStream
static pANTLR3_TOKEN_STREAM getTokenStream(pANTLR3_PARSER parser)
Definition: antlr3parser.c:176
ConversionResult
ConversionResult
Definition: antlr3convertutf.h:125
ANTLR3_CYCLIC_DFA_struct::transition
const ANTLR3_INT32 *const *const transition
Definition: antlr3cyclicdfa.h:83
antlr3CommonTokenDebugStreamSourceNew
ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenDebugStreamSourceNew(ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Definition: antlr3tokenstream.c:206
ANTLR3_INPUT_STREAM_struct::fileName
pANTLR3_STRING fileName
File name string, set to pointer to memory if you set it manually as it will be free()d.
Definition: antlr3input.h:123
ANTLR3_BASE_TREE_ADAPTOR_struct::setChild
void(* setChild)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, ANTLR3_UINT32 i, void *child)
Definition: antlr3basetreeadaptor.h:110
ANTLR3_TREE_NODE_STREAM_struct::get
pANTLR3_BASE_TREE(* get)(struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_INT32 i)
Get a tree node at an absolute index i; 0..n-1.
Definition: antlr3commontreenodestream.h:125
ANTLR3_COMMON_TREE_ADAPTOR_struct
Definition: antlr3commontreeadaptor.h:49
size
static ANTLR3_UINT32 size(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Number of elements available in the stream.
Definition: antlr3rewritestreams.c:811
antlr3ParserNew
ANTLR3_API pANTLR3_PARSER antlr3ParserNew(ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3parser.c:61
ANTLR3_HASH_TABLE_struct::modulo
ANTLR3_UINT32 modulo
Number of buckets available in this table.
Definition: antlr3collections.h:111
antlr3BitsetList
ANTLR3_API pANTLR3_BITSET antlr3BitsetList(pANTLR3_HASH_TABLE list)
Definition: antlr3bitset.c:207
ANTLR3_DEBUG_EVENT_LISTENER_struct::commence
void(* commence)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Announce that parsing has begun.
Definition: antlr3debugeventlistener.h:275
antlr3UTF32LABE
static ANTLR3_UCHAR antlr3UTF32LABE(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming a UTF32 input in big endian byte order.
Definition: antlr3inputstream.c:1729
toString
static pANTLR3_STRING toString(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:508
antlr3HashGet
static void * antlr3HashGet(pANTLR3_HASH_TABLE table, void *key)
Return the element pointer in the hash table for a particular key value, or NULL if it don't exist (o...
Definition: antlr3collections.c:483
antlr3EnumFree
static void antlr3EnumFree(pANTLR3_HASH_ENUM en)
Frees up the memory structures that represent a hash table enumeration.
Definition: antlr3collections.c:822
ANTLR3_STRING_FACTORY_struct::newPtr
pANTLR3_STRING(* newPtr)(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Pointer to function that manufactures a string from a given pointer and length.
Definition: antlr3string.h:232
ANTLR3_INT_STREAM_struct::type
ANTLR3_UINT32 type
Input stream type indicator.
Definition: antlr3intstream.h:97
ANTLR3_COMMON_TOKEN_struct::custom
void * custom
Pointer to a custom element that the ANTLR3 programmer may define and install.
Definition: antlr3commontoken.h:210
addChildren
static void addChildren(pANTLR3_BASE_TREE tree, pANTLR3_LIST kids)
Add all elements of the supplied list as children of this node.
Definition: antlr3basetree.c:226
ANTLR3_INT_TRIE_struct::current
pANTLR3_INT_TRIE_NODE current
Definition: antlr3collections.h:378
ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount
ANTLR3_UINT32(* getChildCount)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *)
Definition: antlr3basetreeadaptor.h:115
fillBuffer
static void fillBuffer(pANTLR3_COMMON_TREE_NODE_STREAM ctns, pANTLR3_BASE_TREE t)
Walk tree with depth-first-search and fill nodes buffer.
Definition: antlr3commontreenodestream.c:474
halfBase
#define halfBase
Definition: antlr3convertutf.h:122
antlr3encodings.h
antlr3bitset.h
Defines the basic structures of an ANTLR3 bitset.
ANTLR3_INT_TRIE_struct::del
ANTLR3_BOOLEAN(* del)(struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key)
Definition: antlr3collections.h:384
toUTF8_UTF16
static pANTLR3_STRING toUTF8_UTF16(pANTLR3_STRING string)
Definition: antlr3string.c:360
setParent
static void setParent(pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE parent)
Definition: antlr3commontree.c:531
ANTLR3_BASE_TREE_struct::addChild
void(* addChild)(struct ANTLR3_BASE_TREE_struct *tree, void *child)
Definition: antlr3basetree.h:83
ANTLR3_BASE_RECOGNIZER_struct::beginBacktrack
void(* beginBacktrack)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_UINT32 level)
Pointer to a function that is a hook to listen to token consumption during error recovery.
Definition: antlr3baserecognizer.h:201
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::free
void(* free)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Definition: antlr3rewritestreams.h:156
ANTLR3_TREE_WALK_STATE_struct::absoluteNodeIndex
ANTLR3_MARKER absoluteNodeIndex
Definition: antlr3commontreenodestream.h:321
ANTLR3_FREE
#define ANTLR3_FREE(ptr)
Default definition of ANTLR3_FREE.
Definition: antlr3defs.h:482
ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeText
void *(* createTypeText)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.h:96
ANTLR3_ARBORETUM_struct::nextTree
ANTLR3_UINT32 nextTree
The next token to throw out from the pool, will cause a new pool allocation if this exceeds the avail...
Definition: antlr3commontree.h:125
setTokenSource
static void setTokenSource(pANTLR3_TOKEN_STREAM ts, pANTLR3_TOKEN_SOURCE tokenSource)
Definition: antlr3tokenstream.c:513
getType
static ANTLR3_UINT32 getType(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:438
dbgSeek
static void dbgSeek(pANTLR3_INT_STREAM is, ANTLR3_MARKER index)
Definition: antlr3tokenstream.c:938
bitMask
static ANTLR3_UINT64 bitMask[64]
Rather than use the bit index of a trie node to shift 0x01 left that many times, then & with the resu...
Definition: antlr3collections.c:1784
ANTLR3_ENC_EBCDIC
#define ANTLR3_ENC_EBCDIC
Input is 8 bit EBCDIC (which we convert to 8 bit ASCII on the fly.
Definition: antlr3defs.h:97
ANTLR3_ENC_UTF16
#define ANTLR3_ENC_UTF16
UTF-16 encoding scheme (which also covers UCS2 as that does not have surrogates)
Definition: antlr3defs.h:85
recoverFromMismatchedSet
static void * recoverFromMismatchedSet(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET_LIST follow)
Definition: antlr3baserecognizer.c:1555
ANTLR3_BASE_TREE_ADAPTOR_struct::super
void * super
Pointer to any enclosing structure/interface that contains this structure.
Definition: antlr3basetreeadaptor.h:53
getChild
static pANTLR3_BASE_TREE getChild(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i)
Definition: antlr3basetreeadaptor.c:883
antlr3SetVectorApi
ANTLR3_API void antlr3SetVectorApi(pANTLR3_VECTOR vector, ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:1078
ANTLR3_HASH_TABLE_struct::remove
pANTLR3_HASH_ENTRY(* remove)(struct ANTLR3_HASH_TABLE_struct *table, void *key)
Definition: antlr3collections.h:132
antlr3CommonTokenStreamNew
ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenStreamNew(ANTLR3_UINT32 hint)
Definition: antlr3tokenstream.c:254
ANTLR3_BASE_RECOGNIZER_struct::getRuleInvocationStackNamed
pANTLR3_STACK(* getRuleInvocationStackNamed)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_UINT8 name)
Definition: antlr3baserecognizer.h:264
ANTLR3_STRING_FACTORY_struct::destroy
void(* destroy)(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_STRING string)
Pointer to function that deletes the string altogether.
Definition: antlr3string.h:253
closeVectorFactory
static void closeVectorFactory(pANTLR3_VECTOR_FACTORY factory)
Definition: antlr3collections.c:1562
ANTLR3_INPUT_STREAM_struct::fileNo
ANTLR3_UINT32 fileNo
File number, needs to be set manually to some file index of your devising.
Definition: antlr3input.h:127
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::elements
pANTLR3_VECTOR elements
The list of tokens or subtrees we are tracking.
Definition: antlr3rewritestreams.h:76
ANTLR3_COMMON_TOKEN_struct::text
pANTLR3_STRING text
Some token types actually do carry around their associated text, hence (*getText)() will return this ...
Definition: antlr3commontoken.h:186
antlr3UTF16SetupStream
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.
Definition: antlr3inputstream.c:709
intTrieGet
static pANTLR3_TRIE_ENTRY intTrieGet(pANTLR3_INT_TRIE trie, ANTLR3_INTKEY key)
Search the int Trie and return a pointer to the first bucket indexed by the key if it is contained in...
Definition: antlr3collections.c:1862
ANTLR3_LIST_struct
Structure that represents a LIST collection.
Definition: antlr3collections.h:181
ANTLR3_TOKEN_STREAM_struct::initialStreamState
ANTLR3_BOOLEAN initialStreamState
Indicates the initial stream state for dbgConsume()
Definition: antlr3tokenstream.h:122
antlr3dfaspecialStateTransition
ANTLR3_API ANTLR3_INT32 antlr3dfaspecialStateTransition(void *ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s)
Default special state implementation.
Definition: antlr3cyclicdfa.c:193
replaceChildren
static void replaceChildren(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:445
matchs
static ANTLR3_BOOLEAN matchs(pANTLR3_LEXER lexer, ANTLR3_UCHAR *string)
Implementation of matchs for the lexer, overrides any base implementation in the base recognizer.
Definition: antlr3lexer.c:728
ANTLR3_STACK_struct
Structure that represents a Stack collection.
Definition: antlr3collections.h:200
semanticPredicate
static void semanticPredicate(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_BOOLEAN result, const char *predicate)
Definition: antlr3debughandlers.c:787
ANTLR3_TOPO_struct::cycle
pANTLR3_UINT32 cycle
A vector used to detect cycles in the edge dependecies.
Definition: antlr3collections.h:432
ANTLR3_COMMON_TOKEN_struct::freeCustom
void(* freeCustom)(void *custom)
Pointer to a function that knows how to free the custom structure when the token is destroyed.
Definition: antlr3commontoken.h:215
ANTLR3_LEXER_struct::getCharIndex
ANTLR3_MARKER(* getCharIndex)(struct ANTLR3_LEXER_struct *lexer)
Definition: antlr3lexer.h:174
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::elementDescription
void * elementDescription
The element or stream description; usually has name of the token or rule reference that this list tra...
Definition: antlr3rewritestreams.h:86
ConvertUTF32toUTF16
ConversionResult ConvertUTF32toUTF16(const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:52
ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRootToken
void *(* becomeRootToken)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *newRoot, void *oldRoot)
Definition: antlr3basetreeadaptor.h:91
ANTLR3_DEBUG_EVENT_LISTENER_struct::endBacktrack
void(* endBacktrack)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful)
Definition: antlr3debugeventlistener.h:178
antlr3LexerNewStream
ANTLR3_API pANTLR3_LEXER antlr3LexerNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3lexer.c:384
ANTLR3_BASE_RECOGNIZER_struct::follow
struct ANTLR3_BASE_RECOGNIZER_struct pANTLR3_BITSET_LIST follow
Definition: antlr3baserecognizer.h:243
subString8
static pANTLR3_STRING subString8(pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex)
Definition: antlr3string.c:1340
ANTLR3_BITSET_struct::borInPlace
void(* borInPlace)(struct ANTLR3_BITSET_struct *bitset, struct ANTLR3_BITSET_struct *bitset2)
Definition: antlr3bitset.h:95
UTF32
ANTLR3_UINT32 UTF32
Definition: antlr3convertutf.h:106
ANTLR3_ARBORETUM_struct::newTree
pANTLR3_BASE_TREE(* newTree)(struct ANTLR3_ARBORETUM_struct *factory)
Pointer to a function that returns a new tree.
Definition: antlr3commontree.h:151
ANTLR3_TREE_NODE_STREAM_struct
Definition: antlr3commontreenodestream.h:54
ANTLR3_COMMON_TOKEN_struct::setStopIndex
void(* setStopIndex)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_MARKER index)
Pointer to a function that sets the stop index in the input stream for this token.
Definition: antlr3commontoken.h:301
ANTLR3_BASE_TREE_ADAPTOR_struct::createToken
pANTLR3_COMMON_TOKEN(* createToken)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.h:119
ANTLR3_COMMON_TREE_NODE_STREAM_struct::EOF_NODE
ANTLR3_COMMON_TREE EOF_NODE
Dummy tree node that indicates the termination point of the tree.
Definition: antlr3commontreenodestream.h:175
antlr3StackNew
ANTLR3_API pANTLR3_STACK antlr3StackNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:964
INVALID_SOCKET
#define INVALID_SOCKET
Definition: antlr3defs.h:389
pANTLR3_BITSET
struct ANTLR3_BITSET_struct * pANTLR3_BITSET
Pointer to an instantiation of 'class' ANTLR3_BITSET
Definition: antlr3interfaces.h:62
ANTLR3_BITSET_LIST
struct ANTLR3_BITSET_LIST_struct ANTLR3_BITSET_LIST
antlr3errors.h
antlr3BitsetNew
ANTLR3_API pANTLR3_BITSET antlr3BitsetNew(ANTLR3_UINT32 numBits)
Definition: antlr3bitset.c:76
ANTLR3_VECTOR_struct::get
void *(* get)(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)
Definition: antlr3collections.h:267
ANTLR3_BASE_TREE_struct::setChildIndex
void(* setChildIndex)(struct ANTLR3_BASE_TREE_struct *tree, ANTLR3_INT32)
Definition: antlr3basetree.h:101
ANTLR3_COMMON_TREE_ADAPTOR
struct ANTLR3_COMMON_TREE_ADAPTOR_struct ANTLR3_COMMON_TREE_ADAPTOR
MEMO_RULE_FAILED
#define MEMO_RULE_FAILED
Indicates memoizing on a rule failed.
Definition: antlr3errors.h:44
ANTLR3_DEBUG_EVENT_LISTENER_struct::location
void(* location)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos)
To watch a parser move through the grammar, the parser needs to inform the debugger what line/charPos...
Definition: antlr3debugeventlistener.h:188
ANTLR3_BASE_RECOGNIZER_struct::mismatchIsMissingToken
ANTLR3_BOOLEAN(* mismatchIsMissingToken)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_INT_STREAM input, pANTLR3_BITSET_LIST follow)
Pointer to a function that decides if the current token is one that can logically follow the one we w...
Definition: antlr3baserecognizer.h:139
ANTLR3_BASE_RECOGNIZER_struct::state
pANTLR3_RECOGNIZER_SHARED_STATE state
A pointer to the shared recognizer state, such that multiple recognizers can use the same inputs stre...
Definition: antlr3baserecognizer.h:92
antlr3Fopen
ANTLR3_API ANTLR3_FDSC antlr3Fopen(pANTLR3_UINT8 filename, const char *mode)
Open an operating system file and return the descriptor We just use the common open() and related fun...
Definition: antlr3filestream.c:404
ANTLR3_BITSET_BITS
#define ANTLR3_BITSET_BITS
How many bits in the elements.
Definition: antlr3bitset.h:45
ANTLR3_COMMON_TOKEN_STREAM_struct::tokens
pANTLR3_VECTOR tokens
Records every single token pulled from the source indexed by the token index.
Definition: antlr3tokenstream.h:211
ANTLR3_UCHAR
uint32_t ANTLR3_UCHAR
Definition: antlr3defs.h:399
pANTLR3_EXCEPTION
struct ANTLR3_EXCEPTION_struct * pANTLR3_EXCEPTION
Pointer to an instantiation of 'class' ANTLR3_EXCEPTION
Definition: antlr3interfaces.h:76
endBacktrack
static void endBacktrack(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 level, ANTLR3_BOOLEAN successful)
Definition: antlr3baserecognizer.c:760
ANTLR3_MISMATCHED_TREE_NODE_EXCEPTION
#define ANTLR3_MISMATCHED_TREE_NODE_EXCEPTION
Definition: antlr3exception.h:85
ANTLR3_BASE_RECOGNIZER_struct::recover
void(* recover)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that recovers from an error found in the input stream.
Definition: antlr3baserecognizer.h:186
toInt32_8
static ANTLR3_INT32 toInt32_8(pANTLR3_STRING string)
ANTLR3_EXCEPTION_struct::state
ANTLR3_UINT32 state
State for NVE.
Definition: antlr3exception.h:185
ANTLR3_INPUT_STREAM_struct::substr
pANTLR3_STRING(* substr)(struct ANTLR3_INPUT_STREAM_struct *input, ANTLR3_MARKER start, ANTLR3_MARKER stop)
Pointer to function to return a substring of the input stream.
Definition: antlr3input.h:170
ANTLR3_BITSET_struct::add
void(* add)(struct ANTLR3_BITSET_struct *bitset, ANTLR3_INT32 bit)
Definition: antlr3bitset.h:97
antlr3VectorSize
static ANTLR3_UINT32 antlr3VectorSize(pANTLR3_VECTOR vector)
Definition: antlr3collections.c:1445
compareUTF16_8
static ANTLR3_UINT32 compareUTF16_8(pANTLR3_STRING string, const char *compStr)
Definition: antlr3string.c:1239
antlr3ParserNewStream
ANTLR3_API pANTLR3_PARSER antlr3ParserNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3parser.c:102
antlr38BitIndex
static ANTLR3_MARKER antlr38BitIndex(pANTLR3_INT_STREAM is)
Calculate the current index in the output stream.
Definition: antlr3inputstream.c:416
ANTLR3_EXCEPTION_struct::node
void * node
If this is a tree parser exception then the node is set to point to the node that caused the issue.
Definition: antlr3exception.h:163
ANTLR3_TYPE_TREE_PARSER
#define ANTLR3_TYPE_TREE_PARSER
Type indicator for a tree parser recognizer.
Definition: antlr3baserecognizer.h:58
dbgRewindLast
static void dbgRewindLast(pANTLR3_INT_STREAM is)
Definition: antlr3tokenstream.c:894
antlr3IntStreamNew
ANTLR3_API pANTLR3_INT_STREAM antlr3IntStreamNew(void)
Definition: antlr3intstream.c:41
ANTLR3_INT_STREAM_struct::mark
ANTLR3_MARKER(* mark)(struct ANTLR3_INT_STREAM_struct *intStream)
Tell the stream to start buffering if it hasn't already.
Definition: antlr3intstream.h:132
pANTLR3_STRING
struct ANTLR3_STRING_struct * pANTLR3_STRING
Pointer to an instantiation of 'class' ANTLR3_STRING
Definition: antlr3interfaces.h:133
antlr3BitsetOR
static pANTLR3_BITSET antlr3BitsetOR(pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2)
Definition: antlr3bitset.c:353
ANTLR3_COMMON_TREE_NODE_STREAM_struct::newDownNode
pANTLR3_BASE_TREE(* newDownNode)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:282
ANTLR3_MISMATCHED_TOKEN_EXCEPTION
#define ANTLR3_MISMATCHED_TOKEN_EXCEPTION
Indicates that the recognizer was expecting one token and found a a different one.
Definition: antlr3exception.h:51
antlr3dfapredict
ANTLR3_API ANTLR3_INT32 antlr3dfapredict(void *ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA cdfa)
From the input stream, predict what alternative will succeed using this DFA (representing the coverin...
Definition: antlr3cyclicdfa.c:79
isNilNode
static ANTLR3_BOOLEAN isNilNode(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3basetreeadaptor.c:906
deleteChild
static void deleteChild(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i)
Definition: antlr3commontreeadaptor.c:465
ANTLR3_RECOGNIZER_SHARED_STATE_struct::sizeHint
ANTLR3_UINT32 sizeHint
Track around a hint from the creator of the recognizer as to how big this thing is going to get,...
Definition: antlr3recognizersharedstate.h:75
ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodes
pANTLR3_VECTOR nodes
The complete mapping from stream index to tree node.
Definition: antlr3commontreenodestream.h:194
ANTLR3_COMMON_TREE_NODE_STREAM_struct::tail
ANTLR3_UINT32 tail
Add new lookahead at lookahead[tail].
Definition: antlr3commontreenodestream.h:258
getChild
static pANTLR3_BASE_TREE getChild(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i)
Definition: antlr3commontreeadaptor.c:454
ANTLR3_BASE_RECOGNIZER_struct::displayRecognitionError
void(* displayRecognitionError)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_UINT8 *tokenNames)
Pointer to a function that is called to display a recognition error message.
Definition: antlr3baserecognizer.h:170
ANTLR3_TOPO_struct::addEdge
void(* addEdge)(struct ANTLR3_TOPO_struct *topo, ANTLR3_UINT32 edge, ANTLR3_UINT32 dependency)
A method that adds an edge from one node to another.
Definition: antlr3collections.h:475
ANTLR3_BASE_TREE_struct::dupTree
void *(* dupTree)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:95
antlr3RewriteRuleNODEStreamNewAE
ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:442
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::rec
pANTLR3_BASE_RECOGNIZER rec
Definition: antlr3rewritestreams.h:101
antlr3collections.h
ANTLR3_HASH_TABLE_struct::get
void *(* get)(struct ANTLR3_HASH_TABLE_struct *table, void *key)
Definition: antlr3collections.h:133
ANTLR3_BASE_TREE_ADAPTOR_struct::replaceChildren
void(* replaceChildren)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, void *t)
Replace from start to stop child index of parent with t, which might be a list.
Definition: antlr3basetreeadaptor.h:142
antlr3EBCDICLA
static ANTLR3_UCHAR antlr3EBCDICLA(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming an 8 bit EBCDIC input.
Definition: antlr3inputstream.c:2041
serializeToken
pANTLR3_STRING serializeToken(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
Definition: antlr3debughandlers.c:418
ANTLR3_COMMON_TOKEN_struct::user3
ANTLR3_UINT32 user3
Because it is a bit more of a hassle to override an ANTLR3_COMMON_TOKEN as the standard structure for...
Definition: antlr3commontoken.h:206
ANTLR3_UNWANTED_TOKEN_EXCEPTION_NAME
#define ANTLR3_UNWANTED_TOKEN_EXCEPTION_NAME
Definition: antlr3exception.h:92
antlr3HashTableNew
ANTLR3_API pANTLR3_HASH_TABLE antlr3HashTableNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:126
ANTLR3_TREE_NODE_STREAM_struct::getTreeSource
pANTLR3_BASE_TREE(* getTreeSource)(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Where is this stream pulling nodes from? This is not the name, but the object that provides node obje...
Definition: antlr3commontreenodestream.h:83
UNI_SUR_LOW_END
#define UNI_SUR_LOW_END
Definition: antlr3convertutf.h:120
ANTLR3_TREE_ADAPTORDebugNew
ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR ANTLR3_TREE_ADAPTORDebugNew(pANTLR3_STRING_FACTORY strFactory, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Debugging version of the tree adaptor (not normally called as generated code calls setDebugEventListe...
Definition: antlr3commontreeadaptor.c:177
ANTLR3_DEBUG_EVENT_LISTENER_struct::tokenString
pANTLR3_STRING tokenString
Used to serialize the values of any particular token we need to send back to the debugger.
Definition: antlr3debugeventlistener.h:89
pANTLR3_COMMON_TREE_NODE_STREAM
struct ANTLR3_COMMON_TREE_NODE_STREAM_struct * pANTLR3_COMMON_TREE_NODE_STREAM
Pointer to an instantiation of 'class' ANTLR3_COMMON_TREE_NODE_STREAM
Definition: antlr3interfaces.h:186
antlr3DebugListenerNewPort
pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNewPort(ANTLR3_UINT32 port)
Definition: antlr3debughandlers.c:147
antlr3CommonTokenNew
ANTLR3_API pANTLR3_COMMON_TOKEN antlr3CommonTokenNew(ANTLR3_UINT32 ttype)
Definition: antlr3commontoken.c:73
dbgAddChild
static void dbgAddChild(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child)
Definition: antlr3basetreeadaptor.c:556
antlr3Hash
ANTLR3_API ANTLR3_UINT32 antlr3Hash(void *key, ANTLR3_UINT32 keylen)
Given an input key of arbitrary length, return a hash value of it.
Definition: antlr3collections.c:834
endResync
static void endResync(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:781
ANTLR3_COMMON_TOKEN_struct::type
ANTLR3_UINT32 type
The actual type of this token.
Definition: antlr3commontoken.h:112
ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeToken
void *(* createTypeToken)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)
Definition: antlr3basetreeadaptor.h:94
toString
static pANTLR3_STRING toString(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:557
pANTLR3_REWRITE_RULE_TOKEN_STREAM
struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct * pANTLR3_REWRITE_RULE_TOKEN_STREAM
Pointer to an instantiation of 'class' ANTLR3_REWRITE_RULE_ELEMENT_STREAM
Definition: antlr3interfaces.h:218
ANTLR3_BASE_TREE_ADAPTOR_struct::setText8
void(* setText8)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, pANTLR3_UINT8 t)
Definition: antlr3basetreeadaptor.h:107
errorNode
static pANTLR3_BASE_TREE errorNode(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_TOKEN_STREAM ctnstream, pANTLR3_COMMON_TOKEN startToken, pANTLR3_COMMON_TOKEN stopToken, pANTLR3_EXCEPTION e)
Definition: antlr3commontreeadaptor.c:239
ANTLR3_DEBUG_EVENT_LISTENER_struct::createNodeTok
void(* createNodeTok)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token)
Announce a new node built from an existing token.
Definition: antlr3debugeventlistener.h:350
createTypeText
static pANTLR3_BASE_TREE createTypeText(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.c:818
ANTLR3_COMMON_TOKEN_struct::setType
void(* setType)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_UINT32 ttype)
Pointer to a function that sets the type of this token.
Definition: antlr3commontoken.h:250
ANTLR3_STACK_struct::push
ANTLR3_BOOLEAN(* push)(struct ANTLR3_STACK_struct *stack, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:211
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::nextToken
void *(* nextToken)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Definition: antlr3rewritestreams.h:119
antlr3UTF16Substr
static pANTLR3_STRING antlr3UTF16Substr(pANTLR3_INPUT_STREAM input, ANTLR3_MARKER start, ANTLR3_MARKER stop)
Return a substring of the UTF16 input stream in newly allocated memory.
Definition: antlr3inputstream.c:1053
ANTLR3_VECTOR_struct::clear
void(* clear)(struct ANTLR3_VECTOR_struct *vector)
Definition: antlr3collections.h:269
ANTLR3_TOKEN_INVALID
#define ANTLR3_TOKEN_INVALID
Indicator of an invalid token.
Definition: antlr3commontoken.h:54
ANTLR3_BASE_RECOGNIZER_struct::mismatchIsUnwantedToken
ANTLR3_BOOLEAN(* mismatchIsUnwantedToken)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_INT_STREAM input, ANTLR3_UINT32 ttype)
Pointer to a function that decides if the token ahead of the current one is the one we were loking fo...
Definition: antlr3baserecognizer.h:132
getCurrentInputSymbol
static void * getCurrentInputSymbol(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)
Definition: antlr3lexer.c:895
ANTLR3_CHARSTREAM
#define ANTLR3_CHARSTREAM
Type indicator for a character stream.
Definition: antlr3intstream.h:70
antlr3VectorClear
static void antlr3VectorClear(pANTLR3_VECTOR vector)
Definition: antlr3collections.c:1136
ANTLR3_VECTOR_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_VECTOR_struct *vector)
Definition: antlr3collections.h:273
ANTLR3_STRING_struct::addi
pANTLR3_UINT8(* addi)(struct ANTLR3_STRING_struct *string, ANTLR3_INT32 i)
Pointer to function that adds the stringified representation of an integer to the string.
Definition: antlr3string.h:151
ANTLR3_LEXER_struct::popCharStream
void(* popCharStream)(struct ANTLR3_LEXER_struct *lexer)
Pointer to a function that abandons the current input stream, whether it is empty or not and reverts ...
Definition: antlr3lexer.h:121
hasUniqueNavigationNodes
static ANTLR3_BOOLEAN hasUniqueNavigationNodes(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Definition: antlr3commontreenodestream.c:794
ANTLR3_TOKEN_STREAM_struct::debugger
pANTLR3_DEBUG_EVENT_LISTENER debugger
Debugger interface, is this is a debugging token stream.
Definition: antlr3tokenstream.h:118
freeIntTrie
static void ANTLR3_CDECL freeIntTrie(void *trie)
Definition: antlr3baserecognizer.c:1838
ANTLR3_BASE_RECOGNIZER_struct::super
void * super
Whatever super structure is providing this interface needs a pointer to itself so that this can be pa...
Definition: antlr3baserecognizer.h:73
setTokenTypeChannel
static void setTokenTypeChannel(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 ttype, ANTLR3_UINT32 channel)
A simple filter mechanism whereby you can tell this token stream to force all tokens of type ttype to...
Definition: antlr3tokenstream.c:666
addChild
static void addChild(pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child)
Definition: antlr3basetree.c:144
ANTLR3_BASE_RECOGNIZER_struct::getCurrentInputSymbol
void *(* getCurrentInputSymbol)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_INT_STREAM istream)
Pointer to a function that returns the current input symbol.
Definition: antlr3baserecognizer.h:306
ANTLR3_HASH_TABLE_struct::doStrdup
ANTLR3_BOOLEAN doStrdup
Whether the hash table should strdup the keys it is given or not.
Definition: antlr3collections.h:124
getLine
static ANTLR3_UINT32 getLine(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:90
ConvertUTF8toUTF16
ConversionResult ConvertUTF8toUTF16(const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:329
ANTLR3_COMMON_TOKEN_struct::charPosition
ANTLR3_INT32 charPosition
The character position in the line that this token was derived from.
Definition: antlr3commontoken.h:136
ANTLR3_TREE_WALK_STATE_struct::currentNode
pANTLR3_BASE_TREE currentNode
Definition: antlr3commontreenodestream.h:322
ANTLR3_TOKEN_FACTORY_struct::unTruc
ANTLR3_COMMON_TOKEN unTruc
Trick to initialize tokens and their API quickly, we set up this token when the factory is created,...
Definition: antlr3commontoken.h:337
ANTLR3_TRIE_ENTRY_struct::ptr
void * ptr
Definition: antlr3collections.h:339
pANTLR3_SOCKADDRT
struct sockaddr_in * pANTLR3_SOCKADDRT
Definition: antlr3defs.h:384
ANTLR3_STRING_struct::to8
struct ANTLR3_STRING_struct *(* to8)(struct ANTLR3_STRING_struct *string)
Pointer to a function that yields an 8 bit string regardless of the encoding of the supplied string.
Definition: antlr3string.h:193
createChildrenList
static void createChildrenList(pANTLR3_BASE_TREE tree)
Create a new vector for holding child nodes using the inbuilt vector factory.
Definition: antlr3commontree.c:393
ANTLR3_ARBORETUM_struct::close
void(* close)(struct ANTLR3_ARBORETUM_struct *factory)
Pointer to a function the destroys the factory.
Definition: antlr3commontree.h:157
ANTLR3_TREE_PARSER_struct
Internal structure representing an element in a hash bucket.
Definition: antlr3treeparser.h:47
e2a
const ANTLR3_UCHAR e2a[256]
Definition: antlr3inputstream.c:1979
ANTLR3_STACK
struct ANTLR3_STACK_struct ANTLR3_STACK
Structure that represents a Stack collection.
pANTLR3_DEBUG_EVENT_LISTENER
struct ANTLR3_DEBUG_EVENT_LISTENER_struct * pANTLR3_DEBUG_EVENT_LISTENER
Pointer to an instantiation of 'class' ANTLR3_DEBUG_EVENT_LISTENER
Definition: antlr3interfaces.h:233
newPool
static ANTLR3_BOOLEAN newPool(pANTLR3_TOKEN_FACTORY factory)
Definition: antlr3commontoken.c:152
ANTLR3_BASE_TREE_struct::getLine
ANTLR3_UINT32(* getLine)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:115
antlr3CommonTreeNodeStreamNew
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNew(pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint)
Definition: antlr3commontreenodestream.c:270
antlr3RewriteRuleNODEStreamNewAE
ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:442
ANTLR3_FACTORY_POOL_SIZE
#define ANTLR3_FACTORY_POOL_SIZE
How many tokens to allocate at once in the token factory.
Definition: antlr3commontoken.h:47
ANTLR3_EXCEPTION_struct::freeCustom
void(* freeCustom)(void *custom)
Pointer to a routine that is called to free the custom exception structure when the exception is dest...
Definition: antlr3exception.h:206
createTokenFromToken
static pANTLR3_COMMON_TOKEN createTokenFromToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_COMMON_TOKEN fromToken)
Tell me how to create a token for use with imaginary token nodes.
Definition: antlr3commontreeadaptor.c:327
pANTLR3_LEX_STATE
struct ANTLR3_LEX_STATE_struct * pANTLR3_LEX_STATE
Pointer to an instantiation of 'class' ANTLR3_LEX_STATE
Definition: antlr3interfaces.h:124
ANTLR3_BASE_TREE_struct::deleteChild
void *(* deleteChild)(struct ANTLR3_BASE_TREE_struct *tree, ANTLR3_UINT32 i)
Definition: antlr3basetree.h:89
ANTLR3_BASE_RECOGNIZER_struct::endBacktrack
void(* endBacktrack)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_UINT32 level, ANTLR3_BOOLEAN successful)
Pointer to a function that is a hook to listen to token consumption during error recovery.
Definition: antlr3baserecognizer.h:206
getTreeAdaptor
static pANTLR3_BASE_TREE_ADAPTOR getTreeAdaptor(pANTLR3_TREE_NODE_STREAM tns)
Definition: antlr3commontreenodestream.c:788
ANTLR3_HASH_TABLE_struct
Structure that tracks a hash table.
Definition: antlr3collections.h:104
isLegalUTF8Sequence
ANTLR3_BOOLEAN isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd)
Definition: antlr3convertutf.c:319
antlr3commontreenodestream.h
Definition of the ANTLR3 common tree node stream.
pANTLR3_INT_STREAM
struct ANTLR3_INT_STREAM_struct * pANTLR3_INT_STREAM
Definition: antlr3interfaces.h:43
pANTLR3_TOKEN_FACTORY
struct ANTLR3_TOKEN_FACTORY_struct * pANTLR3_TOKEN_FACTORY
Pointer to an instantiation of 'class' ANTLR3_TOKEN_FACTORY
Definition: antlr3interfaces.h:67
ANTLR3_COMMON_TOKEN_struct::line
ANTLR3_UINT32 line
The line number in the input stream where this token was derived from.
Definition: antlr3commontoken.h:127
ANTLR3_STACK_struct::get
void *(* get)(struct ANTLR3_STACK_struct *stack, ANTLR3_INTKEY key)
Definition: antlr3collections.h:210
matchAny
static void matchAny(pANTLR3_BASE_RECOGNIZER recognizer)
Consumes the next token, whatever it is, and resets the recognizer state so that it is not in error.
Definition: antlr3baserecognizer.c:489
ANTLR3_LEXER_struct::rec
pANTLR3_BASE_RECOGNIZER rec
Pointer to the implementation of a base recognizer, which the lexer creates and then overrides with i...
Definition: antlr3lexer.h:105
antlr3HashGetI
static void * antlr3HashGetI(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key)
Return the element pointer in the hash table for a particular key value, or NULL if it don't exist (o...
Definition: antlr3collections.c:444
antlr3interfaces.h
Declarations for all the antlr3 C runtime interfaces/classes.
antlr3UTF16LABE
static ANTLR3_UCHAR antlr3UTF16LABE(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming a UTF16 input when the input is Little Endian and the machine is no...
Definition: antlr3inputstream.c:1365
pANTLR3_BITWORD
uint64_t * pANTLR3_BITWORD
Definition: antlr3defs.h:410
DEFAULT_INITIAL_BUFFER_SIZE
#define DEFAULT_INITIAL_BUFFER_SIZE
Token buffer initial size settings ( will auto increase)
Definition: antlr3commontreenodestream.h:46
antlr3RewriteRuleNODEStreamNewAEE
ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:466
reset
static void reset(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Reset the condition of this stream so that it appears we have not consumed any of its elements.
Definition: antlr3rewritestreams.c:510
ANTLR3_TREE_WALK_STATE_struct
This structure is used to save the state information in the treenodestream when walking ahead with cy...
Definition: antlr3commontreenodestream.h:319
ANTLR3_RECOGNIZER_SHARED_STATE_struct::streams
pANTLR3_STACK streams
Input stream stack, which allows the C programmer to switch input streams easily and allow the standa...
Definition: antlr3recognizersharedstate.h:195
antlr3CommonTokenDebugStreamSourceNew
ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenDebugStreamSourceNew(ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Definition: antlr3tokenstream.c:206
ANTLR3_PARSER_struct::getTokenStream
pANTLR3_TOKEN_STREAM(* getTokenStream)(struct ANTLR3_PARSER_struct *parser)
A pointer to a function that returns the token stream for this parser.
Definition: antlr3parser.h:80
ANTLR3_NO_VIABLE_ALT_EXCEPTION
#define ANTLR3_NO_VIABLE_ALT_EXCEPTION
Recognizer could not find a valid alternative from the input.
Definition: antlr3exception.h:59
ANTLR3_TREE_NODE_STREAM
struct ANTLR3_TREE_NODE_STREAM_struct ANTLR3_TREE_NODE_STREAM
getCurrentInputSymbol
static void * getCurrentInputSymbol(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)
Definition: antlr3treeparser.c:189
antlr3EBCDICSetupStream
void antlr3EBCDICSetupStream(pANTLR3_INPUT_STREAM input)
Common function to setup function interface for a EBCDIC input stream.
Definition: antlr3inputstream.c:2020
getMissingSymbol
static void * getMissingSymbol(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
Definition: antlr3lexer.c:901
pANTLR3_UINT64
uint64_t * pANTLR3_UINT64
Definition: antlr3defs.h:409
ANTLR3_RECOGNIZER_SHARED_STATE_struct::exception
pANTLR3_EXCEPTION exception
Points to the first in a possible chain of exceptions that the recognizer has discovered.
Definition: antlr3recognizersharedstate.h:68
ANTLR3_ENC_UTF32
#define ANTLR3_ENC_UTF32
UTF-32 encoding scheme (basically straight 32 bit)
Definition: antlr3defs.h:91
ANTLR3_INPUT_STREAM_struct::charPositionInLine
ANTLR3_INT32 charPositionInLine
The offset within the current line of the current character.
Definition: antlr3input.h:110
pANTLR3_TREE_NODE_STREAM
struct ANTLR3_TREE_NODE_STREAM_struct * pANTLR3_TREE_NODE_STREAM
Pointer to an instantiation of 'class' ANTLR3_TREE_NODE_STREAM
Definition: antlr3interfaces.h:182
UTF8
ANTLR3_UINT8 UTF8
Definition: antlr3convertutf.h:108
ANTLR3_HASH_ENUM_struct::table
pANTLR3_HASH_TABLE table
Definition: antlr3collections.h:161
defineDotEdges
static void defineDotEdges(pANTLR3_BASE_TREE_ADAPTOR adaptor, void *t, pANTLR3_STRING dotSpec)
Definition: antlr3basetreeadaptor.c:240
pANTLR3_SOCKADDRC
struct sockaddr * pANTLR3_SOCKADDRC
Definition: antlr3defs.h:385
ANTLR3_COMMON_TREE_NODE_STREAM_struct::root
pANTLR3_BASE_TREE root
Which tree are we navigating ?
Definition: antlr3commontreenodestream.h:203
ANTLR3_RECOGNIZER_SHARED_STATE_struct::custom
void * custom
Definition: antlr3recognizersharedstate.h:189
closeFactory
static void closeFactory(pANTLR3_STRING_FACTORY factory)
Fascist Capitalist Pig function created to oppress the workers comrade.
Definition: antlr3string.c:787
ANTLR3_BASE_RECOGNIZER_struct
Base tracking context structure for all types of recognizers.
Definition: antlr3baserecognizer.h:68
ANTLR3_LIST
struct ANTLR3_LIST_struct ANTLR3_LIST
Structure that represents a LIST collection.
freeLexer
static void freeLexer(pANTLR3_LEXER lexer)
Free the resources allocated by a lexer.
Definition: antlr3lexer.c:689
ANTLR3_LEX_STATE
struct ANTLR3_LEX_STATE_struct ANTLR3_LEX_STATE
Structure for track lex input states as part of mark() and rewind() of lexer.
antlr3rewritestreams.h
to8_8
static pANTLR3_STRING to8_8(pANTLR3_STRING string)
Definition: antlr3string.c:1415
matchAny
static void matchAny(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:850
antlr3VectorSwap
static ANTLR3_BOOLEAN antlr3VectorSwap(pANTLR3_VECTOR vector, ANTLR3_UINT32 entry1, ANTLR3_UINT32 entry2)
Replace the element at the specified entry point with the supplied entry.
Definition: antlr3collections.c:1415
ANTLR3_BASE_TREE_ADAPTOR_struct::setTokenBoundaries
void(* setTokenBoundaries)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, pANTLR3_COMMON_TOKEN startToken, pANTLR3_COMMON_TOKEN stopToken)
Definition: antlr3basetreeadaptor.h:123
antlr3defs.h
Basic type and constant definitions for ANTLR3 Runtime.
ANTLR3_PARSE_TREE_struct::free
void(* free)(struct ANTLR3_PARSE_TREE_struct *tree)
Definition: antlr3parsetree.h:76
ANTLR3_RECOGNIZER_SHARED_STATE_struct::user3
ANTLR3_UINT32 user3
Definition: antlr3recognizersharedstate.h:188
conversionOK
@ conversionOK
Definition: antlr3convertutf.h:126
ANTLR3_INT16
int16_t ANTLR3_INT16
Definition: antlr3defs.h:402
toTree
static pANTLR3_BASE_TREE toTree(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream, void *element)
We don;t explicitly convert to a tree unless the call goes to nextTree, which means rewrites are hete...
Definition: antlr3rewritestreams.c:721
ANTLR3_RECOGNIZER_SHARED_STATE_struct::user1
ANTLR3_UINT32 user1
User controlled variables that will be installed in a newly created token.
Definition: antlr3recognizersharedstate.h:188
ANTLR3_TEXT_CHARP
#define ANTLR3_TEXT_CHARP
Definition: antlr3commontoken.h:97
ANTLR3_INT64
int64_t ANTLR3_INT64
Definition: antlr3defs.h:404
ANTLR3_LEXER_struct::pushCharStream
void(* pushCharStream)(struct ANTLR3_LEXER_struct *lexer, pANTLR3_INPUT_STREAM input)
Pointer to a function that switches the current character input stream to a new one,...
Definition: antlr3lexer.h:116
ANTLR3_INT_STREAM_struct::release
void(* release)(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_MARKER mark)
You may want to commit to a backtrack but don't want to force the stream to keep bookkeeping objects ...
Definition: antlr3intstream.h:159
ANTLR3_STACK_struct::vector
pANTLR3_VECTOR vector
List that supports the stack structure.
Definition: antlr3collections.h:203
ANTLR3_BASE_RECOGNIZER_struct::synpred
ANTLR3_BOOLEAN(* synpred)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, void *ctx, void(*predicate)(void *ctx))
Pointer to a function that returns whether the supplied grammar function will parse the current input...
Definition: antlr3baserecognizer.h:340
ANTLR3_BASE_TREE_ADAPTOR_struct::free
void(* free)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor)
Definition: antlr3basetreeadaptor.h:144
ANTLR3_HASH_BUCKET_struct::entries
pANTLR3_HASH_ENTRY entries
Pointer to the first entry in the bucket (if any, it may be NULL).
Definition: antlr3collections.h:96
compareS
static ANTLR3_UINT32 compareS(pANTLR3_STRING string, pANTLR3_STRING compStr)
Definition: antlr3string.c:1298
targetExhausted
@ targetExhausted
Definition: antlr3convertutf.h:128
ANTLR3_RECOGNIZER_SHARED_STATE_struct::errorRecovery
ANTLR3_BOOLEAN errorRecovery
This is true when we see an error and before having successfully matched a token.
Definition: antlr3recognizersharedstate.h:87
ANTLR3_EXCEPTION_struct::custom
void * custom
Pointer for you, the programmer to add anything you like to an exception.
Definition: antlr3exception.h:201
newSize8
static pANTLR3_STRING newSize8(pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size)
Creates a new string with enough capacity for size 8 bit characters plus a terminator.
Definition: antlr3string.c:421
ANTLR3_BASE_TREE_struct::u
void * u
Generic void pointer allows the grammar programmer to attach any structure they like to a tree node,...
Definition: antlr3basetree.h:62
setText8
static void setText8(pANTLR3_COMMON_TOKEN token, pANTLR3_UINT8 text)
Definition: antlr3commontoken.c:438
ANTLR3_BASE_RECOGNIZER_struct::beginResync
void(* beginResync)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that is a hook to listen to token consumption during error recovery.
Definition: antlr3baserecognizer.h:191
ANTLR3_PARSE_TREE_struct::toString
pANTLR3_STRING(* toString)(struct ANTLR3_PARSE_TREE_struct *payload)
Return the string representation of the payload (must be installed when the payload is added and poin...
Definition: antlr3parsetree.h:74
addEdge
static void addEdge(pANTLR3_TOPO topo, ANTLR3_UINT32 edge, ANTLR3_UINT32 dependency)
Definition: antlr3collections.c:2356
addChild
static void addChild(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE root, pANTLR3_BASE_TREE child)
Definition: antlr3debughandlers.c:1025
displayRecognitionError
static void displayRecognitionError(pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 *tokenNames)
Default lexer error handler (works for 8 bit streams only!!!)
Definition: antlr3lexer.c:427
ANTLR3_COMMON_TOKEN_struct::user1
ANTLR3_UINT32 user1
Because it is a bit more of a hassle to override an ANTLR3_COMMON_TOKEN as the standard structure for...
Definition: antlr3commontoken.h:194
ANTLR3_DEBUG_EVENT_LISTENER
struct ANTLR3_DEBUG_EVENT_LISTENER_struct ANTLR3_DEBUG_EVENT_LISTENER
The ANTLR3 debugging interface for communicating with ANLTR Works.
ANTLR3_COMMON_TOKEN_struct::getTokenIndex
ANTLR3_MARKER(* getTokenIndex)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that returns an index 0...n-1 of the token in the token input stream.
Definition: antlr3commontoken.h:280
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::add
void(* add)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream, void *el, void(ANTLR3_CDECL *freePtr)(void *))
Add a new pANTLR3_BASE_TREE to this stream.
Definition: antlr3rewritestreams.h:112
getTokenStopIndex
static ANTLR3_MARKER getTokenStopIndex(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:426
dbgCreateTypeText
static pANTLR3_BASE_TREE dbgCreateTypeText(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.c:831
ANTLR3_TRUE
#define ANTLR3_TRUE
Definition: antlr3errors.h:36
ANTLR3_LEX_STATE_struct
Structure for track lex input states as part of mark() and rewind() of lexer.
Definition: antlr3input.h:244
reportError
static void reportError(pANTLR3_BASE_RECOGNIZER rec)
Definition: antlr3lexer.c:411
antlr3StackPeek
static void * antlr3StackPeek(pANTLR3_STACK stack)
Definition: antlr3collections.c:1041
ANTLR3_BASE_RECOGNIZER_struct::recoverFromMismatchedSet
void *(* recoverFromMismatchedSet)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_BITSET_LIST follow)
Pointer to a function that recovers from a mismatched set in the token stream, in a similar manner to...
Definition: antlr3baserecognizer.h:236
antlr3filestream.h
ANTLR3_INTKEY
ANTLR3_UINT32 ANTLR3_INTKEY
Definition: antlr3defs.h:431
ANTLR3_CYCLIC_DFA_struct::specialStateTransition
ANTLR3_INT32(* specialStateTransition)(void *ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, struct ANTLR3_CYCLIC_DFA_struct *dfa, ANTLR3_INT32 s)
Definition: antlr3cyclicdfa.h:71
antlr3BaseRecognizerNew
ANTLR3_API pANTLR3_BASE_RECOGNIZER antlr3BaseRecognizerNew(ANTLR3_UINT32 type, ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3baserecognizer.c:84
tindex
static ANTLR3_MARKER tindex(pANTLR3_INT_STREAM is)
Definition: antlr3tokenstream.c:882
ANTLR3_INPUT_STREAM_struct::getCharPositionInLine
ANTLR3_UINT32(* getCharPositionInLine)(struct ANTLR3_INPUT_STREAM_struct *input)
Pointer to function to return the current offset in the current input stream line.
Definition: antlr3input.h:189
ANTLR3_HASH_TABLE_struct::put
ANTLR3_INT32(* put)(struct ANTLR3_HASH_TABLE_struct *table, void *key, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:134
ANTLR3_RECOGNITION_EX_NAME
#define ANTLR3_RECOGNITION_EX_NAME
Name of exception ANTLR3_RECOGNITION_EXCEPTION.
Definition: antlr3exception.h:46
antlr3BitsetNumBits
static ANTLR3_UINT32 antlr3BitsetNumBits(pANTLR3_BITSET bitset)
Definition: antlr3bitset.c:632
antlr3Fsize
ANTLR3_API ANTLR3_UINT32 antlr3Fsize(pANTLR3_UINT8 fileName)
Definition: antlr3filestream.c:418
ANTLR3_STACK_struct::free
void(* free)(struct ANTLR3_STACK_struct *stack)
Definition: antlr3collections.h:208
ANTLR3_COMMON_TREE_NODE_STREAM_struct::uniqueNavigationNodes
ANTLR3_BOOLEAN uniqueNavigationNodes
If set to ANTLR3_TRUE then the navigation nodes UP, DOWN are duplicated rather than reused within the...
Definition: antlr3commontreenodestream.h:199
ANTLR3_TOKEN_SOURCE_struct::skipToken
ANTLR3_COMMON_TOKEN skipToken
A special pre-allocated token, which is returned by mTokens() if the lexer rule said to just skip the...
Definition: antlr3tokenstream.h:79
append8
static pANTLR3_UINT8 append8(pANTLR3_STRING string, const char *newbit)
Definition: antlr3string.c:800
grow
static void grow(pANTLR3_BITSET bitset, ANTLR3_INT32 newSize)
Definition: antlr3bitset.c:394
dbgSetTokenBoundaries
static void dbgSetTokenBoundaries(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_COMMON_TOKEN startToken, pANTLR3_COMMON_TOKEN stopToken)
Definition: antlr3commontreeadaptor.c:409
newFromTree
static pANTLR3_BASE_TREE newFromTree(pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TREE tree)
Definition: antlr3commontree.c:232
ANTLR3_COMMON_TREE_NODE_STREAM_struct::DOWN
ANTLR3_COMMON_TREE DOWN
Dummy tree node that indicates a descent into a child tree.
Definition: antlr3commontreenodestream.h:165
ANTLR3_TREE_WALK_STATE
struct ANTLR3_TREE_WALK_STATE_struct ANTLR3_TREE_WALK_STATE
This structure is used to save the state information in the treenodestream when walking ahead with cy...
ANTLR3_STRING_FACTORY_struct::newRaw
pANTLR3_STRING(* newRaw)(struct ANTLR3_STRING_FACTORY_struct *factory)
Pointer to function that manufactures an empty string.
Definition: antlr3string.h:221
antlr3HashDeleteI
static void antlr3HashDeleteI(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key)
Takes the element with the supplied key out of the list, and deletes the data calling the supplied fr...
Definition: antlr3collections.c:396
ANTLR3_BASE_TREE_struct::children
pANTLR3_VECTOR children
The list of all the children that belong to this node.
Definition: antlr3basetree.h:67
ANTLR3_DEBUG_EVENT_LISTENER_struct::exitSubRule
void(* exitSubRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Definition: antlr3debugeventlistener.h:124
ANTLR3_VECTOR_struct::void
void(ANTLR3_CDECL *free)(struct ANTLR3_VECTOR_struct *vector)
ANTLR3_BASE_TREE_struct::getCharPositionInLine
ANTLR3_UINT32(* getCharPositionInLine)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:97
ANTLR3_VECTOR_struct::swap
ANTLR3_BOOLEAN(* swap)(struct ANTLR3_VECTOR_struct *, ANTLR3_UINT32 entry1, ANTLR3_UINT32 entry2)
Definition: antlr3collections.h:270
getChildCount
static ANTLR3_UINT32 getChildCount(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:131
ANTLR3_BASE_RECOGNIZER_struct::mismatch
void(* mismatch)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Pointer to a function that works out what to do when a token mismatch occurs, so that Tree parsers ca...
Definition: antlr3baserecognizer.h:144
newPtr8
static pANTLR3_STRING newPtr8(pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Creates a new 8 bit string initialized with the 8 bit characters at the supplied ptr,...
Definition: antlr3string.c:481
ANTLR3_TOPO_struct::sortToArray
pANTLR3_UINT32(* sortToArray)(struct ANTLR3_TOPO_struct *topo)
A method that returns a pointer to an array of sorted node indexes.
Definition: antlr3collections.h:492
setLine
static void setLine(pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 line)
Definition: antlr3commontoken.c:502
antlr3parser.h
Base implementation of an ANTLR3 parser.
ANTLR3_COMMON_TOKEN_struct::lineStart
void * lineStart
The offset into the input stream that the line in which this token resides starts.
Definition: antlr3commontoken.h:132
antlr3baserecognizer.h
Defines the basic structure to support recognizing by either a lexer, parser, or tree parser.
ANTLR3_COMMON_TREE_NODE_STREAM_struct::handleRootnode
pANTLR3_BASE_TREE(* handleRootnode)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:276
ANTLR3_DEBUG_EVENT_LISTENER_struct::rewind
void(* rewind)(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
After an arbitrarily long lookahead as with a cyclic DFA (or with any backtrack), this informs the de...
Definition: antlr3debugeventlistener.h:165
antlr3ListDelete
static void antlr3ListDelete(pANTLR3_LIST list, ANTLR3_INTKEY key)
Definition: antlr3collections.c:916
pANTLR3_TREE_PARSER
struct ANTLR3_TREE_PARSER_struct * pANTLR3_TREE_PARSER
Pointer to an instantiation of 'class' ANTLR3_TREE_PARSER
Definition: antlr3interfaces.h:204
getStopIndex
static ANTLR3_MARKER getStopIndex(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:547
ANTLR3_BASE_RECOGNIZER
struct ANTLR3_BASE_RECOGNIZER_struct ANTLR3_BASE_RECOGNIZER
Base tracking context structure for all types of recognizers.
setDebugListener
static void setDebugListener(pANTLR3_PARSER parser, pANTLR3_DEBUG_EVENT_LISTENER dbg)
Definition: antlr3parser.c:146
ANTLR3_VECTOR_struct::elements
pANTLR3_VECTOR_ELEMENT elements
Array of pointers to vector elements.
Definition: antlr3collections.h:239
antlr3UTF8SetupStream
void antlr3UTF8SetupStream(pANTLR3_INPUT_STREAM input)
Common function to setup function interface for a UTF8 input stream.
Definition: antlr3inputstream.c:1757
ANTLR3_INT32
int32_t ANTLR3_INT32
Definition: antlr3defs.h:403
ANTLR3_FUNC_PTR
#define ANTLR3_FUNC_PTR(ptr)
Definition: antlr3defs.h:427
antlr3HashFree
static void antlr3HashFree(pANTLR3_HASH_TABLE table)
Definition: antlr3collections.c:195
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::reset
void(* reset)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Reset the condition of this stream so that it appears we have not consumed any of its elements.
Definition: antlr3rewritestreams.h:108
ANTLR3_ENC_UTF32BE
#define ANTLR3_ENC_UTF32BE
Definition: antlr3defs.h:92
ANTLR3_SOCKADDRT
struct sockaddr_in ANTLR3_SOCKADDRT
Definition: antlr3defs.h:384
ANTLR3_COMMON_TREE_NODE_STREAM_struct::hasUniqueNavigationNodes
ANTLR3_BOOLEAN(* hasUniqueNavigationNodes)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:289
antlr3RewriteRuleSubtreeStreamNewAEE
ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:395
ANTLR3_INT_TRIE_NODE_struct::leftN
struct ANTLR3_INT_TRIE_NODE_struct * leftN
Pointer to the left node from here when sKey & bitNum = 0
Definition: antlr3collections.h:354
_stat
#define _stat
Definition: antlr3defs.h:353
ANTLR3_TREE_NODE_STREAM_struct::replaceChildren
void(* replaceChildren)(struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t)
Replace from start to stop child index of parent with t, which might be a list.
Definition: antlr3commontreenodestream.h:139
ANTLR3_EXCEPTION_struct::type
ANTLR3_UINT32 type
Set to one of the exception type defines:
Definition: antlr3exception.h:115
ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeTokenText
void *(* createTypeTokenText)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.h:95
ANTLR3_HASH_ENUM_struct
Internal structure representing an enumeration of a table.
Definition: antlr3collections.h:158
ANTLR3_HASH_KEY_struct::iKey
ANTLR3_INTKEY iKey
used if type is ANTLR3_HASH_TYPE_INT
Definition: antlr3collections.h:50
ANTLR3_CLOSESOCKET
#define ANTLR3_CLOSESOCKET
Definition: antlr3defs.h:390
ConvertUTF16toUTF32
ConversionResult ConvertUTF16toUTF32(const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:101
ANTLR3_COMMON_TREE_struct::token
pANTLR3_COMMON_TOKEN token
A single token, this is the payload for the tree.
Definition: antlr3commontree.h:64
beginBacktrack
static void beginBacktrack(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level)
Definition: antlr3debughandlers.c:727
antlr3StackPush
static ANTLR3_BOOLEAN antlr3StackPush(pANTLR3_STACK stack, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.c:1047
ANTLR3_LIST_struct::free
void(* free)(struct ANTLR3_LIST_struct *list)
Definition: antlr3collections.h:186
ANTLR3_HASH_ENUM_struct::next
int(* next)(struct ANTLR3_HASH_ENUM_struct *en, pANTLR3_HASH_KEY *key, void **data)
Definition: antlr3collections.h:173
antlr3exception.h
Contains the definition of a basic ANTLR3 exception structure created by a recognizer when errors are...
antlr3BitsetOf
ANTLR3_API pANTLR3_BITSET antlr3BitsetOf(ANTLR3_INT32 bit,...)
Creates a new bitset with at least one element, but as many elements are required.
Definition: antlr3bitset.c:316
pANTLR3_COMMON_TOKEN
struct ANTLR3_COMMON_TOKEN_struct * pANTLR3_COMMON_TOKEN
Pointer to an instantiation of 'class' ANTLR3_COMMON_TOKEN
Definition: antlr3interfaces.h:71
ANTLR3_COMMON_TREE_NODE_STREAM_struct::getLookaheadSize
ANTLR3_UINT32(* getLookaheadSize)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:291
ANTLR3_HASH_TABLE_struct::del
void(* del)(struct ANTLR3_HASH_TABLE_struct *table, void *key)
Definition: antlr3collections.h:131
hasNext
static ANTLR3_BOOLEAN hasNext(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Returns ANTLR3_TRUE if there is a next element available.
Definition: antlr3rewritestreams.c:750
setType
static void setType(pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 type)
Definition: antlr3commontoken.c:492
ANTLR3_LEXER_struct::setCharStream
void(* setCharStream)(struct ANTLR3_LEXER_struct *lexer, pANTLR3_INPUT_STREAM input)
Pointer to a function that sets the charstream source for the lexer and causes it to be reset.
Definition: antlr3lexer.h:110
ANTLR3_COMMON_TOKEN_struct::channel
ANTLR3_UINT32 channel
The virtual channel that this token exists in.
Definition: antlr3commontoken.h:140
beginResync
static void beginResync(pANTLR3_BASE_RECOGNIZER recognizer)
Definition: antlr3baserecognizer.c:768
ANTLR3_DEBUG_EVENT_LISTENER_struct::rewindLast
void(* rewindLast)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Rewind to the input position of the last marker.
Definition: antlr3debugeventlistener.h:174
ANTLR3_CALLOC
#define ANTLR3_CALLOC(numEl, elSize)
Default definition of ANTLR3_CALLOC.
Definition: antlr3defs.h:469
ANTLR3_INPUT_STREAM_struct::data
void * data
Pointer the start of the input string, characters may be taken as offsets from here and in original i...
Definition: antlr3input.h:72
compareUTF16_UTF16
static ANTLR3_UINT32 compareUTF16_UTF16(pANTLR3_STRING string, const char *compStr)
Definition: antlr3string.c:1268
ANTLR3_STRING_FACTORY_struct::index
ANTLR3_UINT32 index
Definition: antlr3string.h:217
ANTLR3_BASE_RECOGNIZER_struct::exConstruct
void(* exConstruct)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that can construct a generic exception structure with such information as the i...
Definition: antlr3baserecognizer.h:346
ANTLR3_COMMON_TOKEN_struct::setCharPositionInLine
void(* setCharPositionInLine)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_INT32 pos)
Pointer to a function that sets the offset in the line where this token exists.
Definition: antlr3commontoken.h:266
MEMO_RULE_UNKNOWN
#define MEMO_RULE_UNKNOWN
Definition: antlr3errors.h:45
ANTLR3_DEBUG_EVENT_LISTENER_struct::initialized
ANTLR3_BOOLEAN initialized
Indicates whether we have already connected or not.
Definition: antlr3debugeventlistener.h:84
ANTLR3_STRDUP
#define ANTLR3_STRDUP(instr)
Default definition of ANTLR3_STRDUP.
Definition: antlr3defs.h:494
enterDecision
static void enterDecision(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Definition: antlr3debughandlers.c:603
antlr38BitLA_ucase
static ANTLR3_UCHAR antlr38BitLA_ucase(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming an 8 bit input and always return the UPPER CASE character.
Definition: antlr3inputstream.c:377
mismatchIsUnwantedToken
static ANTLR3_BOOLEAN mismatchIsUnwantedToken(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, ANTLR3_UINT32 ttype)
Definition: antlr3baserecognizer.c:529
ANTLR3_COMMON_TREE_NODE_STREAM_struct
Definition: antlr3commontreenodestream.h:145
ANTLR3_ENC_UTF32LE
#define ANTLR3_ENC_UTF32LE
Definition: antlr3defs.h:93
ANTLR3_COMMON_TOKEN_struct::strFactory
pANTLR3_STRING_FACTORY strFactory
A string factory that we can use if we ever need the text of a token and need to manufacture a pANTLR...
Definition: antlr3commontoken.h:123
antlr3read8Bit
ANTLR3_API ANTLR3_UINT32 antlr3read8Bit(pANTLR3_INPUT_STREAM input, pANTLR3_UINT8 fileName)
Definition: antlr3filestream.c:353
ANTLR3_TREE_WALK_STATE_struct::currentChildIndex
ANTLR3_UINT32 currentChildIndex
Definition: antlr3commontreenodestream.h:320
ANTLR3_BASE_TREE_ADAPTOR_struct::deleteChild
void(* deleteChild)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, ANTLR3_UINT32 i)
Definition: antlr3basetreeadaptor.h:111
ANTLR3_STRING_struct::inserti
pANTLR3_UINT8(* inserti)(struct ANTLR3_STRING_struct *string, ANTLR3_UINT32 point, ANTLR3_INT32 i)
Pointer to function that inserts the supplied integer in string form at the specified offset in the c...
Definition: antlr3string.h:141
ANTLR3_TOKEN_STREAM_struct::istream
pANTLR3_INT_STREAM istream
All input streams implement the ANTLR3_INT_STREAM interface...
Definition: antlr3tokenstream.h:114
pANTLR3_HASH_KEY
struct ANTLR3_HASH_KEY_struct * pANTLR3_HASH_KEY
ANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRoot
void(* becomeRoot)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)
Make a node the new root of an existing root.
Definition: antlr3debugeventlistener.h:368
ANTLR3_RECOGNIZER_SHARED_STATE_struct::errorCount
ANTLR3_UINT32 errorCount
When the recognizer terminates, the error handling functions will have incremented this value if any ...
Definition: antlr3recognizersharedstate.h:106
becomeRootToken
static pANTLR3_BASE_TREE becomeRootToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, void *newRoot, pANTLR3_BASE_TREE oldRoot)
Use the adaptor interface to set a new tree node with the supplied token to the root of the tree.
Definition: antlr3basetreeadaptor.c:740
ANTLR3_TOKEN_STREAM_struct::_LT
pANTLR3_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.
Definition: antlr3tokenstream.h:130
ANTLR3_INT_STREAM_struct::super
void * super
Pointer to the super structure that contains this interface.
Definition: antlr3intstream.h:109
antlr3DebugListenerNew
ANTLR3_API pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNew()
Create and initialize a new debug event listener that can be connected to by ANTLRWorks and any other...
Definition: antlr3debughandlers.c:93
ANTLR3_EXCEPTION
struct ANTLR3_EXCEPTION_struct ANTLR3_EXCEPTION
Base structure for an ANTLR3 exception tracker.
ANTLR3_COMMON_TREE_NODE_STREAM_struct::head
ANTLR3_UINT32 head
lookAhead[head] is the first symbol of lookahead, LT(1).
Definition: antlr3commontreenodestream.h:253
ConvertUTF8toUTF16
ConversionResult ConvertUTF8toUTF16(const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:329
nextNodeNode
static pANTLR3_BASE_TREE nextNodeNode(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Definition: antlr3rewritestreams.c:773
newDownNode
static pANTLR3_BASE_TREE newDownNode(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Definition: antlr3commontreenodestream.c:890
ANTLR3_TOKEN_DOWN
#define ANTLR3_TOKEN_DOWN
Imaginary token type to cause a traversal of child nodes in a tree parser.
Definition: antlr3commontoken.h:60
antlr3lexer.h
Base interface for any ANTLR3 lexer.
ANTLR3_LEXER_struct::matchc
ANTLR3_BOOLEAN(* matchc)(struct ANTLR3_LEXER_struct *lexer, ANTLR3_UCHAR c)
Pointer to a function that matches and consumes the specified character from the input stream.
Definition: antlr3lexer.h:152
ANTLR3_TREE_NODE_STREAM_struct::ctns
pANTLR3_COMMON_TREE_NODE_STREAM ctns
Any interface that implements this interface (is a super structure containing this structure),...
Definition: antlr3commontreenodestream.h:61
ANTLR3_LEX_STATE_struct::currentLine
void * currentLine
Pointer into the input buffer where the current line started.
Definition: antlr3input.h:260
ANTLR3_STRING_FACTORY_struct::printable
pANTLR3_STRING(* printable)(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_STRING string)
Pointer to function that returns a copy of the string in printable form without any control character...
Definition: antlr3string.h:258
ANTLR3_LEXER_struct::ctx
void * ctx
A generated lexer has an mTokens() function, which needs the context pointer of the generated lexer,...
Definition: antlr3lexer.h:89
ANTLR3_HASH_TABLE_struct::free
void(* free)(struct ANTLR3_HASH_TABLE_struct *table)
Pointer to function to completely delete this table.
Definition: antlr3collections.h:128
antlr3Fsize
ANTLR3_API ANTLR3_UINT32 antlr3Fsize(pANTLR3_UINT8 filename)
Definition: antlr3filestream.c:418
antlr3BitsetAdd
static void antlr3BitsetAdd(pANTLR3_BITSET bitset, ANTLR3_INT32 bit)
Definition: antlr3bitset.c:378
getCharIndex
static ANTLR3_MARKER getCharIndex(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:873
consumeInitialHiddenTokens
static void consumeInitialHiddenTokens(pANTLR3_INT_STREAM is)
Debug only method to flag consumption of initial off-channel tokens in the input stream.
Definition: antlr3tokenstream.c:416
antlr3UTF32Seek
static void antlr3UTF32Seek(pANTLR3_INT_STREAM is, ANTLR3_MARKER seekPoint)
Rewind the lexer input to the state specified by the supplied mark.
Definition: antlr3inputstream.c:1640
ANTLR3_MISSING_TOKEN_EXCEPTION_NAME
#define ANTLR3_MISSING_TOKEN_EXCEPTION_NAME
Definition: antlr3exception.h:95
antlr3ListPut
static ANTLR3_INT32 antlr3ListPut(pANTLR3_LIST list, ANTLR3_INTKEY key, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.c:958
mismatch
static void mismatch(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Override for standard base recognizer mismatch function as we have DOWN/UP nodes in the stream that h...
Definition: antlr3treeparser.c:174
antlr3HashTableNew
pANTLR3_HASH_TABLE antlr3HashTableNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:126
ANTLR3_BASE_TREE_struct::getText
pANTLR3_STRING(* getText)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:117
antlr3RewriteRuleNODEStreamNewAEE
ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:466
ANTLR3_BASE_RECOGNIZER_struct::toStrings
pANTLR3_HASH_TABLE(* toStrings)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_HASH_TABLE)
Pointer to a function that converts an ANLR3_LIST of tokens to an ANTLR3_LIST of string token names.
Definition: antlr3baserecognizer.h:271
ANTLR3_ENC_UTF16LE
#define ANTLR3_ENC_UTF16LE
Definition: antlr3defs.h:87
ANTLR3_DEBUG_EVENT_LISTENER_struct::endResync
void(* endResync)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Indicates that the recognizer has finished consuming tokens in order to resynchronize.
Definition: antlr3debugeventlistener.h:262
ANTLR3_BASE_RECOGNIZER_struct::consumeUntilSet
void(* consumeUntilSet)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_BITSET set)
Pointer to function that consumes input until the next token matches one in the given set.
Definition: antlr3baserecognizer.h:254
discardTokenType
static void discardTokenType(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_INT32 ttype)
Definition: antlr3tokenstream.c:680
factoryClose
static void factoryClose(pANTLR3_ARBORETUM factory)
Definition: antlr3commontree.c:271
ANTLR3_VECTOR_struct::set
ANTLR3_UINT32(* set)(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry, void *element, void(ANTLR3_CDECL *freeptr)(void *), ANTLR3_BOOLEAN freeExisting)
Definition: antlr3collections.h:272
ANTLR3_COMMON_TREE_NODE_STREAM
struct ANTLR3_COMMON_TREE_NODE_STREAM_struct ANTLR3_COMMON_TREE_NODE_STREAM
getLine
static ANTLR3_UINT32 getLine(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:497
ANTLR3_EXCEPTION_struct::ruleName
void * ruleName
Rule name for failed predicate exception.
Definition: antlr3exception.h:189
ANTLR3_STRING_struct::addc
pANTLR3_UINT8(* addc)(struct ANTLR3_STRING_struct *string, ANTLR3_UINT32 c)
Pointer to function that adds a single character to the end of the string, in the encoding of the str...
Definition: antlr3string.h:146
ANTLR3_EARLY_EXIT_EXCEPTION
#define ANTLR3_EARLY_EXIT_EXCEPTION
Definition: antlr3exception.h:76
isLegalUTF8
static ANTLR3_BOOLEAN isLegalUTF8(const UTF8 *source, int length)
Definition: antlr3convertutf.c:287
antlr3TreeNodeStreamNew
ANTLR3_API pANTLR3_TREE_NODE_STREAM antlr3TreeNodeStreamNew()
Definition: antlr3commontreenodestream.c:88
antlr3VectorFree
static void ANTLR3_CDECL antlr3VectorFree(pANTLR3_VECTOR vector)
Definition: antlr3collections.c:1161
ANTLR3_INPUT_STREAM_struct::_LT
void *(* _LT)(struct ANTLR3_INPUT_STREAM_struct *input, ANTLR3_INT32 lt)
Pointer to function to return input stream element at 1 based offset from nextChar.
Definition: antlr3input.h:158
ANTLR3_TRIE_ENTRY
struct ANTLR3_TRIE_ENTRY_struct ANTLR3_TRIE_ENTRY
Structure that holds the payload entry in an ANTLR3_INT_TRIE or ANTLR3_STRING_TRIE.
pANTLR3_HASH_ENTRY
struct ANTLR3_HASH_ENTRY_struct * pANTLR3_HASH_ENTRY
Pointer to an instantiation of 'class' ANTLR3_HASH_ENTRY
Definition: antlr3interfaces.h:85
ANTLR3_COMMON_TOKEN_struct::setText
void(* setText)(struct ANTLR3_COMMON_TOKEN_struct *token, pANTLR3_STRING text)
Pointer to a function that 'might' be able to set the text associated with a token.
Definition: antlr3commontoken.h:233
antlr38BitSubstr
static pANTLR3_STRING antlr38BitSubstr(pANTLR3_INPUT_STREAM input, ANTLR3_MARKER start, ANTLR3_MARKER stop)
Return a substring of the 8 bit input stream in newly allocated memory.
Definition: antlr3inputstream.c:610
ANTLR3_INT_TRIE_NODE_struct::rightN
struct ANTLR3_INT_TRIE_NODE_struct * rightN
Pointer to the right node from here when sKey & bitNum, = 1
Definition: antlr3collections.h:355
LB
static pANTLR3_COMMON_TOKEN LB(pANTLR3_COMMON_TOKEN_STREAM tokenStream, ANTLR3_INT32 i)
Definition: antlr3tokenstream.c:454
UNI_SUR_LOW_START
#define UNI_SUR_LOW_START
Definition: antlr3convertutf.h:119
pANTLR3_PARSE_TREE
struct ANTLR3_PARSE_TREE_struct * pANTLR3_PARSE_TREE
Pointer to an instantiation of 'class' ANTLR3_PARSE_TREE
Definition: antlr3interfaces.h:177
ANTLR3_HASH_TABLE_struct::putI
ANTLR3_INT32(* putI)(struct ANTLR3_HASH_TABLE_struct *table, ANTLR3_INTKEY key, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:140
ANTLR3_TOKEN_STREAM_struct::tokenSource
pANTLR3_TOKEN_SOURCE tokenSource
Pointer to the token source for this stream.
Definition: antlr3tokenstream.h:104
ANTLR3_COMMON_TREE_NODE_STREAM_struct::stringFactory
pANTLR3_STRING_FACTORY stringFactory
String factory for use by anything that wishes to create strings such as a tree representation or som...
Definition: antlr3commontreenodestream.h:160
transmit
static void transmit(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *ptr)
Definition: antlr3debughandlers.c:323
ANTLR3_COMMON_TREE_NODE_STREAM_struct::visitChild
pANTLR3_BASE_TREE(* visitChild)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_UINT32 child)
Definition: antlr3commontreenodestream.h:278
ANTLR3_LIST_struct::get
void *(* get)(struct ANTLR3_LIST_struct *list, ANTLR3_INTKEY key)
Definition: antlr3collections.h:188
ANTLR3_COMMON_TOKEN_STREAM_struct::reset
void(* reset)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream)
Function that resets the token stream so that it can be reused, but but that does not free up any res...
Definition: antlr3tokenstream.h:291
ANTLR3_RECOGNIZER_SHARED_STATE_struct::following
pANTLR3_STACK following
Track the set of token types that can follow any rule invocation.
Definition: antlr3recognizersharedstate.h:80
ANTLR3_BASE_TREE_struct
A generic tree implementation with no payload.
Definition: antlr3basetree.h:52
ANTLR3_VECTOR_INTERNAL_SIZE
#define ANTLR3_VECTOR_INTERNAL_SIZE
Definition: antlr3collections.h:227
antlr3read8Bit
ANTLR3_API ANTLR3_UINT32 antlr3read8Bit(pANTLR3_INPUT_STREAM input, pANTLR3_UINT8 fileName)
Definition: antlr3filestream.c:353
reuse
static void reuse(pANTLR3_BASE_TREE tree)
Clean up any child vector that the tree might have, so it can be reused, then add it into the reuse s...
Definition: antlr3commontree.c:551
ANTLR3_MALLOC
#define ANTLR3_MALLOC(request)
Default definition of ANTLR3_MALLOC.
Definition: antlr3defs.h:462
ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRoot
void *(* becomeRoot)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *newRoot, void *oldRoot)
Definition: antlr3basetreeadaptor.h:87
antlr38BitReuse
static void antlr38BitReuse(pANTLR3_INPUT_STREAM input, pANTLR3_UINT8 inString, ANTLR3_UINT32 size, pANTLR3_UINT8 name)
Install a new source code in to a working input stream so that the input stream can be reused.
Definition: antlr3inputstream.c:288
ANTLR3_COMMON_TOKEN_struct::index
ANTLR3_MARKER index
What the index of this token is, 0, 1, .., n-2, n-1 tokens.
Definition: antlr3commontoken.h:148
antlr3CommonTreeNodeStreamNewStream
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNewStream(pANTLR3_COMMON_TREE_NODE_STREAM inStream)
Definition: antlr3commontreenodestream.c:132
getStartIndex
static ANTLR3_MARKER getStartIndex(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:537
antlr3SetTokenAPI
ANTLR3_API void antlr3SetTokenAPI(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:349
antlr3Fopen
ANTLR3_API ANTLR3_FDSC antlr3Fopen(pANTLR3_UINT8 filename, const char *mode)
Open an operating system file and return the descriptor We just use the common open() and related fun...
Definition: antlr3filestream.c:404
firstByteMark
static const UTF8 firstByteMark[7]
Definition: antlr3convertutf.c:191
tokLT
static pANTLR3_COMMON_TOKEN tokLT(pANTLR3_TOKEN_STREAM ts, ANTLR3_INT32 k)
Get the ith token from the current position 1..n where k=1 is the first symbol of lookahead.
Definition: antlr3tokenstream.c:352
ANTLR3_VECTOR_struct
Definition: antlr3collections.h:236
ANTLR3_BASE_RECOGNIZER_struct::consumeUntil
void(* consumeUntil)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_UINT32 tokenType)
Pointer to function that consumes input until the next token matches the given token.
Definition: antlr3baserecognizer.h:248
ANTLR3_HASH_BUCKET_struct
Internal structure of a hash table bucket, which tracks all keys that hash to the same bucket.
Definition: antlr3collections.h:91
ANTLR3_MEMMOVE
#define ANTLR3_MEMMOVE(target, source, size)
Default definition of ANTLR3_MEMMOVE.
Definition: antlr3defs.h:506
reportError
static void reportError(pANTLR3_BASE_RECOGNIZER recognizer)
Report a recognition problem.
Definition: antlr3baserecognizer.c:721
noViableAlt
static void noViableAlt(pANTLR3_BASE_RECOGNIZER rec, pANTLR3_CYCLIC_DFA cdfa, ANTLR3_UINT32 s)
Support functions for traversing cyclic DFA states as laid out in static initialized structures by th...
Definition: antlr3cyclicdfa.c:53
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::toTree
pANTLR3_BASE_TREE(* toTree)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream, void *el)
Ensure stream emits trees; tokens must be converted to AST nodes.
Definition: antlr3rewritestreams.h:131
reset
static void reset(pANTLR3_BASE_RECOGNIZER recognizer)
Definition: antlr3baserecognizer.c:2120
ANTLR3_INT_TRIE_struct::free
void(* free)(struct ANTLR3_INT_TRIE_struct *trie)
Definition: antlr3collections.h:386
getParent
static pANTLR3_BASE_TREE getParent(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE child)
Definition: antlr3commontreeadaptor.c:493
ANTLR3_COMMON_TOKEN_struct::getStopIndex
ANTLR3_MARKER(* getStopIndex)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that gets the stop index in the input stream for this token.
Definition: antlr3commontoken.h:297
pANTLR3_CYCLIC_DFA
struct ANTLR3_CYCLIC_DFA_struct * pANTLR3_CYCLIC_DFA
Pointer to an instantiation of 'class' ANTLR3_CYCLIC_DFA
Definition: antlr3interfaces.h:151
ANTLR3_LIST_struct::add
ANTLR3_INT32(* add)(struct ANTLR3_LIST_struct *list, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:190
setDebugListener
static void setDebugListener(pANTLR3_TOKEN_STREAM ts, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Definition: antlr3tokenstream.c:328
pANTLR3_REWRITE_RULE_NODE_STREAM
struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct * pANTLR3_REWRITE_RULE_NODE_STREAM
Pointer to an instantiation of 'class' ANTLR3_REWRITE_RULE_NODE_STREAM
Definition: antlr3interfaces.h:228
getNumberOfSyntaxErrors
static ANTLR3_UINT32 getNumberOfSyntaxErrors(pANTLR3_BASE_RECOGNIZER recognizer)
Return how many syntax errors were detected by this recognizer.
Definition: antlr3baserecognizer.c:1310
ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokSource
pANTLR3_TOKEN_SOURCE tokSource
A lexer is a source of tokens, produced by all the generated (or hand crafted if you like) matching r...
Definition: antlr3recognizersharedstate.h:153
factoryReset
static void factoryReset(pANTLR3_TOKEN_FACTORY factory)
Definition: antlr3commontoken.c:255
ANTLR3_FACTORY_VPOOL_SIZE
#define ANTLR3_FACTORY_VPOOL_SIZE
Default vector pool size if otherwise unspecified.
Definition: antlr3collections.h:279
ANTLR3_INPUT_MASK
#define ANTLR3_INPUT_MASK
Type mask for input stream so we can switch in the above types.
Definition: antlr3intstream.h:87
UNI_REPLACEMENT_CHAR
#define UNI_REPLACEMENT_CHAR
Definition: antlr3convertutf.h:111
ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharIndex
ANTLR3_MARKER tokenStartCharIndex
What character index in the stream did the current token start at? Needed, for example,...
Definition: antlr3recognizersharedstate.h:177
pANTLR3_RECOGNIZER_SHARED_STATE
struct ANTLR3_RECOGNIZER_SHARED_STATE_struct * pANTLR3_RECOGNIZER_SHARED_STATE
Pointer to an instantiation of 'class' ANTLR3_RECOGNIZER_SHARED_STATE
Definition: antlr3interfaces.h:52
ANTLR3_COMMON_TREE_NODE_STREAM_struct::lookAheadLength
ANTLR3_UINT32 lookAheadLength
Number of elements available in the lookahead buffer at any point in time.
Definition: antlr3commontreenodestream.h:249
ANTLR3_COMMON_TREE_NODE_STREAM_struct::free
void(* free)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:299
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::nextNode
pANTLR3_BASE_TREE(* nextNode)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Treat next element as a single node even if it's a subtree.
Definition: antlr3rewritestreams.h:146
ANTLR3_BASE_TREE_struct::savedIndex
ANTLR3_MARKER savedIndex
This is used to store the current child index position while descending and ascending trees as the tr...
Definition: antlr3basetree.h:72
dupTreeNode
static void * dupTreeNode(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream, void *el)
When constructing trees, sometimes we need to dup a token or AST subtree.
Definition: antlr3rewritestreams.c:710
antlr3UTF32SetupStream
void antlr3UTF32SetupStream(pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN machineBigEndian, ANTLR3_BOOLEAN inputBigEndian)
Common function to setup function interface for a UTF3 input stream.
Definition: antlr3inputstream.c:1507
antlr3CommonTokenNew
ANTLR3_API pANTLR3_COMMON_TOKEN antlr3CommonTokenNew(ANTLR3_UINT32 ttype)
Definition: antlr3commontoken.c:73
ANTLR3_BASE_TREE_ADAPTOR_struct::addChildToken
void(* addChildToken)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, pANTLR3_COMMON_TOKEN child)
Definition: antlr3basetreeadaptor.h:80
ANTLR3_MISSING_TOKEN_EXCEPTION
#define ANTLR3_MISSING_TOKEN_EXCEPTION
Definition: antlr3exception.h:94
ANTLR3_STRING_FACTORY_struct::newPtr8
pANTLR3_STRING(* newPtr8)(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Pointer to function that manufactures a string from a given pointer and length.
Definition: antlr3string.h:237
antlr3.h
antlr3UTF16Index
static ANTLR3_MARKER antlr3UTF16Index(pANTLR3_INT_STREAM is)
Calculate the current index in the output stream.
Definition: antlr3inputstream.c:1003
antlr3StackFree
static void antlr3StackFree(pANTLR3_STACK stack)
Definition: antlr3collections.c:1006
antlr3dfaspecialTransition
ANTLR3_API ANTLR3_INT32 antlr3dfaspecialTransition(void *ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s)
Definition: antlr3cyclicdfa.c:201
ANTLR3_INT_TRIE_struct::allowDups
ANTLR3_BOOLEAN allowDups
Definition: antlr3collections.h:380
ANTLR3_STRING_struct::compare8
ANTLR3_UINT32(* compare8)(struct ANTLR3_STRING_struct *string, const char *compStr)
Pointer to function that compares the text of a string to the supplied 8 bit character string and ret...
Definition: antlr3string.h:156
antlr3BitsetFree
static void antlr3BitsetFree(pANTLR3_BITSET bitset)
Definition: antlr3bitset.c:63
computeCSRuleFollow
static pANTLR3_BITSET computeCSRuleFollow(pANTLR3_BASE_RECOGNIZER recognizer)
Compute the context-sensitive FOLLOW set for current rule.
Definition: antlr3baserecognizer.c:939
antlr3IntTrieNew
ANTLR3_API pANTLR3_INT_TRIE antlr3IntTrieNew(ANTLR3_UINT32 depth)
Definition: antlr3collections.c:1809
getChannel
static ANTLR3_UINT32 getChannel(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:517
antlr3FileStreamNew
ANTLR3_API pANTLR3_INPUT_STREAM antlr3FileStreamNew(pANTLR3_UINT8 fileName, ANTLR3_UINT32 encoding)
Definition: antlr3filestream.c:54
matchRange
static ANTLR3_BOOLEAN matchRange(pANTLR3_LEXER lexer, ANTLR3_UCHAR low, ANTLR3_UCHAR high)
Implementation of match range for the lexer, overrides any base implementation in the base recognizer...
Definition: antlr3lexer.c:811
ANTLR3_STRING_FACTORY_struct::newStr
pANTLR3_STRING(* newStr)(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string)
Pointer to function that manufactures a string from a given pointer and works out the length.
Definition: antlr3string.h:243
get
static pANTLR3_COMMON_TOKEN get(pANTLR3_TOKEN_STREAM ts, ANTLR3_UINT32 i)
Definition: antlr3tokenstream.c:497
antlr3basetree.h
Definition of the ANTLR3 base tree.
ANTLR3_TREE_WALK_STATE_struct::tail
ANTLR3_UINT32 tail
Definition: antlr3commontreenodestream.h:327
pANTLR3_BOOLEAN
uint32_t * pANTLR3_BOOLEAN
Definition: antlr3defs.h:412
ANTLR3_REWRITE_RULE_ELEMENT_STREAM
struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM
A generic list of elements tracked in an alternative to be used in a -> rewrite rule.
ANTLR3_DEBUG_EVENT_LISTENER_struct::enterRule
void(* enterRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
The parser has just entered a rule.
Definition: antlr3debugeventlistener.h:106
ANTLR3_BASE_TREE_struct::getParent
struct ANTLR3_BASE_TREE_struct *(* getParent)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:107
antlr3HashRemoveI
static pANTLR3_HASH_ENTRY antlr3HashRemoveI(pANTLR3_HASH_TABLE table, ANTLR3_INTKEY key)
Remove a numeric keyed entry from a hash table if it exists, no error if it does not exist.
Definition: antlr3collections.c:274
ConversionFlags
ConversionFlags
Definition: antlr3convertutf.h:132
antlr3RewriteRuleSubtreeStreamNewAE
ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:373
ANTLR3_BITSET_struct::equals
ANTLR3_BOOLEAN(* equals)(struct ANTLR3_BITSET_struct *bitset1, struct ANTLR3_BITSET_struct *bitset2)
Definition: antlr3bitset.h:99
pANTLR3_LIST
struct ANTLR3_LIST_struct * pANTLR3_LIST
Pointer to an instantiation of 'class' ANTLR3_LIST
Definition: antlr3interfaces.h:98
ANTLR3_INT_TRIE_NODE_struct::buckets
pANTLR3_TRIE_ENTRY buckets
This is the data bucket(s) that the key indexes, which may be NULL
Definition: antlr3collections.h:353
ANTLR3_HASH_TYPE_STR
#define ANTLR3_HASH_TYPE_STR
Indicates the hashed file has numeric keys.
Definition: antlr3collections.h:37
ANTLR3_UINT16
uint16_t ANTLR3_UINT16
Definition: antlr3defs.h:407
antlr3BitsetSetAPI
ANTLR3_API void antlr3BitsetSetAPI(pANTLR3_BITSET bitset)
Definition: antlr3bitset.c:121
ANTLR3_TREE_WALK_STATE_struct::lookAheadLength
ANTLR3_UINT32 lookAheadLength
Definition: antlr3commontreenodestream.h:326
antlr3RewriteRuleElementStreamNewAEV
static pANTLR3_REWRITE_RULE_ELEMENT_STREAM antlr3RewriteRuleElementStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:280
antlr3BitsetCopy
ANTLR3_API pANTLR3_BITSET antlr3BitsetCopy(pANTLR3_BITSET_LIST blist)
Definition: antlr3bitset.c:140
antlr3BitsetLoad
ANTLR3_API pANTLR3_BITSET antlr3BitsetLoad(pANTLR3_BITSET_LIST inBits)
Creates a new bitset with at least one 64 bit bset of bits, but as many 64 bit sets as are required.
Definition: antlr3bitset.c:253
pANTLR3_STACK
struct ANTLR3_STACK_struct * pANTLR3_STACK
Pointer to an instantiation of 'class' ANTLR3_STACK
Definition: antlr3interfaces.h:110
getText
static pANTLR3_STRING getText(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:432
ANTLR3_TREE_NODE_STREAM_struct::istream
pANTLR3_INT_STREAM istream
All input streams implement the ANTLR3_INT_STREAM interface...
Definition: antlr3commontreenodestream.h:65
ANTLR3_BASE_TREE_ADAPTOR_struct::getChildIndex
ANTLR3_INT32(* getChildIndex)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:113
consumeUntilSet
static void consumeUntilSet(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_BITSET set)
Eat tokens from the input stream until we find one that belongs to the supplied set.
Definition: antlr3baserecognizer.c:1766
push
static void push(pANTLR3_COMMON_TREE_NODE_STREAM ctns, ANTLR3_INT32 index)
Definition: antlr3commontreenodestream.c:954
pANTLR3_BITSET_LIST
struct ANTLR3_BITSET_LIST_struct * pANTLR3_BITSET_LIST
Pointer to an instantiation of 'class' ANTLR3_BITSET_LIST.
Definition: antlr3interfaces.h:57
ANTLR3_COMMON_TREE_struct
Interface for an ANTLR3 common tree which is what gets passed around by the AST producing parser.
Definition: antlr3commontree.h:46
ANTLR3_BITSET
struct ANTLR3_BITSET_struct ANTLR3_BITSET
ANTLR3_BASE_TREE_struct::getToken
pANTLR3_COMMON_TOKEN(* getToken)(struct ANTLR3_BASE_TREE_struct *tree)
A pointer to a function that returns the common token pointer for the payload in the supplied tree.
Definition: antlr3basetree.h:81
antlr3ListNew
ANTLR3_API pANTLR3_LIST antlr3ListNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:863
antlr3MTNExceptionNew
ANTLR3_API void antlr3MTNExceptionNew(pANTLR3_BASE_RECOGNIZER recognizer)
Creates a new Mismatched Tree Nde Exception and inserts in the recognizer exception stack.
Definition: antlr3treeparser.c:111
ANTLR3_INPUT_STREAM_struct::getLineBuf
void *(* getLineBuf)(struct ANTLR3_INPUT_STREAM_struct *input)
Pointer to function to return the current line buffer in the input stream The pointer returned is dir...
Definition: antlr3input.h:185
ANTLR3_PARSE_TREE_struct::super
void * super
Any interface that implements methods in this interface may need to point back to itself using this p...
Definition: antlr3parsetree.h:51
ANTLR3_TOKEN_SOURCE_struct::eofToken
ANTLR3_COMMON_TOKEN eofToken
A special pre-allocated token, which signifies End Of Tokens.
Definition: antlr3tokenstream.h:72
ANTLR3_VECTOR_FACTORY_struct
Structure that tracks vectors in a vector and auto deletes the vectors in the vector factory when clo...
Definition: antlr3collections.h:285
setParent
static void setParent(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE child, pANTLR3_BASE_TREE parent)
Definition: antlr3commontreeadaptor.c:488
ANTLR3_DEBUG_EVENT_LISTENER_struct::mark
void(* mark)(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
The parser is going to look arbitrarily ahead; mark this location, the token stream's marker is sent ...
Definition: antlr3debugeventlistener.h:159
endResync
static void endResync(pANTLR3_BASE_RECOGNIZER recognizer)
Definition: antlr3baserecognizer.c:777
intTrieFree
static void intTrieFree(pANTLR3_INT_TRIE trie)
Called to free all nodes and the structure itself.
Definition: antlr3collections.c:2289
ConvertUTF8toUTF32
ConversionResult ConvertUTF8toUTF32(const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:455
rewindLast
static void rewindLast(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:721
ANTLR3_HASH_ENUM_struct::free
void(* free)(struct ANTLR3_HASH_ENUM_struct *table)
Definition: antlr3collections.h:174
expungeRS
static void expungeRS(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Definition: antlr3rewritestreams.c:174
reset
static void reset(pANTLR3_COMMON_TOKEN_STREAM cts)
Definition: antlr3tokenstream.c:163
antlr3StringStreamNew
ANTLR3_API pANTLR3_INPUT_STREAM antlr3StringStreamNew(pANTLR3_UINT8 data, ANTLR3_UINT32 encoding, ANTLR3_UINT32 size, pANTLR3_UINT8 name)
Definition: antlr3filestream.c:89
ANTLR3_MEMCPY
#define ANTLR3_MEMCPY(target, source, size)
Default definition of ANTLR3_MEMCPY.
Definition: antlr3defs.h:500
ANTLR3_BITSET_LIST_struct::bits
pANTLR3_BITWORD bits
Pointer to the allocated array of bits for this bit set, which is an array of 64 bit elements (of the...
Definition: antlr3bitset.h:79
consumeHiddenToken
static void consumeHiddenToken(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
Definition: antlr3debughandlers.c:646
ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodeStack
pANTLR3_STACK nodeStack
As we walk down the nodes, we must track parent nodes so we know where to go after walking the last c...
Definition: antlr3commontreenodestream.h:215
getCurrentInputSymbol
static void * getCurrentInputSymbol(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)
Definition: antlr3baserecognizer.c:2163
ANTLR3_HASH_TABLE_struct::buckets
pANTLR3_HASH_BUCKET buckets
Points to the memory where the array of buckets starts.
Definition: antlr3collections.h:116
antlr3UTF16LA
static ANTLR3_UCHAR antlr3UTF16LA(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming an 8 bit ascii input.
Definition: antlr3inputstream.c:864
pANTLR3_COMMON_TOKEN_STREAM
struct ANTLR3_COMMON_TOKEN_STREAM_struct * pANTLR3_COMMON_TOKEN_STREAM
Pointer to an instantiation of 'class' ANTLR3_COMMON_TOKEN_STREAM
Definition: antlr3interfaces.h:146
ANTLR3_INT_STREAM_struct::getSourceName
pANTLR3_STRING(* getSourceName)(struct ANTLR3_INT_STREAM_struct *intStream)
Definition: antlr3intstream.h:117
numWordsToHold
static ANTLR3_UINT32 numWordsToHold(ANTLR3_UINT32 bit)
Definition: antlr3bitset.c:620
commence
static void commence(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:850
ANTLR3_PARSE_TREE_struct::dupNode
pANTLR3_BASE_TREE(* dupNode)(struct ANTLR3_PARSE_TREE_struct *tree)
How to dup this node.
Definition: antlr3parsetree.h:64
antlr3VectorFactoryNew
ANTLR3_API pANTLR3_VECTOR_FACTORY antlr3VectorFactoryNew(ANTLR3_UINT32 sizeHint)
Vector factory creation.
Definition: antlr3collections.c:1457
antlr3VectorFactoryNew
ANTLR3_API pANTLR3_VECTOR_FACTORY antlr3VectorFactoryNew(ANTLR3_UINT32 sizeHint)
Vector factory creation.
Definition: antlr3collections.c:1457
ANTLR3_ARBORETUM_struct::nilStack
pANTLR3_STACK nilStack
A resuse stack for reclaiming Nil nodes that were used in rewrites and are now dead.
Definition: antlr3commontree.h:147
ANTLR3_INT_TRIE_NODE_struct::key
ANTLR3_INTKEY key
This is the actual key that the entry represents if it is a terminal node
Definition: antlr3collections.h:352
ANTLR3_BITSET_LOG_BITS
#define ANTLR3_BITSET_LOG_BITS
log2 of ANTLR3_BITSET_BITS 2^ANTLR3_BITSET_LOG_BITS = ANTLR3_BITSET_BITS
Definition: antlr3bitset.h:53
ANTLR3_BASE_RECOGNIZER_struct::memoize
void(* memoize)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, ANTLR3_MARKER ruleIndex, ANTLR3_MARKER ruleParseStart)
Pointer to function that records whether the rule has parsed the input at a current position successf...
Definition: antlr3baserecognizer.h:292
ANTLR3_STRING_struct::setS
pANTLR3_UINT8(* setS)(struct ANTLR3_STRING_struct *string, struct ANTLR3_STRING_struct *chars)
Pointer to function that sets the string value to a copy of the supplied string (strings must be in t...
Definition: antlr3string.h:126
ANTLR3_BASE_TREE_ADAPTOR_struct::getType
ANTLR3_UINT32(* getType)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:100
ANTLR3_PARSE_TREE
struct ANTLR3_PARSE_TREE_struct ANTLR3_PARSE_TREE
antlr3StackPop
static void * antlr3StackPop(pANTLR3_STACK stack)
Definition: antlr3collections.c:1018
ANTLR3_LEXER_struct::super
void * super
If there is a super structure that is implementing the lexer, then a pointer to it can be stored here...
Definition: antlr3lexer.h:82
ANTLR3_BASE_RECOGNIZER_struct::reportError
void(* reportError)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function to call to report a recognition problem.
Definition: antlr3baserecognizer.h:164
ANTLR3_STRING_struct::append8
pANTLR3_UINT8(* append8)(struct ANTLR3_STRING_struct *string, const char *newbit)
Pointer to function adds a raw char * type pointer in the default encoding for this string.
Definition: antlr3string.h:108
ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenNames
pANTLR3_UINT8 * tokenNames
Pointer to an array of token names that are generally useful in error reporting.
Definition: antlr3recognizersharedstate.h:128
freeParser
static void freeParser(pANTLR3_TREE_PARSER parser)
Definition: antlr3treeparser.c:127
antlr3EnumNew
pANTLR3_HASH_ENUM antlr3EnumNew(pANTLR3_HASH_TABLE table)
Creates an enumeration structure to traverse the hash table.
Definition: antlr3collections.c:673
ANTLR3_CHAR
int32_t ANTLR3_CHAR
Definition: antlr3defs.h:398
ANTLR3_EXCEPTION_struct::nextException
struct ANTLR3_EXCEPTION_struct * nextException
Pointer to the next exception in the chain (if any)
Definition: antlr3exception.h:193
add
static void add(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream, void *el, void(ANTLR3_CDECL *freePtr)(void *))
Definition: antlr3rewritestreams.c:519
antlr3EnumNext
static int antlr3EnumNext(pANTLR3_HASH_ENUM en, pANTLR3_HASH_KEY *key, void **data)
Return the next entry in the hashtable being traversed by the supplied enumeration.
Definition: antlr3collections.c:729
ANTLR3_TREE_PARSER_struct::getTreeNodeStream
pANTLR3_COMMON_TREE_NODE_STREAM(* getTreeNodeStream)(struct ANTLR3_TREE_PARSER_struct *parser)
Return a pointer to the input stream.
Definition: antlr3treeparser.h:69
ANTLR3_STRING_FACTORY_struct::newStr8
pANTLR3_STRING(* newStr8)(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string)
Pointer to function that manufactures a string from a given pointer and length.
Definition: antlr3string.h:249
antlr3string.h
Simple string interface allows indiscriminate allocation of strings such that they can be allocated a...
newUpNode
static pANTLR3_BASE_TREE newUpNode(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Definition: antlr3commontreenodestream.c:904
sortVector
static void sortVector(pANTLR3_TOPO topo, pANTLR3_VECTOR v)
Definition: antlr3collections.c:2639
antlr3RewriteRuleTOKENStreamNewAE
ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:309
antlr3UTF16SetupStream
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.
Definition: antlr3inputstream.c:709
antlr3BaseTreeAdaptorInit
ANTLR3_API void antlr3BaseTreeAdaptorInit(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Given a pointer to a base tree adaptor structure (which is usually embedded in the super class the im...
Definition: antlr3basetreeadaptor.c:80
combineFollows
static pANTLR3_BITSET combineFollows(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_BOOLEAN exact)
Compute the current followset for the input stream.
Definition: antlr3baserecognizer.c:947
printableUTF16
static pANTLR3_STRING printableUTF16(pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string)
Definition: antlr3string.c:729
ANTLR3_VECTOR_ELEMENT_struct::void
void(ANTLR3_CDECL *freeptr)(void *)
antlr3GenericSetupStream
void antlr3GenericSetupStream(pANTLR3_INPUT_STREAM input)
Definition: antlr3inputstream.c:136
ANTLR3_FPRINTF
#define ANTLR3_FPRINTF
Default definition of fprintf, set this to something other than fprintf before including antlr3....
Definition: antlr3defs.h:528
ANTLR3_STACK_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_STACK_struct *stack)
Definition: antlr3collections.h:212
antlr3BaseTreeAdaptorInit
ANTLR3_API void antlr3BaseTreeAdaptorInit(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_DEBUG_EVENT_LISTENER debugger)
Given a pointer to a base tree adaptor structure (which is usually embedded in the super class the im...
Definition: antlr3basetreeadaptor.c:80
skipOffTokenChannelsReverse
static ANTLR3_UINT32 skipOffTokenChannelsReverse(pANTLR3_COMMON_TOKEN_STREAM tokenStream, ANTLR3_INT32 i)
Definition: antlr3tokenstream.c:1055
ANTLR3_INT_STREAM_struct::free
void(* free)(struct ANTLR3_INT_STREAM_struct *stream)
Frees any resources that were allocated for the implementation of this interface.
Definition: antlr3intstream.h:195
location
static void location(pANTLR3_DEBUG_EVENT_LISTENER delboy, int line, int pos)
Definition: antlr3debughandlers.c:751
dbgCreateTypeToken
static pANTLR3_BASE_TREE dbgCreateTypeToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken)
Definition: antlr3basetreeadaptor.c:775
ANTLR3_COMMON_TREE_struct::childIndex
ANTLR3_INT32 childIndex
What index is this particular node in the child list it belongs to?
Definition: antlr3commontree.h:74
ANTLR3_EXCEPTION_struct::input
pANTLR3_INT_STREAM input
Pointer to the input stream that this exception occurred in.
Definition: antlr3exception.h:197
pANTLR3_TRIE_ENTRY
struct ANTLR3_TRIE_ENTRY_struct * pANTLR3_TRIE_ENTRY
ANTLR3_ARBORETUM_struct::vFactory
pANTLR3_VECTOR_FACTORY vFactory
Pointer to a vector factory that is used to create child list vectors for any child nodes that need t...
Definition: antlr3commontree.h:141
ANTLR3_ARBORETUM_struct::pools
pANTLR3_COMMON_TREE * pools
Pointers to the array of tokens that this factory has produced so far.
Definition: antlr3commontree.h:116
ANTLR3_DEBUG_EVENT_LISTENER_struct
The ANTLR3 debugging interface for communicating with ANLTR Works.
Definition: antlr3debugeventlistener.h:64
getTokensList
static pANTLR3_LIST getTokensList(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, ANTLR3_UINT32 stop, pANTLR3_LIST list)
Definition: antlr3tokenstream.c:770
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::nextTree
pANTLR3_BASE_TREE(* nextTree)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Definition: antlr3rewritestreams.h:118
ANTLR3_TRIE_ENTRY_struct::intVal
ANTLR3_INTKEY intVal
Definition: antlr3collections.h:338
ANTLR3_DEBUG_EVENT_LISTENER_struct::handshake
ANTLR3_BOOLEAN(* handshake)(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Wait for a connection from the debugger and initiate the debugging session.
Definition: antlr3debugeventlistener.h:100
antlr3dfaspecialTransition
ANTLR3_API ANTLR3_INT32 antlr3dfaspecialTransition(void *ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s)
Definition: antlr3cyclicdfa.c:201
newStrUTF16_8
static pANTLR3_STRING newStrUTF16_8(pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string)
Create a new UTF16 string from the supplied, null terminated, 8 bit string pointer.
Definition: antlr3string.c:608
ANTLR3_BITSET_struct::bor
pANTLR3_BITSET(* bor)(struct ANTLR3_BITSET_struct *bitset1, struct ANTLR3_BITSET_struct *bitset2)
Definition: antlr3bitset.h:94
ConvertUTF16toUTF8
ConversionResult ConvertUTF16toUTF8(const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:205
ANTLR3_COMMON_TREE_NODE_STREAM_struct::fill
void(* fill)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_INT32 k)
Definition: antlr3commontreenodestream.h:268
ANTLR3_TOKEN_FACTORY_struct::input
pANTLR3_INPUT_STREAM input
Pointer to an input stream that is using this token factory (may be NULL) which will be assigned to t...
Definition: antlr3commontoken.h:342
getCharPositionInLine
static ANTLR3_UINT32 getCharPositionInLine(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:868
becomeRoot
static void becomeRoot(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)
Definition: antlr3debughandlers.c:1013
pANTLR3_LEXER
struct ANTLR3_LEXER_struct * pANTLR3_LEXER
Pointer to an instantiation of 'class' ANTLR3_LEXER
Definition: antlr3interfaces.h:156
getRuleInvocationStackNamed
static pANTLR3_STACK getRuleInvocationStackNamed(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_UINT8 name)
Definition: antlr3baserecognizer.c:1824
addiUTF16
static pANTLR3_UINT8 addiUTF16(pANTLR3_STRING string, ANTLR3_INT32 i)
Definition: antlr3string.c:1038
ANTLR3_EXCEPTION_struct::decisionNum
ANTLR3_UINT32 decisionNum
decision number for NVE
Definition: antlr3exception.h:181
ANTLR3_LEXER_struct::recover
void(* recover)(struct ANTLR3_LEXER_struct *lexer)
Pointer to a function that recovers from an error found in the input stream.
Definition: antlr3lexer.h:169
mTokens
static void mTokens(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:402
factoryClose
static void factoryClose(pANTLR3_TOKEN_FACTORY factory)
Definition: antlr3commontoken.c:265
pANTLR3_TOKEN_SOURCE
struct ANTLR3_TOKEN_SOURCE_struct * pANTLR3_TOKEN_SOURCE
Pointer to an instantiation of 'class' ANTLR3_TOKEN_SOURCE
Definition: antlr3interfaces.h:138
enterAlt
static void enterAlt(pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt)
Definition: antlr3debughandlers.c:559
dbgRewindStream
static void dbgRewindStream(pANTLR3_INT_STREAM is, ANTLR3_MARKER marker)
Definition: antlr3tokenstream.c:915
ANTLR3_HASH_TABLE_struct::removeI
pANTLR3_HASH_ENTRY(* removeI)(struct ANTLR3_HASH_TABLE_struct *table, ANTLR3_INTKEY key)
Definition: antlr3collections.h:138
ctaFree
static void ctaFree(pANTLR3_BASE_TREE_ADAPTOR adaptor)
Definition: antlr3commontreeadaptor.c:216
ANTLR3_DEBUG_EVENT_LISTENER_struct::nilNode
void(* nilNode)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
A nil was created (even nil nodes have a unique ID...
Definition: antlr3debugeventlistener.h:328
ANTLR3_DEBUG_EVENT_LISTENER_struct::enterAlt
void(* enterAlt)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int alt)
Because rules can have lots of alternatives, it is very useful to know which alt you are entering.
Definition: antlr3debugeventlistener.h:111
ANTLR3_MISMATCHED_EX_NAME
#define ANTLR3_MISMATCHED_EX_NAME
Name of ANTLR3_MISMATCHED_TOKEN_EXCEPTION.
Definition: antlr3exception.h:55
pANTLR3_ARBORETUM
struct ANTLR3_ARBORETUM_struct * pANTLR3_ARBORETUM
Pointer to an instantiation of 'class' ANTLR3_ARBORETUM
Definition: antlr3interfaces.h:173
sortToArray
static pANTLR3_UINT32 sortToArray(pANTLR3_TOPO topo)
Definition: antlr3collections.c:2563
stringInit8
static void stringInit8(pANTLR3_STRING string)
Definition: antlr3string.c:260
ANTLR3_STRING_struct::chars
pANTLR3_UINT8 chars
Pointer to the current string value (starts at NULL unless the string allocator is told to create it ...
Definition: antlr3string.h:61
pANTLR3_TOKEN_STREAM
struct ANTLR3_TOKEN_STREAM_struct * pANTLR3_TOKEN_STREAM
Pointer to an instantiation of 'class' ANTLR3_TOKEN_STREAM
Definition: antlr3interfaces.h:142
antlr3BitsetNew
ANTLR3_API pANTLR3_BITSET antlr3BitsetNew(ANTLR3_UINT32 numBits)
Definition: antlr3bitset.c:76
freshenPACIndexesAll
static void freshenPACIndexesAll(pANTLR3_BASE_TREE tree)
Set the parent and child indexes for all children of the supplied tree.
Definition: antlr3basetree.c:465
fillBufferExt
ANTLR3_API void fillBufferExt(pANTLR3_COMMON_TOKEN_STREAM tokenStream)
Definition: antlr3tokenstream.c:945
getParent
static pANTLR3_BASE_TREE getParent(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:523
newPool
static ANTLR3_BOOLEAN newPool(pANTLR3_VECTOR_FACTORY factory)
Definition: antlr3collections.c:1517
ANTLR3_CYCLIC_DFA_struct::description
const pANTLR3_UCHAR description
What this decision represents.
Definition: antlr3cyclicdfa.h:69
ANTLR3_TREE_ADAPTORNew
ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR ANTLR3_TREE_ADAPTORNew(pANTLR3_STRING_FACTORY strFactory)
Create a new tree adaptor.
Definition: antlr3commontreeadaptor.c:84
ANTLR3_STRING_struct::compareS
ANTLR3_UINT32(* compareS)(struct ANTLR3_STRING_struct *string, struct ANTLR3_STRING_struct *compStr)
Pointer to a function that compares the text of a string with the supplied string (which is assumed t...
Definition: antlr3string.h:168
ANTLR3_VECTOR_ELEMENT_struct::element
void * element
Definition: antlr3collections.h:222
ANTLR3_FDSC
FILE * ANTLR3_FDSC
Definition: antlr3defs.h:417
antlr3UnbufTreeNodeStreamNew
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3UnbufTreeNodeStreamNew(pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint)
ANTLR3_BITSET_LIST_struct::length
ANTLR3_UINT32 length
Length of the current bit set in ANTLR3_UINT64 units.
Definition: antlr3bitset.h:83
antlr3BaseTreeNew
ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:58
ANTLR3_COMMON_TOKEN_STREAM_struct::discardTokenType
void(* discardTokenType)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_INT32 ttype)
Add a particular token type to the discard set.
Definition: antlr3tokenstream.h:253
rewindStream
static void rewindStream(pANTLR3_INT_STREAM is, ANTLR3_MARKER marker)
Definition: antlr3tokenstream.c:910
ANTLR3_LIST_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_LIST_struct *list)
Definition: antlr3collections.h:192
ANTLR3_LIST_struct::remove
void *(* remove)(struct ANTLR3_LIST_struct *list, ANTLR3_INTKEY key)
Definition: antlr3collections.h:189
antlr3ListRemove
static void * antlr3ListRemove(pANTLR3_LIST list, ANTLR3_INTKEY key)
Remove from the list, but don't free the element, just send it back to the caller.
Definition: antlr3collections.c:941
antlr3dfaspecialStateTransition
ANTLR3_API ANTLR3_INT32 antlr3dfaspecialStateTransition(void *ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s)
Default special state implementation.
Definition: antlr3cyclicdfa.c:193
ANTLR3_PARSE_TREE_struct::payload
void * payload
The payload that the parse tree node passes around.
Definition: antlr3parsetree.h:55
antlr3BitsetEquals
static ANTLR3_BOOLEAN antlr3BitsetEquals(pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2)
Definition: antlr3bitset.c:511
ANTLR3_CHARSTREAM_EOF
#define ANTLR3_CHARSTREAM_EOF
Indicates end of character stream and is an invalid Unicode code point.
Definition: antlr3errors.h:40
antlr3BitsetLoad
ANTLR3_API pANTLR3_BITSET antlr3BitsetLoad(pANTLR3_BITSET_LIST blist)
Creates a new bitset with at least one 64 bit bset of bits, but as many 64 bit sets as are required.
Definition: antlr3bitset.c:253
ANTLR3_DEBUG_EVENT_LISTENER_struct::LT
void(* LT)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int i, pANTLR3_COMMON_TOKEN t)
Somebody (anybody) looked ahead.
Definition: antlr3debugeventlistener.h:154
emit
static pANTLR3_COMMON_TOKEN emit(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:642
ANTLR3_BASE_TREE_struct::toString
pANTLR3_STRING(* toString)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:125
getTokenSource
static pANTLR3_TOKEN_SOURCE getTokenSource(pANTLR3_TOKEN_STREAM ts)
Definition: antlr3tokenstream.c:507
ANTLR3_CYCLIC_DFA_struct::min
const ANTLR3_INT32 *const min
Definition: antlr3cyclicdfa.h:79
ANTLR3_STRING_struct::charAt
ANTLR3_UCHAR(* charAt)(struct ANTLR3_STRING_struct *string, ANTLR3_UINT32 offset)
Pointer to a function that returns the character indexed at the supplied offset as a 32 bit character...
Definition: antlr3string.h:173
stringInitUTF16
static void stringInitUTF16(pANTLR3_STRING string)
Definition: antlr3string.c:297
ANTLR3_TOKEN_DEFAULT_CHANNEL
#define ANTLR3_TOKEN_DEFAULT_CHANNEL
Default channel for a token.
Definition: antlr3commontoken.h:77
antlr3ListNew
ANTLR3_API pANTLR3_LIST antlr3ListNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:863
match
static void * match(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
Match current input symbol against ttype.
Definition: antlr3baserecognizer.c:415
ANTLR3_STRING_struct::index
ANTLR3_UINT32 index
Index of string (allocation number) in case someone wants to explicitly release it.
Definition: antlr3string.h:76
size
static ANTLR3_UINT32 size(pANTLR3_INT_STREAM is)
Definition: antlr3tokenstream.c:865
ANTLR3_COMMON_TREE_NODE_STREAM_struct::INVALID_NODE
ANTLR3_COMMON_TREE INVALID_NODE
Dummy node that is returned if we need to indicate an invalid node for any reason.
Definition: antlr3commontreenodestream.h:180
nextNodeToken
static pANTLR3_BASE_TREE nextNodeToken(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Get the next token from the list and create a node for it This is the implementation for token stream...
Definition: antlr3rewritestreams.c:767
ANTLR3_BITSET_MOD_MASK
#define ANTLR3_BITSET_MOD_MASK
We will often need to do a mod operator (i mod nbits).
Definition: antlr3bitset.h:63
ANTLR3_COMMON_TREE_NODE_STREAM_struct::currentNode
pANTLR3_BASE_TREE currentNode
Which node are we currently visiting?
Definition: antlr3commontreenodestream.h:224
ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor
pANTLR3_BASE_TREE_ADAPTOR adaptor
Allows the debug event system to access the adapter in use by the recognizer, if this is a tree parse...
Definition: antlr3debugeventlistener.h:95
ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenStartCharPositionInLine
ANTLR3_INT32 tokenStartCharPositionInLine
The character position of the first character of the current token within the line specified by token...
Definition: antlr3recognizersharedstate.h:171
exitRule
static void exitRule(pANTLR3_DEBUG_EVENT_LISTENER delboy, const char *grammarFileName, const char *ruleName)
Definition: antlr3debughandlers.c:570
nextNode
static pANTLR3_BASE_TREE nextNode(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Treat next element as a single node even if it's a subtree.
Definition: antlr3rewritestreams.c:788
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::next
void *(* next)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Return the next element in the stream.
Definition: antlr3rewritestreams.h:117
compare8
static ANTLR3_UINT32 compare8(pANTLR3_STRING string, const char *compStr)
Definition: antlr3string.c:1229
ANTLR3_INLINE
#define ANTLR3_INLINE
Definition: antlr3defs.h:414
antlr3UTF32SetupStream
void antlr3UTF32SetupStream(pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN machineBigEndian, ANTLR3_BOOLEAN inputBigEndian)
Common function to setup function interface for a UTF3 input stream.
Definition: antlr3inputstream.c:1507
ConvertUTF16toUTF8
ConversionResult ConvertUTF16toUTF8(const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:205
UTF16
ANTLR3_UINT16 UTF16
Definition: antlr3convertutf.h:107
ANTLR3_BASE_TREE_ADAPTOR_struct::dupNode
void *(* dupNode)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *treeNode)
Definition: antlr3basetreeadaptor.h:98
ANTLR3_TREE_ADAPTORNew
ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR ANTLR3_TREE_ADAPTORNew(pANTLR3_STRING_FACTORY strFactory)
Create a new tree adaptor.
Definition: antlr3commontreeadaptor.c:84
freeParser
static void freeParser(pANTLR3_PARSER parser)
Definition: antlr3parser.c:122
ANTLR3_HASH_KEY_struct::key
union ANTLR3_HASH_KEY_struct::@0 key
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::adaptor
pANTLR3_BASE_TREE_ADAPTOR adaptor
Pointer to the tree adaptor in use for this stream.
Definition: antlr3rewritestreams.h:90
antlr3BitsetCopy
ANTLR3_API pANTLR3_BITSET antlr3BitsetCopy(pANTLR3_BITSET_LIST blist)
Definition: antlr3bitset.c:140
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::dirty
ANTLR3_BOOLEAN dirty
Once a node / subtree has been used in a stream, it must be dup'ed from then on.
Definition: antlr3rewritestreams.h:97
ANTLR3_TOKEN_SOURCE
struct ANTLR3_TOKEN_SOURCE_struct ANTLR3_TOKEN_SOURCE
Definition of a token source, which has a pointer to a function that returns the next token (using a ...
antlr38BitGetSourceName
static pANTLR3_STRING antlr38BitGetSourceName(pANTLR3_INT_STREAM is)
Definition: antlr3inputstream.c:193
ANTLR3_TREE_PARSER_struct::ctnstream
pANTLR3_COMMON_TREE_NODE_STREAM ctnstream
Pointer to the common tree node stream for the parser.
Definition: antlr3treeparser.h:61
ANTLR3_INT_STREAM_struct::index
ANTLR3_MARKER(* index)(struct ANTLR3_INT_STREAM_struct *intStream)
Return the current input symbol index 0..n where n indicates the last symbol has been read.
Definition: antlr3intstream.h:137
insert8
static pANTLR3_UINT8 insert8(pANTLR3_STRING string, ANTLR3_UINT32 point, const char *newbit)
Definition: antlr3string.c:1065
ANTLR3_PARSE_TREE_struct::baseTree
ANTLR3_BASE_TREE baseTree
An encapsulated BASE TREE strcuture (NOT a pointer) that perfoms a lot of the dirty work of node mana...
Definition: antlr3parsetree.h:60
ANTLR3_HASH_TYPE_INT
#define ANTLR3_HASH_TYPE_INT
Indicates the hashed file has integer keys.
Definition: antlr3collections.h:36
ANTLR3_STRING_struct::size
ANTLR3_UINT32 size
Current size of the string in bytes including the trailing '\0'.
Definition: antlr3string.h:71
dupTree
static void * dupTree(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:261
ANTLR3_INT_STREAM_struct
Definition: antlr3intstream.h:94
ANTLR3_INPUT_STREAM_struct::free
void(* free)(struct ANTLR3_INPUT_STREAM_struct *input)
Definition: antlr3input.h:135
getTokenRange
static pANTLR3_LIST getTokenRange(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, ANTLR3_UINT32 stop)
Definition: antlr3tokenstream.c:711
ANTLR3_DEBUG_EVENT_LISTENER_struct::socket
SOCKET socket
The socket structure we receive after a successful accept on the serverSocket.
Definition: antlr3debugeventlistener.h:71
ANTLR3_BASE_TREE_ADAPTOR_struct::setParent
void(* setParent)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *child, void *parent)
Definition: antlr3basetreeadaptor.h:81
rewindMark
static void rewindMark(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
Definition: antlr3debughandlers.c:708
inserti8
static pANTLR3_UINT8 inserti8(pANTLR3_STRING string, ANTLR3_UINT32 point, ANTLR3_INT32 i)
Definition: antlr3string.c:1048
rewindLast
static void rewindLast(pANTLR3_INT_STREAM is)
Definition: antlr3tokenstream.c:905
ANTLR3_BASE_TREE_struct::super
void * super
Implementers of this interface sometimes require a pointer to their selves.
Definition: antlr3basetree.h:56
ANTLR3_TOKEN_FACTORY_struct::reset
void(* reset)(struct ANTLR3_TOKEN_FACTORY_struct *factory)
Pointer to a function that resets the factory so you can reuse the pools it has laready allocated.
Definition: antlr3commontoken.h:351
newPtrUTF16_8
static pANTLR3_STRING newPtrUTF16_8(pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Creates a new UTF16 string initialized with the 8 bit characters at the supplied 8 bit character ptr,...
Definition: antlr3string.c:514
ANTLR3_ARBORETUM_struct
ANTLR3 Tree factory interface to create lots of trees efficiently rather than creating and freeing lo...
Definition: antlr3commontree.h:113
antlr3StackSize
static ANTLR3_UINT32 antlr3StackSize(pANTLR3_STACK stack)
Definition: antlr3collections.c:999
ANTLR3_BASE_TREE_ADAPTOR_struct::rulePostProcessing
void *(* rulePostProcessing)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *root)
Definition: antlr3basetreeadaptor.h:89
ANTLR3_STRING_struct::appendS
pANTLR3_UINT8(* appendS)(struct ANTLR3_STRING_struct *string, struct ANTLR3_STRING_struct *newbit)
Pointer to function appends a copy of the characters contained in another string.
Definition: antlr3string.h:131
memoize
static void memoize(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_MARKER ruleIndex, ANTLR3_MARKER ruleParseStart)
Record whether or not this rule parsed the input at this position successfully.
Definition: antlr3baserecognizer.c:1989
antlr38BitSetupStream
void antlr38BitSetupStream(pANTLR3_INPUT_STREAM input)
Common function to setup function interface for an 8 bit input stream.
Definition: antlr3inputstream.c:125
mark
static void mark(pANTLR3_DEBUG_EVENT_LISTENER delboy, ANTLR3_MARKER marker)
Definition: antlr3debughandlers.c:696
newPoolToken
static pANTLR3_COMMON_TOKEN newPoolToken(pANTLR3_TOKEN_FACTORY factory)
Definition: antlr3commontoken.c:205
newToken
static pANTLR3_COMMON_TOKEN newToken(void)
Definition: antlr3commontoken.c:327
ANTLR3_COMMON_TOKEN_STREAM_struct::getTokensSet
pANTLR3_LIST(* getTokensSet)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 start, ANTLR3_UINT32 stop, pANTLR3_BITSET types)
Function that returns all the tokens indicated by the specified bitset, within a range of tokens.
Definition: antlr3tokenstream.h:271
ANTLR3_INPUT_STREAM_struct::reuse
void(* reuse)(struct ANTLR3_INPUT_STREAM_struct *input, pANTLR3_UINT8 inString, ANTLR3_UINT32 size, pANTLR3_UINT8 name)
Pointer to a function that reuses and resets an input stream by supplying a new 'source'.
Definition: antlr3input.h:144
antlr3BitsetOf
ANTLR3_API pANTLR3_BITSET antlr3BitsetOf(ANTLR3_INT32 bit,...)
Creates a new bitset with at least one element, but as many elements are required.
Definition: antlr3bitset.c:316
ANTLR3_UINT8
uint8_t ANTLR3_UINT8
Definition: antlr3defs.h:406
ANTLR3_COMMON_TOKEN_STREAM
struct ANTLR3_COMMON_TOKEN_STREAM_struct ANTLR3_COMMON_TOKEN_STREAM
Common token stream is an implementation of ANTLR_TOKEN_STREAM for the default parsers and recognizer...
ANTLR3_TREE_WALK_STATE_struct::head
ANTLR3_UINT32 head
Definition: antlr3commontreenodestream.h:328
trailingBytesForUTF8
static const ANTLR3_UINT32 trailingBytesForUTF8[256]
Index into the table below with the first byte of a UTF-8 sequence to get the number of trailing byte...
Definition: antlr3inputstream.c:1782
freeTopo
static void freeTopo(pANTLR3_TOPO topo)
Definition: antlr3collections.c:2745
antlr3commontree.h
fillBufferRoot
static void fillBufferRoot(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Walk and fill the tree node buffer from the root tree.
Definition: antlr3commontreenodestream.c:460
antlr3CommonTokenStreamNew
ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenStreamNew(ANTLR3_UINT32 hint)
Definition: antlr3tokenstream.c:254
ANTLR3_COMMON_TOKEN_struct::factoryMade
ANTLR3_BOOLEAN factoryMade
Indicates that a token was produced from the token factory and therefore the the freeToken() method s...
Definition: antlr3commontoken.h:118
antlr3ListGet
static void * antlr3ListGet(pANTLR3_LIST list, ANTLR3_INTKEY key)
Definition: antlr3collections.c:922
setText8
static void setText8(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_UINT8 t)
Dummy implementation - will be supplied by super class.
Definition: antlr3basetreeadaptor.c:877
ANTLR3_BITSET_struct::blist
ANTLR3_BITSET_LIST blist
The actual bits themselves.
Definition: antlr3bitset.h:91
ANTLR3_VECTOR_FACTORY_struct::unTruc
ANTLR3_VECTOR unTruc
Trick to quickly initialize a new vector via memcpy and not a function call.
Definition: antlr3collections.h:301
antlr3HashRemove
static pANTLR3_HASH_ENTRY antlr3HashRemove(pANTLR3_HASH_TABLE table, void *key)
Remove the element in the hash table for a particular key value, if it exists - no error if it does n...
Definition: antlr3collections.c:331
reset
static void reset(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Reset the input stream to the start of the input nodes.
Definition: antlr3commontreenodestream.c:526
getTokensSet
static pANTLR3_LIST getTokensSet(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, ANTLR3_UINT32 stop, pANTLR3_BITSET types)
Given a start and stop index, return a List of all tokens in the token type BitSet.
Definition: antlr3tokenstream.c:720
ANTLR3_PARSER_struct::free
void(* free)(struct ANTLR3_PARSER_struct *parser)
Pointer to a function that knows how to free resources of an ANTLR3 parser.
Definition: antlr3parser.h:84
freshenPACIndexes
static void freshenPACIndexes(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 offset)
Set the parent and child indexes for some of the children of the supplied tree, starting with the chi...
Definition: antlr3basetree.c:474
antlr3InputReset
static void antlr3InputReset(pANTLR3_INPUT_STREAM input)
Reset a re-startable input stream to the start.
Definition: antlr3inputstream.c:261
ANTLR3_EXCEPTION_struct::streamName
pANTLR3_STRING streamName
Name of the file/input source for reporting.
Definition: antlr3exception.h:132
isNilNode
static ANTLR3_BOOLEAN isNilNode(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:427
ANTLR3_TOKEN_STREAM_struct::toString
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 t...
Definition: antlr3tokenstream.h:156
getToken
static pANTLR3_COMMON_TOKEN getToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
setChildIndex
static void setChildIndex(pANTLR3_BASE_TREE tree, ANTLR3_INT32 i)
Definition: antlr3commontree.c:537
ANTLR3_PARSER_struct::tstream
pANTLR3_TOKEN_STREAM tstream
A provider of a tokenstream interface, for the parser to consume tokens from.
Definition: antlr3parser.h:64
antlr3StackGet
static void * antlr3StackGet(pANTLR3_STACK stack, ANTLR3_INTKEY key)
Definition: antlr3collections.c:1035
_next
static void * _next(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Do the work of getting the next element, making sure that it's a tree node or subtree.
Definition: antlr3rewritestreams.c:625
UNI_MAX_UTF16
#define UNI_MAX_UTF16
Definition: antlr3convertutf.h:113
antlr3Fread
ANTLR3_API ANTLR3_UINT32 antlr3Fread(ANTLR3_FDSC fdsc, ANTLR3_UINT32 count, void *data)
Definition: antlr3filestream.c:428
ANTLR3_HASH_TABLE_struct::delI
void(* delI)(struct ANTLR3_HASH_TABLE_struct *table, ANTLR3_INTKEY key)
Definition: antlr3collections.h:137
ANTLR3_TREE_ADAPTOR
struct ANTLR3_BASE_TREE_ADAPTOR_struct ANTLR3_TREE_ADAPTOR
next
static void * next(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Return the next element in the stream.
Definition: antlr3rewritestreams.c:601
ANTLR3_LEXER_struct::matchRange
ANTLR3_BOOLEAN(* matchRange)(struct ANTLR3_LEXER_struct *lexer, ANTLR3_UCHAR low, ANTLR3_UCHAR high)
Pointer to a function that matches any character in the supplied range (I suppose it could be a token...
Definition: antlr3lexer.h:158
ANTLR3_COMMON_TREE
struct ANTLR3_COMMON_TREE_struct ANTLR3_COMMON_TREE
Interface for an ANTLR3 common tree which is what gets passed around by the AST producing parser.
antlr3RewriteRuleElementStreamNewAE
static pANTLR3_REWRITE_RULE_ELEMENT_STREAM antlr3RewriteRuleElementStreamNewAE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
Definition: antlr3rewritestreams.c:187
ANTLR3_HASH_ENTRY_struct::data
void * data
Pointer to the data for this particular entry.
Definition: antlr3collections.h:69
ANTLR3_COMMON_TOKEN_struct::start
ANTLR3_MARKER start
The character offset in the input stream where the text for this token starts.
Definition: antlr3commontoken.h:153
ANTLR3_TOKEN_FACTORY_struct::nextToken
ANTLR3_UINT32 nextToken
The next token to throw out from the pool, will cause a new pool allocation if this exceeds the avail...
Definition: antlr3commontoken.h:332
ANTLR3_COMMON_TOKEN_struct::setLine
void(* setLine)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_UINT32 line)
Pointer to a function that sets the 'line' number where this token reside.
Definition: antlr3commontoken.h:258
returnVector
static void returnVector(pANTLR3_VECTOR_FACTORY factory, pANTLR3_VECTOR vector)
Definition: antlr3collections.c:1500
getToken
static pANTLR3_COMMON_TOKEN getToken(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:400
antlr3EnumNextEntry
static void antlr3EnumNextEntry(pANTLR3_HASH_ENUM en)
Local function to advance the entry pointer of an enumeration structure to the next valid entry (if t...
Definition: antlr3collections.c:765
antlr3TreeParserNewStream
ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_COMMON_TREE_NODE_STREAM ctnstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3treeparser.c:52
appendUTF16_8
static pANTLR3_UINT8 appendUTF16_8(pANTLR3_STRING string, const char *newbit)
Definition: antlr3string.c:826
ANTLR3_BASE_RECOGNIZER_struct::type
ANTLR3_UINT32 type
Indicates the type of recognizer that we are an instance of.
Definition: antlr3baserecognizer.h:86
ANTLR3_EXCEPTION_struct::expectingSet
pANTLR3_BITSET_LIST expectingSet
Indicates a set of tokens that we were expecting to see one of when the error occurred.
Definition: antlr3exception.h:158
ANTLR3_INT_TRIE_struct::count
ANTLR3_UINT32 count
Definition: antlr3collections.h:379
DEFAULT_DEBUGGER_PORT
#define DEFAULT_DEBUGGER_PORT
Default debugging port.
Definition: antlr3debugeventlistener.h:54
ANTLR3_COMMON_TOKEN_STREAM_struct::discardOffChannelToks
void(* discardOffChannelToks)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream, ANTLR3_BOOLEAN discard)
Signal to discard off channel tokens from here on in.
Definition: antlr3tokenstream.h:257
antlr3CommonTreeNodeStreamNewStream
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNewStream(pANTLR3_COMMON_TREE_NODE_STREAM inStream)
Definition: antlr3commontreenodestream.c:132
ANTLR3_MISMATCHED_SET_EXCEPTION
#define ANTLR3_MISMATCHED_SET_EXCEPTION
Definition: antlr3exception.h:67
dbgDupTree
static pANTLR3_BASE_TREE dbgDupTree(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3basetreeadaptor.c:520
ANTLR3_INPUT_STREAM_struct::getLine
ANTLR3_UINT32(* getLine)(struct ANTLR3_INPUT_STREAM_struct *input)
Pointer to function to return the current line number in the input stream.
Definition: antlr3input.h:174
ANTLR3_TOKEN_FACTORY_struct::maxPool
ANTLR3_INT32 maxPool
Maximum pool count we have available.
Definition: antlr3commontoken.h:327
getRuleMemoization
static ANTLR3_MARKER getRuleMemoization(pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_INTKEY ruleIndex, ANTLR3_MARKER ruleParseStart)
Pointer to a function to return whether the rule has parsed input starting at the supplied start inde...
Definition: antlr3baserecognizer.c:1855
ANTLR3_COMMON_TOKEN_STREAM_struct::discardSet
pANTLR3_LIST discardSet
Discared set.
Definition: antlr3tokenstream.h:222
getCharPositionInLine
static ANTLR3_UINT32 getCharPositionInLine(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:487
ANTLR3_EXCEPTION_struct::index
ANTLR3_MARKER index
Indicates the index of the 'token' we were looking at when the exception occurred.
Definition: antlr3exception.h:142
antlr3HashSize
static ANTLR3_UINT32 antlr3HashSize(pANTLR3_HASH_TABLE table)
return the current size of the hash table
Definition: antlr3collections.c:266
ANTLR3_VECTOR
struct ANTLR3_VECTOR_struct ANTLR3_VECTOR
lenientConversion
@ lenientConversion
Definition: antlr3convertutf.h:134
antlr3VectorNew
ANTLR3_API pANTLR3_VECTOR antlr3VectorNew(ANTLR3_UINT32 sizeHint)
Definition: antlr3collections.c:1054
ANTLR3_TEXT_STRING
#define ANTLR3_TEXT_STRING
Definition: antlr3commontoken.h:98
dbgBecomeRoot
static pANTLR3_BASE_TREE dbgBecomeRoot(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)
Definition: antlr3basetreeadaptor.c:691
ANTLR3_RECOGNIZER_SHARED_STATE_struct::backtracking
ANTLR3_INT32 backtracking
If 0, no backtracking is going on.
Definition: antlr3recognizersharedstate.h:111
ANTLR3_BASE_TREE
struct ANTLR3_BASE_TREE_struct ANTLR3_BASE_TREE
A generic tree implementation with no payload.
ANTLR3_COMMON_TOKEN_STREAM_struct::channel
ANTLR3_UINT32 channel
Definition: antlr3tokenstream.h:228
consumeToken
static void consumeToken(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
Definition: antlr3debughandlers.c:626
ANTLR3_BASE_RECOGNIZER_struct::debugger
pANTLR3_DEBUG_EVENT_LISTENER debugger
If set to something other than NULL, then this structure is points to an instance of the debugger int...
Definition: antlr3baserecognizer.h:100
ANTLR3_TREE_PARSER
struct ANTLR3_TREE_PARSER_struct ANTLR3_TREE_PARSER
Internal structure representing an element in a hash bucket.
ANTLR3_PARSER
struct ANTLR3_PARSER_struct ANTLR3_PARSER
This is the main interface for an ANTLR3 parser.
ANTLR3_VECTOR_FACTORY_struct::returnVector
void(* returnVector)(struct ANTLR3_VECTOR_FACTORY_struct *factory, pANTLR3_VECTOR vector)
Function to return a vector to the factory for reuse.
Definition: antlr3collections.h:321
antlr38BitSize
static ANTLR3_UINT32 antlr38BitSize(pANTLR3_INPUT_STREAM input)
Return the size of the current input stream, as an 8Bit file which in this case is the total input.
Definition: antlr3inputstream.c:433
antlr3EBCDICSetupStream
void antlr3EBCDICSetupStream(pANTLR3_INPUT_STREAM input)
Common function to setup function interface for a EBCDIC input stream.
Definition: antlr3inputstream.c:2020
getTokenStartIndex
static ANTLR3_MARKER getTokenStartIndex(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:420
setChild
static void setChild(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 i, pANTLR3_BASE_TREE child)
Definition: antlr3commontreeadaptor.c:459
seek
static void seek(pANTLR3_INT_STREAM is, ANTLR3_MARKER index)
Definition: antlr3tokenstream.c:927
ANTLR3_STRING_struct::toUTF8
struct ANTLR3_STRING_struct *(* toUTF8)(struct ANTLR3_STRING_struct *string)
Pointer to a function that yields a UT8 encoded string of the current string, regardless of the curre...
Definition: antlr3string.h:201
pANTLR3_UINT8
uint8_t * pANTLR3_UINT8
Definition: antlr3defs.h:406
halfMask
#define halfMask
Definition: antlr3convertutf.h:123
ANTLR3_VECTOR_FACTORY_struct::nextVector
ANTLR3_UINT32 nextVector
The next vector available in the pool.
Definition: antlr3collections.h:297
antlr3IntTrieNew
pANTLR3_INT_TRIE antlr3IntTrieNew(ANTLR3_UINT32 depth)
Definition: antlr3collections.c:1809
ANTLR3_EXCEPTION_struct::expecting
ANTLR3_UINT32 expecting
Indicates the token we were expecting to see next when the error occurred.
Definition: antlr3exception.h:152
ANTLR3_COMMON_TREE_NODE_STREAM_struct::isRewriter
ANTLR3_BOOLEAN isRewriter
Indicates whether this node stream was derived from a prior node stream to be used by a rewriting tre...
Definition: antlr3commontreenodestream.h:307
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::_next
void *(* _next)(struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct *stream)
Definition: antlr3rewritestreams.h:120
ANTLR3_HASH_ENTRY_struct::nextEntry
struct ANTLR3_HASH_ENTRY_struct * nextEntry
Pointer to the next entry in this bucket if there is one.
Definition: antlr3collections.h:83
freeRS
static void freeRS(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Definition: antlr3rewritestreams.c:65
rulePostProcessing
static pANTLR3_BASE_TREE rulePostProcessing(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE root)
Transform ^(nil x) to x.
Definition: antlr3basetreeadaptor.c:704
pANTLR3_BASE_TREE_ADAPTOR
struct ANTLR3_BASE_TREE_ADAPTOR_struct * pANTLR3_BASE_TREE_ADAPTOR
Pointer to an instantiation of 'class' #ANTLR3_BASE_TREE_ADAPTOR
Definition: antlr3interfaces.h:195
antlr3TopoNew
ANTLR3_API pANTLR3_TOPO antlr3TopoNew()
Allocate and initialize a new ANTLR3 topological sorter, which can be used to define edges that ident...
Definition: antlr3collections.c:2324
ANTLR3_ENC_UTF8
#define ANTLR3_ENC_UTF8
UTF-8 encoding scheme.
Definition: antlr3defs.h:81
ANTLR3_UNWANTED_TOKEN_EXCEPTION
#define ANTLR3_UNWANTED_TOKEN_EXCEPTION
Definition: antlr3exception.h:91
ANTLR3_COMMON_TOKEN_STREAM_struct::getTokens
pANTLR3_VECTOR(* getTokens)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream)
Function that returns a pointer to the ANTLR3_LIST of all tokens in the stream (this causes the buffe...
Definition: antlr3tokenstream.h:262
antlr3recognizersharedstate.h
While the C runtime does not need to model the state of multiple lexers and parsers in the same way a...
ANTLR3_REALLOC
#define ANTLR3_REALLOC(current, request)
Default definition of ANTLR3_REALLOC.
Definition: antlr3defs.h:476
ANTLR3_BITSET_struct::remove
void(* remove)(struct ANTLR3_BITSET_struct *bitset, ANTLR3_UINT32 bit)
Definition: antlr3bitset.h:102
pANTLR3_UINT16
uint16_t * pANTLR3_UINT16
Definition: antlr3defs.h:407
ANTLR3_INT_STREAM_struct::rewindLast
void(* rewindLast)(struct ANTLR3_INT_STREAM_struct *intStream)
Reset the stream to the last marker position, witouh destryoing the last marker position.
Definition: antlr3intstream.h:152
ANTLR3_PARSER_struct::rec
pANTLR3_BASE_RECOGNIZER rec
A pointer to the base recognizer, where most of the parser functions actually live because they are s...
Definition: antlr3parser.h:59
antlr3BitsetRemove
static void antlr3BitsetRemove(pANTLR3_BITSET bitset, ANTLR3_UINT32 bit)
Definition: antlr3bitset.c:592
createNodeTok
static void createNodeTok(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token)
Definition: antlr3debughandlers.c:1003
antlr3tokenstream.h
Defines the interface for an ANTLR3 common token stream.
ANTLR3_LEXER_struct::matchs
ANTLR3_BOOLEAN(* matchs)(struct ANTLR3_LEXER_struct *lexer, ANTLR3_UCHAR *string)
Pointer to a function that attempts to match and consume the specified string from the input stream.
Definition: antlr3lexer.h:145
ANTLR3_TOKEN_STREAM_struct::get
pANTLR3_COMMON_TOKEN(* get)(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, ANTLR3_UINT32 i)
Get a token at an absolute index i; 0..n-1.
Definition: antlr3tokenstream.h:139
addcUTF16
static pANTLR3_UINT8 addcUTF16(pANTLR3_STRING string, ANTLR3_UINT32 c)
Definition: antlr3string.c:1005
ANTLR3_TOPO_struct::hasCycle
ANTLR3_BOOLEAN hasCycle
A flag that indicates the algorithm found a cycle in the edges such as 9->8->1->9 If this flag is set...
Definition: antlr3collections.h:441
antlr3ListAdd
static ANTLR3_INT32 antlr3ListAdd(pANTLR3_LIST list, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Add the supplied element to the list, at the next available key.
Definition: antlr3collections.c:929
ANTLR3_EXCEPTION_struct::line
ANTLR3_UINT32 line
Track the line at which the error occurred in case this is generated from a lexer.
Definition: antlr3exception.h:173
dupNode
static pANTLR3_BASE_TREE dupNode(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:412
ANTLR3_SUCCESS
#define ANTLR3_SUCCESS
Definition: antlr3errors.h:33
antlr3ParserNewStreamDbg
ANTLR3_API pANTLR3_PARSER antlr3ParserNewStreamDbg(ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_DEBUG_EVENT_LISTENER dbg, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3parser.c:44
ANTLR3_BASE_RECOGNIZER_struct::getRuleInvocationStack
pANTLR3_STACK(* getRuleInvocationStack)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to function that returns an ANTLR3_LIST of the strings that identify the rules in the parser ...
Definition: antlr3baserecognizer.h:263
setUTF16_UTF16
static pANTLR3_UINT8 setUTF16_UTF16(pANTLR3_STRING string, const char *chars)
Definition: antlr3string.c:949
ANTLR3_BASE_RECOGNIZER_struct::endResync
void(* endResync)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that is a hook to listen to token consumption during error recovery.
Definition: antlr3baserecognizer.h:196
antlr3ParserNewStream
ANTLR3_API pANTLR3_PARSER antlr3ParserNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3parser.c:102
ANTLR3_CYCLIC_DFA_struct::accept
const ANTLR3_INT32 *const accept
Definition: antlr3cyclicdfa.h:81
setupInputStream
static void setupInputStream(pANTLR3_INPUT_STREAM input)
Determine endianess of the input stream and install the API required for the encoding in that format.
Definition: antlr3filestream.c:130
getType
static ANTLR3_UINT32 getType(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:442
ANTLR3_BASE_RECOGNIZER_struct::getMissingSymbol
void *(* getMissingSymbol)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
Conjure up a missing token during error recovery.
Definition: antlr3baserecognizer.h:328
ANTLR3_TRIE_ENTRY_struct
Structure that holds the payload entry in an ANTLR3_INT_TRIE or ANTLR3_STRING_TRIE.
Definition: antlr3collections.h:333
ANTLR3_TREE_PARSER_struct::setTreeNodeStream
void(* setTreeNodeStream)(struct ANTLR3_TREE_PARSER_struct *parser, pANTLR3_COMMON_TREE_NODE_STREAM input)
Set the input stream and reset the parser.
Definition: antlr3treeparser.h:65
antlr3TokenStreamFree
static void antlr3TokenStreamFree(pANTLR3_TOKEN_STREAM stream)
Definition: antlr3tokenstream.c:115
ANTLR3_VECTOR_struct::add
ANTLR3_UINT32(* add)(struct ANTLR3_VECTOR_struct *vector, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:271
toStrings
static pANTLR3_HASH_TABLE toStrings(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_HASH_TABLE)
Convenience method for template rewrites - NYI.
Definition: antlr3baserecognizer.c:1832
SOCKET
int SOCKET
Definition: antlr3defs.h:357
createToken
static pANTLR3_COMMON_TOKEN createToken(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_UINT8 text)
Tell me how to create a token for use with imaginary token nodes.
Definition: antlr3commontreeadaptor.c:291
ANTLR3_TOKEN_SOURCE_struct
Definition of a token source, which has a pointer to a function that returns the next token (using a ...
Definition: antlr3tokenstream.h:58
antlr38BitSeek
static void antlr38BitSeek(pANTLR3_INT_STREAM is, ANTLR3_MARKER seekPoint)
Rewind the lexer input to the state specified by the supplied mark.
Definition: antlr3inputstream.c:577
ANTLR3_VECTOR_FACTORY_struct::thisPool
ANTLR3_INT32 thisPool
Count of the vector pools allocated so far (current active pool)
Definition: antlr3collections.h:293
ANTLR3_STRING_struct::len
ANTLR3_UINT32 len
Current length of the string up to and not including, the trailing '\0' Note that the actual allocati...
Definition: antlr3string.h:67
getType
static ANTLR3_UINT32 getType(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:487
ANTLR3_INPUT_STREAM_struct::encoding
ANTLR3_UINT32 encoding
Indicates the encoding scheme used in this input stream.
Definition: antlr3input.h:234
toStringSS
static pANTLR3_STRING toStringSS(pANTLR3_TREE_NODE_STREAM tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop)
Definition: antlr3commontreenodestream.c:818
ANTLR3_BASE_TREE_struct::freshenPACIndexesAll
void(* freshenPACIndexesAll)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:127
ANTLR3_CYCLIC_DFA_struct::specialTransition
ANTLR3_INT32(* specialTransition)(void *ctx, pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, struct ANTLR3_CYCLIC_DFA_struct *dfa, ANTLR3_INT32 s)
Definition: antlr3cyclicdfa.h:73
dupTree
static void * dupTree(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream, void *el)
When constructing trees, sometimes we need to dup a token or AST subtree.
Definition: antlr3rewritestreams.c:696
ANTLR3_HASH_ENTRY_struct::void
void(ANTLR3_CDECL *free)(void *data)
Pointer to routine that knows how to release the memory structure pointed at by data.
ANTLR3_ARBORETUM_struct::newFromToken
pANTLR3_BASE_TREE(* newFromToken)(struct ANTLR3_ARBORETUM_struct *factory, pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontree.h:153
ANTLR3_TOPO
struct ANTLR3_TOPO_struct ANTLR3_TOPO
A topological sort system that given a set of dependencies of a node m on node n, can sort them in de...
antlr3ExceptionNew
ANTLR3_API pANTLR3_EXCEPTION antlr3ExceptionNew(ANTLR3_UINT32 exception, void *name, void *message, ANTLR3_BOOLEAN freeMessage)
Creates a new ANTLR3 exception structure.
Definition: antlr3exception.c:72
createTypeTokenText
static pANTLR3_BASE_TREE createTypeTokenText(pANTLR3_BASE_TREE_ADAPTOR adaptor, ANTLR3_UINT32 tokenType, pANTLR3_COMMON_TOKEN fromToken, pANTLR3_UINT8 text)
Definition: antlr3basetreeadaptor.c:787
ANTLR3_COMMON_TOKEN_STREAM_struct::free
void(* free)(struct ANTLR3_COMMON_TOKEN_STREAM_struct *tokenStream)
Function that knows how to free an ANTLR3_COMMON_TOKEN_STREAM.
Definition: antlr3tokenstream.h:295
setText
static void setText(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_STRING t)
Dummy implementation - will be supplied by super class.
Definition: antlr3basetreeadaptor.c:870
ANTLR3_INT_TRIE_struct::get
pANTLR3_TRIE_ENTRY(* get)(struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key)
Definition: antlr3collections.h:383
dbgConsume
static void dbgConsume(pANTLR3_INT_STREAM is)
As per ordinary consume but notifies the debugger about hidden tokens and so on.
Definition: antlr3tokenstream.c:620
toString
static pANTLR3_STRING toString(pANTLR3_TREE_NODE_STREAM tns)
Print out the entire tree including DOWN/UP nodes.
Definition: antlr3commontreenodestream.c:811
getChildIndex
static ANTLR3_INT32 getChildIndex(pANTLR3_BASE_TREE tree)
Definition: antlr3commontree.c:542
antlr38BitRewindLast
static void antlr38BitRewindLast(pANTLR3_INT_STREAM is)
Rewind the lexer input to the state specified by the last produced mark.
Definition: antlr3inputstream.c:504
antlr3ArboretumNew
ANTLR3_API pANTLR3_ARBORETUM antlr3ArboretumNew(pANTLR3_STRING_FACTORY factory)
Definition: antlr3commontree.c:65
antlr3UTF16ConsumeBE
static void antlr3UTF16ConsumeBE(pANTLR3_INT_STREAM is)
Consume the next character in a UTF16 input stream when the input is Big Endian and the machine is no...
Definition: antlr3inputstream.c:1286
getMissingSymbol
static void * getMissingSymbol(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
Definition: antlr3baserecognizer.c:2172
discardOffChannel
static void discardOffChannel(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_BOOLEAN discard)
Definition: antlr3tokenstream.c:694
ANTLR3_COMMON_TOKEN_struct::getStartIndex
ANTLR3_MARKER(* getStartIndex)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that gets the start index in the input stream for this token.
Definition: antlr3commontoken.h:289
ANTLR3_MARKER
ANTLR3_INT32 ANTLR3_MARKER
Definition: antlr3defs.h:430
ANTLR3_TREE_PARSER_struct::free
void(* free)(struct ANTLR3_TREE_PARSER_struct *parser)
Pointer to a function that knows how to free resources of an ANTLR3 tree parser.
Definition: antlr3treeparser.h:73
ANTLR3_INPUT_STREAM_struct::currentLine
void * currentLine
Pointer into the input buffer where the current line started.
Definition: antlr3input.h:106
antlr3ArboretumNew
ANTLR3_API pANTLR3_ARBORETUM antlr3ArboretumNew(pANTLR3_STRING_FACTORY strFactory)
Definition: antlr3commontree.c:65
endBacktrack
static void endBacktrack(pANTLR3_DEBUG_EVENT_LISTENER delboy, int level, ANTLR3_BOOLEAN successful)
Definition: antlr3debughandlers.c:739
fillBuffer
static void fillBuffer(pANTLR3_COMMON_TOKEN_STREAM tokenStream)
Definition: antlr3tokenstream.c:950
ANTLR3_STRING_struct::set8
pANTLR3_UINT8(* set8)(struct ANTLR3_STRING_struct *string, const char *chars)
Pointer to function that sets the string value to a specific 8 bit string in the default encoding for...
Definition: antlr3string.h:95
ANTLR3_COMMON_TREE_struct::super
void * super
Not used by ANTLR, but if a super structure is created above this structure, it can be used to point ...
Definition: antlr3commontree.h:52
ANTLR3_HASH_KEY_struct::type
ANTLR3_UINT8 type
One of #ANTLR3_HASH_TYPE_INT or #ANTLR3_HASH_TYPE_STR.
Definition: antlr3collections.h:45
ANTLR3_EXCEPTION_struct::print
void(* print)(struct ANTLR3_EXCEPTION_struct *ex)
Definition: antlr3exception.h:207
ANTLR3_EXCEPTION_struct::name
void * name
The string name of the exception.
Definition: antlr3exception.h:119
antlr3CommonTreeNodeStreamFree
static void antlr3CommonTreeNodeStreamFree(pANTLR3_COMMON_TREE_NODE_STREAM ctns)
Free up any resources that belong to this common tree node stream.
Definition: antlr3commontreenodestream.c:420
antlr3RewriteRuleTOKENStreamNewAEE
ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAEE(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
Definition: antlr3rewritestreams.c:333
ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID
ANTLR3_UINT32(* getUniqueID)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *)
Definition: antlr3basetreeadaptor.h:117
appendUTF16_UTF16
static pANTLR3_UINT8 appendUTF16_UTF16(pANTLR3_STRING string, const char *newbit)
Definition: antlr3string.c:858
ANTLR3_TOKEN_STREAM_struct::getTokenSource
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 ...
Definition: antlr3tokenstream.h:146
antlr3CommonTokenStreamSourceNew
ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenStreamSourceNew(ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source)
Definition: antlr3tokenstream.c:235
insertS
static pANTLR3_UINT8 insertS(pANTLR3_STRING string, ANTLR3_UINT32 point, pANTLR3_STRING newbit)
Definition: antlr3string.c:1220
ANTLR3_COMMON_TOKEN_STREAM_struct::tstream
pANTLR3_TOKEN_STREAM tstream
The ANTLR3_TOKEN_STREAM interface implementation, which also includes the intstream implementation.
Definition: antlr3tokenstream.h:198
antlr3LexerNew
ANTLR3_API pANTLR3_LEXER antlr3LexerNew(ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3lexer.c:72
ANTLR3_PARSER_struct::super
void * super
All superstructure implementers of this interface require a pointer to their selves,...
Definition: antlr3parser.h:52
ANTLR3_TOPO_struct::visited
pANTLR3_BITSET visited
The set of visited nodes as determined by a set entry in the bitmap.
Definition: antlr3collections.h:460
subStringUTF16
static pANTLR3_STRING subStringUTF16(pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex)
Definition: antlr3string.c:1357
antlr3MTExceptionNew
ANTLR3_API void antlr3MTExceptionNew(pANTLR3_BASE_RECOGNIZER recognizer)
Creates a new Mismatched Token Exception and inserts in the recognizer exception stack.
Definition: antlr3baserecognizer.c:254
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::singleElement
void * singleElement
Track single elements w/o creating a list.
Definition: antlr3rewritestreams.h:72
ConvertUTF8toUTF32
ConversionResult ConvertUTF8toUTF32(const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:455
trailingBytesForUTF8
static const char trailingBytesForUTF8[256]
Definition: antlr3convertutf.c:165
get
static pANTLR3_BASE_TREE get(pANTLR3_TREE_NODE_STREAM tns, ANTLR3_INT32 k)
Definition: antlr3commontreenodestream.c:943
ANTLR3_FAIL
#define ANTLR3_FAIL
Definition: antlr3errors.h:34
ANTLR3_UINT32_CAST
#define ANTLR3_UINT32_CAST(ptr)
Definition: antlr3defs.h:429
ANTLR3_BASE_TREE_ADAPTOR_struct::getParent
void *(* getParent)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *child)
Definition: antlr3basetreeadaptor.h:82
antlr3cyclicdfa.h
antlr3DebugListenerNew
ANTLR3_API pANTLR3_DEBUG_EVENT_LISTENER antlr3DebugListenerNew()
Create and initialize a new debug event listener that can be connected to by ANTLRWorks and any other...
Definition: antlr3debughandlers.c:93
becomeRoot
static pANTLR3_BASE_TREE becomeRoot(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE newRoot, pANTLR3_BASE_TREE oldRoot)
If oldRoot is a nil root, just copy or move the children to newRoot.
Definition: antlr3basetreeadaptor.c:620
ANTLR3_INPUT_STREAM_struct::setUcaseLA
void(* setUcaseLA)(pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN flag)
Pointer to function that installs a version of LA that always returns upper case.
Definition: antlr3input.h:152
ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct::freeElements
ANTLR3_BOOLEAN freeElements
Indicates whether we should free the vector or it was supplied to us.
Definition: antlr3rewritestreams.h:80
getTreeNodeStream
static pANTLR3_COMMON_TREE_NODE_STREAM getTreeNodeStream(pANTLR3_TREE_PARSER parser)
Return a pointer to the input stream.
Definition: antlr3treeparser.c:163
ANTLR3_BASE_TREE_ADAPTOR_struct::isNilNode
ANTLR3_BOOLEAN(* isNilNode)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:85
ANTLR3_INT_STREAM_struct::seek
void(* seek)(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_MARKER index)
Set the input cursor to the position indicated by index.
Definition: antlr3intstream.h:177
toStringTT
static pANTLR3_STRING toStringTT(pANTLR3_TOKEN_STREAM ts, pANTLR3_COMMON_TOKEN start, pANTLR3_COMMON_TOKEN stop)
Definition: antlr3tokenstream.c:580
setType
static void setType(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_UINT32 type)
Dummy implementation - will be supplied by super class.
Definition: antlr3basetreeadaptor.c:853
getFirstChildWithType
static pANTLR3_BASE_TREE getFirstChildWithType(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 type)
Definition: antlr3basetree.c:95
ANTLR3_COMMON_TREE_struct::baseTree
ANTLR3_BASE_TREE baseTree
An encapsulated BASE TREE structure (NOT a pointer) that performs a lot of the dirty work of node man...
Definition: antlr3commontree.h:104
ANTLR3_BASE_TREE_ADAPTOR_struct::create
void *(* create)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, pANTLR3_COMMON_TOKEN payload)
Definition: antlr3basetreeadaptor.h:93
antlr3SetTokenAPI
ANTLR3_API void antlr3SetTokenAPI(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:349
ANTLR3_TOKEN_STREAM
struct ANTLR3_TOKEN_STREAM_struct ANTLR3_TOKEN_STREAM
Definition of the ANTLR3 common token stream interface.
beginResync
static void beginResync(pANTLR3_DEBUG_EVENT_LISTENER delboy)
Definition: antlr3debughandlers.c:775
ANTLR3_COMMON_TREE_NODE_STREAM_struct::hasNext
ANTLR3_BOOLEAN(* hasNext)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:272
ANTLR3_BASE_RECOGNIZER_struct::getNumberOfSyntaxErrors
ANTLR3_UINT32(* getNumberOfSyntaxErrors)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Get number of recognition errors (lexer, parser, tree parser).
Definition: antlr3baserecognizer.h:180
ANTLR3_TOPO_struct::cycleMark
ANTLR3_UINT32 cycleMark
A watermark used to accumulate potential cycles in the cycle array.
Definition: antlr3collections.h:449
ANTLR3_INPUT_STREAM_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_INPUT_STREAM_struct *input)
Pointer to function to return the total size of the input buffer.
Definition: antlr3input.h:165
ANTLR3_BASE_TREE_struct::addChildren
void(* addChildren)(struct ANTLR3_BASE_TREE_struct *tree, pANTLR3_LIST kids)
Definition: antlr3basetree.h:85
ANTLR3_TREE_PARSER_struct::rec
pANTLR3_BASE_RECOGNIZER rec
A pointer to the base recognizer, where most of the parser functions actually live because they are s...
Definition: antlr3treeparser.h:57
pANTLR3_REWRITE_RULE_SUBTREE_STREAM
struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct * pANTLR3_REWRITE_RULE_SUBTREE_STREAM
Pointer to an instantiation of 'class' #ANTLR3_REWRITE_RULE_SUBSTREE_STREAM.
Definition: antlr3interfaces.h:223
antlr3ListSize
static ANTLR3_UINT32 antlr3ListSize(pANTLR3_LIST list)
Definition: antlr3collections.c:898
ANTLR3_STACK_struct::pop
void *(* pop)(struct ANTLR3_STACK_struct *stack)
Definition: antlr3collections.h:209
ANTLR3_TOPO_struct::free
void(* free)(struct ANTLR3_TOPO_struct *topo)
A method to free this structure and any associated memory.
Definition: antlr3collections.h:503
ANTLR3_COMMON_TREE_NODE_STREAM_struct::addLookahead
void(* addLookahead)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, pANTLR3_BASE_TREE node)
Definition: antlr3commontreenodestream.h:270
ANTLR3_HASH_ENUM
struct ANTLR3_HASH_ENUM_struct ANTLR3_HASH_ENUM
Internal structure representing an enumeration of a table.
ANTLR3_COMMON_TREE_NODE_STREAM_struct::p
ANTLR3_INT32 p
The current index into the nodes vector of the current tree we are parsing and possibly rewriting.
Definition: antlr3commontreenodestream.h:220
halfShift
#define halfShift
Definition: antlr3convertutf.h:121
ANTLR3_INPUT_STREAM_struct::reset
void(* reset)(struct ANTLR3_INPUT_STREAM_struct *input)
Pointer to function that resets the input stream.
Definition: antlr3input.h:139
getDescription
static void * getDescription(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream)
Returns the description string if there is one available (check for NULL).
Definition: antlr3rewritestreams.c:836
antlr38BitSetUcaseLA
static void antlr38BitSetUcaseLA(pANTLR3_INPUT_STREAM input, ANTLR3_BOOLEAN flag)
Definition: antlr3inputstream.c:239
UNI_SUR_HIGH_START
#define UNI_SUR_HIGH_START
Definition: antlr3convertutf.h:117
ANTLR3_TOKEN_STREAM_struct
Definition of the ANTLR3 common token stream interface.
Definition: antlr3tokenstream.h:101
ANTLR3_INT_STREAM_struct::cachedSize
ANTLR3_UINT32 cachedSize
Because the indirect call, though small in individual cases can mount up if there are thousands of to...
Definition: antlr3intstream.h:188
getTokens
static pANTLR3_VECTOR getTokens(pANTLR3_COMMON_TOKEN_STREAM cts)
Definition: antlr3tokenstream.c:700
ANTLR3_TOKEN_STREAM_struct::setTokenSource
void(* setTokenSource)(struct ANTLR3_TOKEN_STREAM_struct *tokenStream, pANTLR3_TOKEN_SOURCE tokenSource)
Function that installs a token source for teh stream.
Definition: antlr3tokenstream.h:150
ANTLR3_TOPO_struct
A topological sort system that given a set of dependencies of a node m on node n, can sort them in de...
Definition: antlr3collections.h:407
ANTLR3_STRING_struct::insert8
pANTLR3_UINT8(* insert8)(struct ANTLR3_STRING_struct *string, ANTLR3_UINT32 point, const char *newbit)
Pointer to function that inserts the supplied string at the specified offset in the current string in...
Definition: antlr3string.h:121
computeErrorRecoverySet
static pANTLR3_BITSET computeErrorRecoverySet(pANTLR3_BASE_RECOGNIZER recognizer)
Compute the error recovery set for the current rule.
Definition: antlr3baserecognizer.c:879
ANTLR3_COMMON_TREE_NODE_STREAM_struct::currentChildIndex
ANTLR3_INT32 currentChildIndex
Which child are we currently visiting? If -1 we have not visited this node yet; next consume() reques...
Definition: antlr3commontreenodestream.h:233
dbgNil
static pANTLR3_BASE_TREE dbgNil(pANTLR3_BASE_TREE_ADAPTOR adaptor)
Definition: antlr3basetreeadaptor.c:447
ANTLR3_HASH_TABLE_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_HASH_TABLE_struct *table)
Definition: antlr3collections.h:142
antlr38BitGetCharPosition
static ANTLR3_UINT32 antlr38BitGetCharPosition(pANTLR3_INPUT_STREAM input)
Return the current offset in to the current line in the input stream.
Definition: antlr3inputstream.c:644
ANTLR3_TRIE_ENTRY_struct::type
ANTLR3_UINT32 type
Definition: antlr3collections.h:334
ANTLR3_BITSET_struct::toIntList
pANTLR3_INT32(* toIntList)(struct ANTLR3_BITSET_struct *bitset)
Definition: antlr3bitset.h:104
ANTLR3_BASE_TREE_ADAPTOR_struct::makeDot
pANTLR3_STRING(* makeDot)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *theTree)
Produce a DOT (see graphviz freeware suite) from a base tree.
Definition: antlr3basetreeadaptor.h:133
wordNumber
static ANTLR3_UINT32 wordNumber(ANTLR3_UINT32 bit)
Definition: antlr3bitset.c:626
ANTLR3_CDECL
#define ANTLR3_CDECL
Definition: antlr3defs.h:360
ANTLR3_DEBUG_EVENT_LISTENER_struct::enterDecision
void(* enterDecision)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Every decision, fixed k or arbitrary, has an enter/exit event so that a GUI can easily track what LT/...
Definition: antlr3debugeventlistener.h:132
dupNode
static pANTLR3_BASE_TREE dupNode(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE treeNode)
Duplicate the supplied node.
Definition: antlr3commontreeadaptor.c:253
antlr3RewriteRuleNODEStreamNewAEV
ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:485
newPoolTree
static pANTLR3_BASE_TREE newPoolTree(pANTLR3_ARBORETUM factory)
Definition: antlr3commontree.c:169
ANTLR3_STRING_struct::factory
pANTLR3_STRING_FACTORY factory
The factory that created this string.
Definition: antlr3string.h:56
ANTLR3_LEXER_struct::getLine
ANTLR3_UINT32(* getLine)(struct ANTLR3_LEXER_struct *lexer)
Pointer to function to return the current line number in the input stream.
Definition: antlr3lexer.h:173
ANTLR3_BASE_RECOGNIZER_struct::free
void(* free)(struct ANTLR3_BASE_RECOGNIZER_struct *recognizer)
Pointer to a function that knows how to free the resources of a base recognizer.
Definition: antlr3baserecognizer.h:354
ANTLR3_COMMON_TOKEN_STREAM_struct::super
void * super
Whatever is supplying the COMMON_TOKEN_STREAM needs a pointer to itself so that this can be accessed ...
Definition: antlr3tokenstream.h:203
ANTLR3_BASE_TREE_struct::setParent
void(* setParent)(struct ANTLR3_BASE_TREE_struct *tree, struct ANTLR3_BASE_TREE_struct *parent)
Definition: antlr3basetree.h:109
ANTLR3_INT_STREAM_struct::_LA
ANTLR3_UINT32(* _LA)(struct ANTLR3_INT_STREAM_struct *intStream, ANTLR3_INT32 i)
Get ANTLR3_UINT32 at current input pointer + i ahead where i=1 is next ANTLR3_UINT32.
Definition: antlr3intstream.h:125
setStopIndex
static void setStopIndex(pANTLR3_COMMON_TOKEN token, ANTLR3_MARKER index)
Definition: antlr3commontoken.c:552
INITIAL_CALL_STACK_SIZE
#define INITIAL_CALL_STACK_SIZE
Definition: antlr3commontreenodestream.h:47
ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeHiddenToken
void(* consumeHiddenToken)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_COMMON_TOKEN t)
An off-channel input token was consumed.
Definition: antlr3debugeventlistener.h:145
recover
static void recover(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:856
setS
static pANTLR3_UINT8 setS(pANTLR3_STRING string, pANTLR3_STRING chars)
Definition: antlr3string.c:1201
ANTLR3_INT_STREAM_struct::consume
void(* consume)(struct ANTLR3_INT_STREAM_struct *intStream)
Consume the next 'ANTR3_UINT32' in the stream.
Definition: antlr3intstream.h:121
fillBufferExt
ANTLR3_API void fillBufferExt(pANTLR3_COMMON_TOKEN_STREAM tokenStream)
Definition: antlr3tokenstream.c:945
getCharPositionInLine
static ANTLR3_UINT32 getCharPositionInLine(pANTLR3_BASE_TREE tree)
Definition: antlr3basetree.c:84
ANTLR3_RECOGNIZER_SHARED_STATE_struct::token
pANTLR3_COMMON_TOKEN token
The goal of all lexer rules/methods is to create a token object.
Definition: antlr3recognizersharedstate.h:142
pANTLR3_HASH_ENUM
struct ANTLR3_HASH_ENUM_struct * pANTLR3_HASH_ENUM
Pointer to an instantiation of 'class' ANTLR3_HASH_ENUM
Definition: antlr3interfaces.h:89
antlr3BitsetSetAPI
ANTLR3_API void antlr3BitsetSetAPI(pANTLR3_BITSET bitset)
Definition: antlr3bitset.c:121
ConvertUTF16toUTF32
ConversionResult ConvertUTF16toUTF32(const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
Definition: antlr3convertutf.c:101
ANTLR3_UINT32
uint32_t ANTLR3_UINT32
Definition: antlr3defs.h:408
antlr3UTF32Consume
static void antlr3UTF32Consume(pANTLR3_INT_STREAM is)
Consume the next character in a UTF32 input stream.
Definition: antlr3inputstream.c:1577
ANTLR3_EXCEPTION_struct::c
ANTLR3_UCHAR c
The current character when an error occurred - for lexers.
Definition: antlr3exception.h:167
antlr3CommonTreeNodeStreamNewTree
ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNewTree(pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint)
Definition: antlr3commontreenodestream.c:116
antlr3TokenStreamNew
ANTLR3_API pANTLR3_TOKEN_STREAM antlr3TokenStreamNew()
Definition: antlr3tokenstream.c:93
ANTLR3_FSTAT_STRUCT
struct stat ANTLR3_FSTAT_STRUCT
Definition: antlr3defs.h:418
ANTLR3_INPUT_STREAM_struct::markDepth
ANTLR3_UINT32 markDepth
Tracks how deep mark() calls are nested.
Definition: antlr3input.h:114
ANTLR3_STRING_FACTORY
struct ANTLR3_STRING_FACTORY_struct ANTLR3_STRING_FACTORY
Definition of the string factory interface, which creates and tracks strings for you of various shape...
antlr3StringStreamNew
ANTLR3_API pANTLR3_INPUT_STREAM antlr3StringStreamNew(pANTLR3_UINT8 data, ANTLR3_UINT32 encoding, ANTLR3_UINT32 size, pANTLR3_UINT8 name)
Definition: antlr3filestream.c:89
ANTLR3_COMMON_TOKEN_struct::getType
ANTLR3_UINT32(* getType)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that returns the token type of this token.
Definition: antlr3commontoken.h:246
ANTLR3_BASE_TREE_struct::setChild
void(* setChild)(struct ANTLR3_BASE_TREE_struct *tree, ANTLR3_UINT32 i, void *child)
Definition: antlr3basetree.h:121
antlr3GenericSetupStream
void antlr3GenericSetupStream(pANTLR3_INPUT_STREAM input)
Definition: antlr3inputstream.c:136
antlr3Fclose
ANTLR3_API void antlr3Fclose(ANTLR3_FDSC fd)
Close an operating system file and free any handles etc.
Definition: antlr3filestream.c:413
ANTLR3_EOR_TOKEN_TYPE
#define ANTLR3_EOR_TOKEN_TYPE
Definition: antlr3commontoken.h:56
ANTLR3_VECTOR_FACTORY_struct::newVector
pANTLR3_VECTOR(* newVector)(struct ANTLR3_VECTOR_FACTORY_struct *factory)
Function to supply a new vector.
Definition: antlr3collections.h:317
ANTLR3_DEBUG_EVENT_LISTENER_struct::setTokenBoundaries
void(* setTokenBoundaries)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t, ANTLR3_MARKER tokenStartIndex, ANTLR3_MARKER tokenStopIndex)
Set the token start/stop token index for a subtree root or node.
Definition: antlr3debugeventlistener.h:384
ANTLR3_TREE_NODE_STREAM_struct::toStringWork
void(* toStringWork)(struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop, pANTLR3_STRING buf)
Return the text of all nodes from start to stop, inclusive, into the supplied buffer.
Definition: antlr3commontreenodestream.h:115
ANTLR3_COMMON_TREE_NODE_STREAM_struct::pop
ANTLR3_INT32(* pop)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:295
ANTLR3_HASH_KEY_struct
Definition: antlr3collections.h:44
antlr3ExceptionNew
pANTLR3_EXCEPTION antlr3ExceptionNew(ANTLR3_UINT32 exception, void *name, void *message, ANTLR3_BOOLEAN freeMessage)
Creates a new ANTLR3 exception structure.
Definition: antlr3exception.c:72
ANTLR3_COMMON_TOKEN_struct::user2
ANTLR3_UINT32 user2
Because it is a bit more of a hassle to override an ANTLR3_COMMON_TOKEN as the standard structure for...
Definition: antlr3commontoken.h:200
ANTLR3_CYCLIC_DFA_struct::special
const ANTLR3_INT32 *const special
Definition: antlr3cyclicdfa.h:82
appendS
static pANTLR3_UINT8 appendS(pANTLR3_STRING string, pANTLR3_STRING newbit)
Definition: antlr3string.c:1206
ANTLR3_TOKEN_STREAM_struct::toStringSS
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.
Definition: antlr3tokenstream.h:163
ANTLR3_LEX_STATE_struct::nextChar
void * nextChar
Pointer to the next character to be consumed from the input data This is cast to point at the encodin...
Definition: antlr3input.h:250
addChild
static void addChild(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, pANTLR3_BASE_TREE child)
Add a child to the tree t.
Definition: antlr3basetreeadaptor.c:548
pANTLR3_INT_TRIE
struct ANTLR3_INT_TRIE_struct * pANTLR3_INT_TRIE
Pointer to an instantiation of 'class' ANTLR3_INT_TRIE
Definition: antlr3interfaces.h:209
ANTLR3_BASE_TREE_struct::strFactory
pANTLR3_STRING_FACTORY strFactory
A string factory to produce strings for toString etc.
Definition: antlr3basetree.h:76
ANTLR3_COMMON_TOKEN_struct::input
pANTLR3_INPUT_STREAM input
Pointer to the input stream that this token originated in.
Definition: antlr3commontoken.h:144
ANTLR3_COMMON_TOKEN_struct::getChannel
ANTLR3_UINT32(* getChannel)(struct ANTLR3_COMMON_TOKEN_struct *token)
Pointer to a function that gets the channel that this token was placed in (parsers can 'tune' to thes...
Definition: antlr3commontoken.h:271
toString
static pANTLR3_STRING toString(pANTLR3_TOKEN_STREAM ts)
Definition: antlr3tokenstream.c:520
ANTLR3_STRING_FACTORY_struct::close
void(* close)(struct ANTLR3_STRING_FACTORY_struct *factory)
Pointer to function that closes the factory.
Definition: antlr3string.h:262
ANTLR3_COMMON_TREE_NODE_STREAM_struct::super
void * super
Any interface that implements this interface (is a super structure containing this structure),...
Definition: antlr3commontreenodestream.h:151
getCharPositionInLine
static ANTLR3_INT32 getCharPositionInLine(pANTLR3_COMMON_TOKEN token)
Definition: antlr3commontoken.c:507
ANTLR3_RECOGNIZER_SHARED_STATE_struct::lastErrorIndex
ANTLR3_MARKER lastErrorIndex
The index into the input stream where the last error occurred.
Definition: antlr3recognizersharedstate.h:95
emitNew
static void emitNew(pANTLR3_LEXER lexer, pANTLR3_COMMON_TOKEN token)
Definition: antlr3lexer.c:636
mark
static ANTLR3_MARKER mark(pANTLR3_INT_STREAM is)
Mark the state of the input stream so that we can come back to it after a syntactic predicate and so ...
Definition: antlr3commontreenodestream.c:656
ANTLR3_VECTOR_FACTORY_struct::close
void(* close)(struct ANTLR3_VECTOR_FACTORY_struct *factory)
Function to close the vector factory.
Definition: antlr3collections.h:313
antlr3RewriteRuleTOKENStreamNewAEV
ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAEV(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
Definition: antlr3rewritestreams.c:352
ANTLR3_BASE_TREE_struct::toStringTree
pANTLR3_STRING(* toStringTree)(struct ANTLR3_BASE_TREE_struct *tree)
Definition: antlr3basetree.h:123
pANTLR3_TREE_ADAPTOR
struct ANTLR3_BASE_TREE_ADAPTOR_struct * pANTLR3_TREE_ADAPTOR
antlr3HashDelete
static void antlr3HashDelete(pANTLR3_HASH_TABLE table, void *key)
Takes the element with the supplied key out of the list, and deletes the data calling the supplied fr...
Definition: antlr3collections.c:420
addi8
static pANTLR3_UINT8 addi8(pANTLR3_STRING string, ANTLR3_INT32 i)
Definition: antlr3string.c:1029
pANTLR3_INT8
int8_t * pANTLR3_INT8
Definition: antlr3defs.h:401
addNavigationNode
static void addNavigationNode(pANTLR3_COMMON_TREE_NODE_STREAM ctns, ANTLR3_UINT32 ttype)
As we flatten the tree, we use UP, DOWN nodes to represent the tree structure.
Definition: antlr3commontreenodestream.c:752
reset
static void reset(pANTLR3_BASE_RECOGNIZER rec)
Definition: antlr3lexer.c:175
ANTLR3_TREE_NODE_STREAM_struct::toString
pANTLR3_STRING(* toString)(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Definition: antlr3commontreenodestream.h:98
freeIntNode
static void freeIntNode(pANTLR3_INT_TRIE_NODE node)
Release memory allocated to this tree.
Definition: antlr3collections.c:2230
release
static void release(pANTLR3_INT_STREAM is, ANTLR3_MARKER marker)
Definition: antlr3commontreenodestream.c:677
ANTLR3_INPUT_STREAM_struct::close
void(* close)(struct ANTLR3_INPUT_STREAM_struct *input)
Pointer to function that closes the input stream.
Definition: antlr3input.h:134
ANTLR3_INPUT_STREAM_struct::nextChar
void * nextChar
Pointer to the next character to be consumed from the input data This is cast to point at the encodin...
Definition: antlr3input.h:89
antlr3UTF16LALE
static ANTLR3_UCHAR antlr3UTF16LALE(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming a UTF16 input when the input is Little Endian and the machine is no...
Definition: antlr3inputstream.c:1144
synpred
static ANTLR3_BOOLEAN synpred(pANTLR3_BASE_RECOGNIZER recognizer, void *ctx, void(*predicate)(void *ctx))
A syntactic predicate.
Definition: antlr3baserecognizer.c:2055
ANTLR3_COMMON_TOKEN_STREAM_struct::p
ANTLR3_INT32 p
The index into the tokens list of the current token (the next one that will be consumed.
Definition: antlr3tokenstream.h:239
newRaw8
static pANTLR3_STRING newRaw8(pANTLR3_STRING_FACTORY factory)
Definition: antlr3string.c:186
ANTLR3_TREE_NODE_STREAM_struct::toStringSS
pANTLR3_STRING(* toStringSS)(struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop)
Return the text of all nodes from start to stop, inclusive.
Definition: antlr3commontreenodestream.h:106
ANTLR3_COMMONTREENODE
#define ANTLR3_COMMONTREENODE
Type indicator for a common tree node stream.
Definition: antlr3intstream.h:82
ANTLR3_MISMATCHED_TREE_NODE_NAME
#define ANTLR3_MISMATCHED_TREE_NODE_NAME
Definition: antlr3exception.h:86
antlr3ExceptionPrint
static void antlr3ExceptionPrint(pANTLR3_EXCEPTION ex)
Prints out the message in all the exceptions in the supplied chain.
Definition: antlr3exception.c:118
ANTLR3_CYCLIC_DFA_struct
Definition of a cyclic dfa structure such that it can be initialized at compile time and have only a ...
Definition: antlr3cyclicdfa.h:61
ANTLR3_STRING_FACTORY_struct
Definition of the string factory interface, which creates and tracks strings for you of various shape...
Definition: antlr3string.h:210
ANTLR3_BITSET_struct::clone
pANTLR3_BITSET(* clone)(struct ANTLR3_BITSET_struct *inSet)
Definition: antlr3bitset.h:93
antlr38BitLT
static void * antlr38BitLT(pANTLR3_INPUT_STREAM input, ANTLR3_INT32 lt)
Return the input element assuming an 8 bit ascii input.
Definition: antlr3inputstream.c:402
ANTLR3_COMMON_TOKEN_struct::setStartIndex
void(* setStartIndex)(struct ANTLR3_COMMON_TOKEN_struct *token, ANTLR3_MARKER index)
Pointer to a function that sets the start index in the input stream for this token.
Definition: antlr3commontoken.h:293
ANTLR3_BASE_TREE_struct::dupNode
void *(* dupNode)(struct ANTLR3_BASE_TREE_struct *dupNode)
Definition: antlr3basetree.h:93
ANTLR3_TRIE_ENTRY_struct::next
struct ANTLR3_TRIE_ENTRY_struct * next
Definition: antlr3collections.h:342
antlr3UTF32Substr
static pANTLR3_STRING antlr3UTF32Substr(pANTLR3_INPUT_STREAM input, ANTLR3_MARKER start, ANTLR3_MARKER stop)
Return a substring of the UTF16 input stream in newly allocated memory.
Definition: antlr3inputstream.c:1627
ANTLR3_TOKEN_FACTORY_struct::thisPool
ANTLR3_INT32 thisPool
Current pool tokens we are allocating from.
Definition: antlr3commontoken.h:323
ANTLR3_DEBUG_EVENT_LISTENER_struct::grammarFileName
pANTLR3_STRING grammarFileName
The name of the grammar file that we are debugging.
Definition: antlr3debugeventlistener.h:80
ANTLR3_DEBUG_EVENT_LISTENER_struct::port
ANTLR3_UINT32 port
The port number which the debug listener should listen on for a connection.
Definition: antlr3debugeventlistener.h:67
replaceChildren
static void replaceChildren(pANTLR3_TREE_NODE_STREAM tns, pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t)
Replace from start to stop child index of parent with t, which might be a list.
Definition: antlr3commontreenodestream.c:928
pANTLR3_BASE_RECOGNIZER
struct ANTLR3_BASE_RECOGNIZER_struct * pANTLR3_BASE_RECOGNIZER
Pointer to an instantiation of the 'class' ANTLR3_BASE_RECOGNIZER.
Definition: antlr3interfaces.h:48
getText
static pANTLR3_STRING getText(pANTLR3_LEXER lexer)
Definition: antlr3lexer.c:879
setInputStream
static void setInputStream(pANTLR3_TOKEN_FACTORY factory, pANTLR3_INPUT_STREAM input)
Definition: antlr3commontoken.c:137
ANTLR3_COMMON_TREE_NODE_STREAM_struct::UP
ANTLR3_COMMON_TREE UP
Dummy tree node that indicates a descent up to a parent tree.
Definition: antlr3commontreenodestream.h:170
setChildIndex
static void setChildIndex(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t, ANTLR3_INT32 i)
Definition: antlr3commontreeadaptor.c:477
pANTLR3_REWRITE_RULE_ELEMENT_STREAM
struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct * pANTLR3_REWRITE_RULE_ELEMENT_STREAM
Pointer to an instantiation of 'class' ANTLR3_REWRITE_RULE_ELEMENT_STREAM
Definition: antlr3interfaces.h:214
getText
static pANTLR3_STRING getText(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Dummy implementation - will be supplied by super class.
Definition: antlr3basetreeadaptor.c:861
ANTLR3_INPUT_STREAM_struct::newlineChar
ANTLR3_UCHAR newlineChar
Character that automatically causes an internal line count increment.
Definition: antlr3input.h:222
ANTLR3_VECTOR_FACTORY_struct::pools
pANTLR3_VECTOR * pools
List of all vector pools allocated so far.
Definition: antlr3collections.h:289
antlr3EnumNew
ANTLR3_API pANTLR3_HASH_ENUM antlr3EnumNew(pANTLR3_HASH_TABLE table)
Creates an enumeration structure to traverse the hash table.
Definition: antlr3collections.c:673
ANTLR3_BASE_TREE_ADAPTOR_struct::dupTreeTT
void *(* dupTreeTT)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t, void *tree)
Definition: antlr3basetreeadaptor.h:77
antlr3Fclose
ANTLR3_API void antlr3Fclose(ANTLR3_FDSC fd)
Close an operating system file and free any handles etc.
Definition: antlr3filestream.c:413
ANTLR3_LIST_struct::put
ANTLR3_INT32(* put)(struct ANTLR3_LIST_struct *list, ANTLR3_INTKEY key, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:191
ANTLR3_INT_TRIE_struct::add
ANTLR3_BOOLEAN(* add)(struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key, ANTLR3_UINT32 type, ANTLR3_INTKEY intVal, void *data, void(ANTLR3_CDECL *freeptr)(void *))
Definition: antlr3collections.h:385
dupTok
static void * dupTok(pANTLR3_REWRITE_RULE_ELEMENT_STREAM stream, void *el)
When constructing trees, sometimes we need to dup a token or AST subtree.
Definition: antlr3rewritestreams.c:682
ANTLR3_INT_TRIE_NODE
struct ANTLR3_INT_TRIE_NODE_struct ANTLR3_INT_TRIE_NODE
Structure that defines an element/node in an ANTLR3_INT_TRIE.
set8
static pANTLR3_UINT8 set8(pANTLR3_STRING string, const char *chars)
Definition: antlr3string.c:893
getRuleInvocationStack
static pANTLR3_STACK getRuleInvocationStack(pANTLR3_BASE_RECOGNIZER recognizer)
Return the rule invocation stack (how we got here in the parse.
Definition: antlr3baserecognizer.c:1818
ANTLR3_INT_STREAM_struct::lastMarker
ANTLR3_MARKER lastMarker
Last marker position allocated.
Definition: antlr3intstream.h:113
pANTLR3_COMMON_TREE_ADAPTOR
struct ANTLR3_COMMON_TREE_ADAPTOR_struct * pANTLR3_COMMON_TREE_ADAPTOR
Pointer to an instantiation of 'class' ANTLR3_COMMON_TREE_ADAPTOR
Definition: antlr3interfaces.h:199
consumeNode
static void consumeNode(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE t)
Definition: antlr3debughandlers.c:872
ANTLR3_DEBUG_EVENT_LISTENER_struct::enterSubRule
void(* enterSubRule)(pANTLR3_DEBUG_EVENT_LISTENER delboy, int decisionNumber)
Track entry into any (...) subrule other EBNF construct.
Definition: antlr3debugeventlistener.h:122
ANTLR3_INPUT_STREAM_struct::strFactory
pANTLR3_STRING_FACTORY strFactory
String factory for this input stream.
Definition: antlr3input.h:81
antlr3TreeParserNewStream
ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_COMMON_TREE_NODE_STREAM ctnstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
Definition: antlr3treeparser.c:52
antlr3CommonTokenStreamSourceNew
ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenStreamSourceNew(ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source)
Definition: antlr3tokenstream.c:235
getChildCount
static ANTLR3_UINT32 getChildCount(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Definition: antlr3commontreeadaptor.c:471
ANTLR3_BITSET_struct::size
ANTLR3_UINT32(* size)(struct ANTLR3_BITSET_struct *bitset)
Definition: antlr3bitset.h:96
ANTLR3_INPUT_STREAM_struct::line
ANTLR3_UINT32 line
The line number we are traversing in the input file.
Definition: antlr3input.h:101
antlr38BitSetupStream
void antlr38BitSetupStream(pANTLR3_INPUT_STREAM input)
Common function to setup function interface for an 8 bit input stream.
Definition: antlr3inputstream.c:125
ANTLR3_EXCEPTION_struct
Base structure for an ANTLR3 exception tracker.
Definition: antlr3exception.h:104
ANTLR3_BITWORD
uint64_t ANTLR3_BITWORD
Definition: antlr3defs.h:410
ANTLR3_ERR_NOMEM
#define ANTLR3_ERR_NOMEM
Definition: antlr3errors.h:49
antlr3UTF32LALE
static ANTLR3_UCHAR antlr3UTF32LALE(pANTLR3_INT_STREAM is, ANTLR3_INT32 la)
Return the input element assuming a UTF32 input in little endian byte order.
Definition: antlr3inputstream.c:1698
sockSend
static int sockSend(SOCKET sock, const char *ptr, int len)
Definition: antlr3debughandlers.c:165
ANTLR3_SALENT
size_t ANTLR3_SALENT
Definition: antlr3defs.h:380
antlr3UTF32Index
static ANTLR3_MARKER antlr3UTF32Index(pANTLR3_INT_STREAM is)
Calculate the current index in the output stream.
Definition: antlr3inputstream.c:1610
ANTLR3_BASE_TREE_ADAPTOR_struct::getToken
pANTLR3_COMMON_TOKEN(* getToken)(struct ANTLR3_BASE_TREE_ADAPTOR_struct *adaptor, void *t)
Definition: antlr3basetreeadaptor.h:121
getUniqueID
static ANTLR3_UINT32 getUniqueID(pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_TREE t)
Returns a uniqueID for the node.
Definition: antlr3basetreeadaptor.c:900
pANTLR3_HASH_BUCKET
struct ANTLR3_HASH_BUCKET_struct * pANTLR3_HASH_BUCKET
Pointer to an instantiation of 'class' ANTLR3_HASH_BUCKET
Definition: antlr3interfaces.h:81
ANTLR3_RECOGNIZER_SHARED_STATE_struct::error
ANTLR3_BOOLEAN error
If set to ANTLR3_TRUE then the recognizer has an exception condition (this is tested by the generated...
Definition: antlr3recognizersharedstate.h:63
ANTLR3_DEBUG_EVENT_LISTENER_struct::recognitionException
void(* recognitionException)(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e)
A recognition exception occurred such as NoViableAltException.
Definition: antlr3debugeventlistener.h:246
ANTLR3_COMMON_TREE_NODE_STREAM_struct::next
pANTLR3_BASE_TREE(* next)(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
Definition: antlr3commontreenodestream.h:274
recognitionException
static void recognitionException(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_EXCEPTION e)
Definition: antlr3debughandlers.c:763
ANTLR3_COMMON_TREE_struct::parent
pANTLR3_COMMON_TREE parent
Points to the node that has this node as a child.
Definition: antlr3commontree.h:69
sourceIllegal
@ sourceIllegal
Definition: antlr3convertutf.h:129
ANTLR3_STRING
struct ANTLR3_STRING_struct ANTLR3_STRING
Base string class tracks the allocations and provides simple string tracking functions.