antlr3defs.h File Reference


Detailed Description

Basic type and constant definitions for ANTLR3 Runtime.

#include <antlr3errors.h>
#include <antlr3config.h>
#include <stdio.h>
#include <antlr3interfaces.h>
#include <antlr3convertutf.h>

Include dependency graph for antlr3defs.h:

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


Defines

#define _stat   stat
#define ANTLR3_API
#define ANTLR3_API
#define ANTLR3_AVERAGE
#define ANTLR3_BE   1
 Indicates Big Endian for encodings where this makes sense.
#define ANTLR3_CALLOC(numEl, elSize)   calloc (numEl, (size_t)(elSize))
 Default definition of ANTLR3_CALLOC.
#define ANTLR3_CDECL
#define ANTLR3_CLOSESOCKET   close
#define ANTLR3_ENC_8BIT   4
 General latin-1 or other 8 bit encoding scheme such as straight ASCII.
#define ANTLR3_ENC_EBCDIC   64
 Input is 8 bit EBCDIC (which we convert to 8 bit ASCII on the fly.
#define ANTLR3_ENC_UTF16   16
 UTF-16 encoding scheme (which also covers UCS2 as that does not have surrogates).
#define ANTLR3_ENC_UTF16BE   16 + ANTLR3_BE
#define ANTLR3_ENC_UTF16LE   16 + ANTLR3_LE
#define ANTLR3_ENC_UTF32   32
 UTF-32 encoding scheme (basically straight 32 bit).
#define ANTLR3_ENC_UTF32BE   32 + ANTLR3_BE
#define ANTLR3_ENC_UTF32LE   32 + ANTLR3_LE
#define ANTLR3_ENC_UTF8   8
 UTF-8 encoding scheme.
#define ANTLR3_FASTCALL
#define ANTLR3_FPRINTF   fprintf
 Default definition of fprintf, set this to something other than fprintf before including antlr3.h if your system does not have a fprintf.
#define ANTLR3_FREE(ptr)   free ((void *)(ptr))
 Default definition of ANTLR3_FREE.
#define ANTLR3_FREE_FUNC   free
 Default definition of ANTLR3_FREE_FUNC.
#define ANTLR3_FUNC_PTR(ptr)   (void *)((ANTLR3_UINT32)(ptr))
#define ANTLR3_INLINE   inline
#define ANTLR3_LE   2
 Indicates Little Endian for encoidngs where this makes sense.
#define ANTLR3_LIST_SIZE_HINT   63
#define ANTLR3_MALLOC(request)   malloc ((size_t)(request))
 Default definition of ANTLR3_MALLOC.
#define ANTLR3_MEMCPY(target, source, size)   memcpy((void *)(target), (const void *)(source), (size_t)(size))
 Default definition of ANTLR3_MEMCPY.
#define ANTLR3_MEMMOVE(target, source, size)   memmove((void *)(target), (const void *)(source), (size_t)(size))
 Default definition of ANTLR3_MEMMOVE.
#define ANTLR3_MEMSET(target, byte, size)   memset((void *)(target), (int)(byte), (size_t)(size))
 Default definition of ANTLR3_MEMSET.
#define ANTLR3_PRINTF   printf
 Default definition of printf, set this to something other than printf before including antlr3.h if your system does not have a printf.
#define ANTLR3_REALLOC(current, request)   realloc ((void *)(current), (size_t)(request))
 Default definition of ANTLR3_REALLOC.
#define ANTLR3_SIZE_HINT   1025
#define ANTLR3_STRDUP(instr)   (pANTLR3_UINT8)(strdup ((const char *)(instr)))
 Default definition of ANTLR3_STRDUP.
#define ANTLR3_TRIE_DEPTH   31
#define ANTLR3_UINT32_CAST(ptr)   (ANTLR3_UINT32)(ptr)
#define ANTLR3_UINT64_CAST(ptr)   (ANTLR3_UINT64)((ANTLR3_UINT32)(ptr))
#define ANTLR3_UINT64_LIT(lit)   lit##ULL
#define INVALID_SOCKET   ((SOCKET)-1)

Typedefs

typedef uint64_t ANTLR3_BITWORD
typedef uint32_t ANTLR3_BOOLEAN
typedef int32_t ANTLR3_CHAR
typedef FILE * ANTLR3_FDSC
typedef struct stat ANTLR3_FSTAT_STRUCT
typedef int16_t ANTLR3_INT16
typedef int32_t ANTLR3_INT32
typedef int64_t ANTLR3_INT64
typedef int8_t ANTLR3_INT8
typedef ANTLR3_UINT32 ANTLR3_INTKEY
typedef ANTLR3_INT32 ANTLR3_MARKER
typedef size_t ANTLR3_SALENT
typedef struct sockaddr_in ANTLR3_SOCKADDRT
typedef uint32_t ANTLR3_UCHAR
typedef uint16_t ANTLR3_UINT16
typedef uint32_t ANTLR3_UINT32
typedef uint64_t ANTLR3_UINT64
typedef uint8_t ANTLR3_UINT8
typedef uint64_t * pANTLR3_BITWORD
typedef uint32_t * pANTLR3_BOOLEAN
typedef int32_t * pANTLR3_CHAR
typedef int16_t * pANTLR3_INT16
typedef int32_t * pANTLR3_INT32
typedef int64_t * pANTLR3_INT64
typedef int8_t * pANTLR3_INT8
typedef struct sockaddr * pANTLR3_SOCKADDRC
typedef struct sockaddr_in * pANTLR3_SOCKADDRT
typedef uint32_t * pANTLR3_UCHAR
typedef uint16_t * pANTLR3_UINT16
typedef uint32_t * pANTLR3_UINT32
typedef uint64_t * pANTLR3_UINT64
typedef uint8_t * pANTLR3_UINT8
typedef int SOCKET

Functions

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 setDebugEventListener instead which changes a normal token stream to a debugging stream and means that a user's instantiation code does not need to be changed just to debug with AW.
ANTLR3_API
pANTLR3_BASE_TREE_ADAPTOR 
ANTLR3_TREE_ADAPTORNew (pANTLR3_STRING_FACTORY strFactory)
 Create a new tree adaptor.
ANTLR3_API pANTLR3_ARBORETUM antlr3ArboretumNew (pANTLR3_STRING_FACTORY factory)
ANTLR3_API pANTLR3_BASE_RECOGNIZER antlr3BaseRecognizerNew (ANTLR3_UINT32 type, ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
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 implements the tree adaptor used in the parse), initialize its function pointers and so on.
ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew (pANTLR3_BASE_TREE tree)
ANTLR3_API pANTLR3_BITSET antlr3BitsetCopy (pANTLR3_BITSET_LIST blist)
ANTLR3_API pANTLR3_BITSET antlr3BitsetList (pANTLR3_HASH_TABLE list)
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.
ANTLR3_API pANTLR3_BITSET antlr3BitsetNew (ANTLR3_UINT32 numBits)
ANTLR3_API pANTLR3_BITSET antlr3BitsetOf (ANTLR3_INT32 bit,...)
 Creates a new bitset with at least one element, but as many elements are required.
ANTLR3_API void antlr3BitsetSetAPI (pANTLR3_BITSET bitset)
ANTLR3_API ANTLR3_UCHAR antlr3c8toAntlrc (ANTLR3_INT8 inc)
 Provides basic utility functions to convert between the various Unicode character conversions.
ANTLR3_API
pANTLR3_COMMON_TOKEN_STREAM 
antlr3CommonTokenDebugStreamSourceNew (ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source, pANTLR3_DEBUG_EVENT_LISTENER debugger)
ANTLR3_API pANTLR3_COMMON_TOKEN antlr3CommonTokenNew (ANTLR3_UINT32 ttype)
ANTLR3_API
pANTLR3_COMMON_TOKEN_STREAM 
antlr3CommonTokenStreamNew (ANTLR3_UINT32 hint)
ANTLR3_API
pANTLR3_COMMON_TOKEN_STREAM 
antlr3CommonTokenStreamSourceNew (ANTLR3_UINT32 hint, pANTLR3_TOKEN_SOURCE source)
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew (void)
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken (pANTLR3_COMMON_TOKEN tree)
ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromTree (pANTLR3_COMMON_TREE tree)
ANTLR3_API
pANTLR3_COMMON_TREE_NODE_STREAM 
antlr3CommonTreeNodeStreamNew (pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint)
ANTLR3_API
pANTLR3_COMMON_TREE_NODE_STREAM 
antlr3CommonTreeNodeStreamNewStream (pANTLR3_COMMON_TREE_NODE_STREAM inStream)
ANTLR3_API
pANTLR3_COMMON_TREE_NODE_STREAM 
antlr3CommonTreeNodeStreamNewTree (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint)
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 debugger via a socket.
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 covering regular approximation to the underlying CFL).
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.
ANTLR3_API ANTLR3_INT32 antlr3dfaspecialTransition (void *ctx, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_INT_STREAM is, pANTLR3_CYCLIC_DFA dfa, ANTLR3_INT32 s)
ANTLR3_API pANTLR3_HASH_ENUM antlr3EnumNew (pANTLR3_HASH_TABLE table)
 Creates an enumeration structure to traverse the hash table.
ANTLR3_API pANTLR3_EXCEPTION antlr3ExceptionNew (ANTLR3_UINT32 exception, void *name, void *message, ANTLR3_BOOLEAN freeMessage)
 Creates a new ANTLR3 exception structure.
ANTLR3_API pANTLR3_INPUT_STREAM antlr3FileStreamNew (pANTLR3_UINT8 fileName, ANTLR3_UINT32 encoding)
ANTLR3_API ANTLR3_UINT32 antlr3Hash (void *key, ANTLR3_UINT32 keylen)
 Given an input key of arbitrary length, return a hash value of it.
ANTLR3_API pANTLR3_HASH_TABLE antlr3HashTableNew (ANTLR3_UINT32 sizeHint)
ANTLR3_API pANTLR3_INT_STREAM antlr3IntStreamNew (void)
ANTLR3_API pANTLR3_INT_TRIE antlr3IntTrieNew (ANTLR3_UINT32 depth)
ANTLR3_API pANTLR3_LEXER antlr3LexerNew (ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
ANTLR3_API pANTLR3_LEXER antlr3LexerNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state)
ANTLR3_API pANTLR3_LIST antlr3ListNew (ANTLR3_UINT32 sizeHint)
ANTLR3_API void antlr3MTExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)
 Creates a new Mismatched Token Exception and inserts in the recognizer exception stack.
ANTLR3_API void antlr3MTNExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)
 Creates a new Mismatched Tree Nde Exception and inserts in the recognizer exception stack.
ANTLR3_API pANTLR3_PARSER antlr3ParserNew (ANTLR3_UINT32 sizeHint, pANTLR3_RECOGNIZER_SHARED_STATE state)
ANTLR3_API pANTLR3_PARSER antlr3ParserNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
ANTLR3_API pANTLR3_PARSER antlr3ParserNewStreamDbg (ANTLR3_UINT32 sizeHint, pANTLR3_TOKEN_STREAM tstream, pANTLR3_DEBUG_EVENT_LISTENER dbg, pANTLR3_RECOGNIZER_SHARED_STATE state)
ANTLR3_API void antlr3RecognitionExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)
ANTLR3_API
pANTLR3_REWRITE_RULE_NODE_STREAM 
antlr3RewriteRuleNODEStreamNewAE (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
ANTLR3_API
pANTLR3_REWRITE_RULE_NODE_STREAM 
antlr3RewriteRuleNODEStreamNewAEE (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
ANTLR3_API
pANTLR3_REWRITE_RULE_NODE_STREAM 
antlr3RewriteRuleNODEStreamNewAEV (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
ANTLR3_API
pANTLR3_REWRITE_RULE_SUBTREE_STREAM 
antlr3RewriteRuleSubtreeStreamNewAE (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
ANTLR3_API
pANTLR3_REWRITE_RULE_SUBTREE_STREAM 
antlr3RewriteRuleSubtreeStreamNewAEE (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
ANTLR3_API
pANTLR3_REWRITE_RULE_SUBTREE_STREAM 
antlr3RewriteRuleSubtreeStreamNewAEV (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
ANTLR3_API
pANTLR3_REWRITE_RULE_TOKEN_STREAM 
antlr3RewriteRuleTOKENStreamNewAE (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description)
ANTLR3_API
pANTLR3_REWRITE_RULE_TOKEN_STREAM 
antlr3RewriteRuleTOKENStreamNewAEE (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, void *oneElement)
ANTLR3_API
pANTLR3_REWRITE_RULE_TOKEN_STREAM 
antlr3RewriteRuleTOKENStreamNewAEV (pANTLR3_BASE_TREE_ADAPTOR adaptor, pANTLR3_BASE_RECOGNIZER rec, pANTLR3_UINT8 description, pANTLR3_VECTOR vector)
ANTLR3_API void antlr3SetCTAPI (pANTLR3_COMMON_TREE tree)
ANTLR3_API void antlr3SetTokenAPI (pANTLR3_COMMON_TOKEN token)
ANTLR3_API void antlr3SetVectorApi (pANTLR3_VECTOR vector, ANTLR3_UINT32 sizeHint)
ANTLR3_API pANTLR3_STACK antlr3StackNew (ANTLR3_UINT32 sizeHint)
ANTLR3_API pANTLR3_STRING_FACTORY antlr3StringFactoryNew (ANTLR3_UINT32 encoding)
ANTLR3_API pANTLR3_INPUT_STREAM antlr3StringStreamNew (pANTLR3_UINT8 data, ANTLR3_UINT32 encoding, ANTLR3_UINT32 size, pANTLR3_UINT8 name)
ANTLR3_API pANTLR3_TOKEN_FACTORY antlr3TokenFactoryNew (pANTLR3_INPUT_STREAM input)
ANTLR3_API pANTLR3_TOPO antlr3TopoNew ()
 Allocate and initialize a new ANTLR3 topological sorter, which can be used to define edges that identify numerical node indexes that depend on other numerical node indexes, which can then be sorted topologically such that any node is sorted after all its dependent nodes.
ANTLR3_API pANTLR3_TREE_NODE_STREAM antlr3TreeNodeStreamNew ()
ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_COMMON_TREE_NODE_STREAM ctnstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
ANTLR3_API
pANTLR3_COMMON_TREE_NODE_STREAM 
antlr3UnbufTreeNodeStreamNew (pANTLR3_STRING_FACTORY strFactory, ANTLR3_UINT32 hint)
ANTLR3_API
pANTLR3_COMMON_TREE_NODE_STREAM 
antlr3UnbufTreeNodeStreamNewTree (pANTLR3_BASE_TREE tree, ANTLR3_UINT32 hint)
ANTLR3_API pANTLR3_VECTOR_FACTORY antlr3VectorFactoryNew (ANTLR3_UINT32 sizeHint)
 Vector factory creation.
ANTLR3_API pANTLR3_VECTOR antlr3VectorNew (ANTLR3_UINT32 sizeHint)
ANTLR3_API void fillBufferExt (pANTLR3_COMMON_TOKEN_STREAM tokenStream)

Define Documentation

#define _stat   stat

Referenced by antlr3Fsize().

#define ANTLR3_API

#define ANTLR3_API

#define ANTLR3_AVERAGE

#define ANTLR3_BE   1

Indicates Big Endian for encodings where this makes sense.

#define ANTLR3_CALLOC ( numEl,
elSize   )     calloc (numEl, (size_t)(elSize))

#define ANTLR3_CDECL

#define ANTLR3_CLOSESOCKET   close

Referenced by handshake().

#define ANTLR3_ENC_8BIT   4

General latin-1 or other 8 bit encoding scheme such as straight ASCII.

Referenced by antlr3StringFactoryNew(), setupInputStream(), stringInit8(), and stringInitUTF16().

#define ANTLR3_ENC_EBCDIC   64

Input is 8 bit EBCDIC (which we convert to 8 bit ASCII on the fly.

Referenced by antlr3StringFactoryNew(), and setupInputStream().

#define ANTLR3_ENC_UTF16   16

UTF-16 encoding scheme (which also covers UCS2 as that does not have surrogates).

Referenced by antlr3StringFactoryNew(), and setupInputStream().

#define ANTLR3_ENC_UTF16BE   16 + ANTLR3_BE

#define ANTLR3_ENC_UTF16LE   16 + ANTLR3_LE

#define ANTLR3_ENC_UTF32   32

UTF-32 encoding scheme (basically straight 32 bit).

Referenced by antlr3StringFactoryNew(), and setupInputStream().

#define ANTLR3_ENC_UTF32BE   32 + ANTLR3_BE

#define ANTLR3_ENC_UTF32LE   32 + ANTLR3_LE

#define ANTLR3_ENC_UTF8   8

UTF-8 encoding scheme.

Referenced by antlr3StringFactoryNew(), and setupInputStream().

#define ANTLR3_FASTCALL

#define ANTLR3_FPRINTF   fprintf

#define ANTLR3_FREE ( ptr   )     free ((void *)(ptr))

#define ANTLR3_FREE_FUNC   free

Default definition of ANTLR3_FREE_FUNC.

You can override this before including antlr3.h if you wish to use your own implementation.

Referenced by antlr38BitMark().

#define ANTLR3_FUNC_PTR ( ptr   )     (void *)((ANTLR3_UINT32)(ptr))

#define ANTLR3_INLINE   inline

#define ANTLR3_LE   2

Indicates Little Endian for encoidngs where this makes sense.

#define ANTLR3_LIST_SIZE_HINT   63

#define ANTLR3_MALLOC ( request   )     malloc ((size_t)(request))

#define ANTLR3_MEMCPY ( target,
source,
size   )     memcpy((void *)(target), (const void *)(source), (size_t)(size))

Default definition of ANTLR3_MEMCPY.

You can override this before including antlr3.h if you wish to use your own implementation.

Referenced by antlr3BitsetClone(), antlr3BitsetCopy(), antlr3VectorResize(), and grow().

#define ANTLR3_MEMMOVE ( target,
source,
size   )     memmove((void *)(target), (const void *)(source), (size_t)(size))

Default definition of ANTLR3_MEMMOVE.

You can override this before including antlr3.h if you wish to use your own implementation.

Referenced by antlr3VectorDel(), antrl3VectorRemove(), append8(), appendUTF16_UTF16(), insert8(), insertUTF16_8(), insertUTF16_UTF16(), newPtr8(), newPtrUTF16_UTF16(), set8(), and setUTF16_UTF16().

#define ANTLR3_MEMSET ( target,
byte,
size   )     memset((void *)(target), (int)(byte), (size_t)(size))

Default definition of ANTLR3_MEMSET.

You can override this before including antlr3.h if you wish to use your own implementation.

#define ANTLR3_PRINTF   printf

Default definition of printf, set this to something other than printf before including antlr3.h if your system does not have a printf.

Note that you can define this to be // without harming the runtime.

Referenced by ack().

#define ANTLR3_REALLOC ( current,
request   )     realloc ((void *)(current), (size_t)(request))

Default definition of ANTLR3_REALLOC.

You can override this before including antlr3.h if you wish to use your own implementation.

Referenced by addc8(), addcUTF16(), addEdge(), antlr3VectorResize(), append8(), appendUTF16_8(), appendUTF16_UTF16(), insert8(), insertUTF16_8(), insertUTF16_UTF16(), newPool(), set8(), setUTF16_8(), and setUTF16_UTF16().

#define ANTLR3_SIZE_HINT   1025

#define ANTLR3_STRDUP ( instr   )     (pANTLR3_UINT8)(strdup ((const char *)(instr)))

Default definition of ANTLR3_STRDUP.

You can override this before including antlr3.h if you wish to use your own implementation.

Referenced by antlr3HashPut().

#define ANTLR3_TRIE_DEPTH   31

#define ANTLR3_UINT32_CAST ( ptr   )     (ANTLR3_UINT32)(ptr)

#define ANTLR3_UINT64_CAST ( ptr   )     (ANTLR3_UINT64)((ANTLR3_UINT32)(ptr))

#define ANTLR3_UINT64_LIT ( lit   )     lit##ULL

#define INVALID_SOCKET   ((SOCKET)-1)

Referenced by handshake().


Typedef Documentation

typedef uint64_t ANTLR3_BITWORD

typedef uint32_t ANTLR3_BOOLEAN

typedef int32_t ANTLR3_CHAR

typedef FILE* ANTLR3_FDSC

typedef struct stat ANTLR3_FSTAT_STRUCT

typedef int16_t ANTLR3_INT16

typedef int32_t ANTLR3_INT32

typedef int64_t ANTLR3_INT64

typedef int8_t ANTLR3_INT8

typedef size_t ANTLR3_SALENT

typedef struct sockaddr_in ANTLR3_SOCKADDRT

typedef uint32_t ANTLR3_UCHAR

typedef uint16_t ANTLR3_UINT16

typedef uint32_t ANTLR3_UINT32

typedef uint64_t ANTLR3_UINT64

typedef uint8_t ANTLR3_UINT8

typedef uint64_t * pANTLR3_BITWORD

typedef uint32_t * pANTLR3_BOOLEAN

typedef int32_t * pANTLR3_CHAR

typedef int16_t * pANTLR3_INT16

typedef int32_t * pANTLR3_INT32

typedef int64_t * pANTLR3_INT64

typedef int8_t * pANTLR3_INT8

typedef struct sockaddr* pANTLR3_SOCKADDRC

typedef struct sockaddr_in * pANTLR3_SOCKADDRT

typedef uint32_t * pANTLR3_UCHAR

typedef uint16_t * pANTLR3_UINT16

typedef uint32_t * pANTLR3_UINT32

typedef uint64_t * pANTLR3_UINT64

typedef uint8_t * pANTLR3_UINT8

typedef int SOCKET


Function Documentation

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 setDebugEventListener instead which changes a normal token stream to a debugging stream and means that a user's instantiation code does not need to be changed just to debug with AW.

References ANTLR3_TREE_ADAPTORNew(), antlr3BaseTreeAdaptorInit(), ANTLR3_BASE_TREE_ADAPTOR_struct::create, dbgCreate(), dbgSetTokenBoundaries(), and ANTLR3_BASE_TREE_ADAPTOR_struct::setTokenBoundaries.

Here is the call graph for this function:

ANTLR3_API pANTLR3_BASE_TREE_ADAPTOR ANTLR3_TREE_ADAPTORNew ( pANTLR3_STRING_FACTORY  strFactory  ) 

Create a new tree adaptor.

Note that despite the fact that this is creating a new COMMON_TREE adaptor, we return the address of the BASE_TREE interface, as should any other adaptor that wishes to be used as the tree element of a tree parse/build. It needs to be given the address of a valid string factory as we do not know what the originating input stream encoding type was. This way we can rely on just using the original input stream's string factory or one of the correct type which the user supplies us.

References ANTLR3_MALLOC, antlr3ArboretumNew(), antlr3BaseTreeAdaptorInit(), antlr3TokenFactoryNew(), ANTLR3_COMMON_TREE_ADAPTOR_struct::arboretum, ANTLR3_COMMON_TREE_ADAPTOR_struct::baseAdaptor, create(), ANTLR3_BASE_TREE_ADAPTOR_struct::create, createToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::createToken, createTokenFromToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTokenFromToken, ctaFree(), deleteChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::deleteChild, dupNode(), ANTLR3_BASE_TREE_ADAPTOR_struct::dupNode, errorNode(), ANTLR3_BASE_TREE_ADAPTOR_struct::errorNode, ANTLR3_BASE_TREE_ADAPTOR_struct::free, getChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, getChildCount(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, getChildIndex(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChildIndex, getParent(), ANTLR3_BASE_TREE_ADAPTOR_struct::getParent, getText(), ANTLR3_BASE_TREE_ADAPTOR_struct::getText, getTokenStartIndex(), ANTLR3_BASE_TREE_ADAPTOR_struct::getTokenStartIndex, getTokenStopIndex(), ANTLR3_BASE_TREE_ADAPTOR_struct::getTokenStopIndex, getType(), ANTLR3_BASE_TREE_ADAPTOR_struct::getType, replaceChildren(), ANTLR3_BASE_TREE_ADAPTOR_struct::replaceChildren, setChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::setChild, setChildIndex(), ANTLR3_BASE_TREE_ADAPTOR_struct::setChildIndex, setDebugEventListener(), ANTLR3_BASE_TREE_ADAPTOR_struct::setDebugEventListener, setParent(), ANTLR3_BASE_TREE_ADAPTOR_struct::setParent, setTokenBoundaries(), ANTLR3_BASE_TREE_ADAPTOR_struct::setTokenBoundaries, ANTLR3_BASE_TREE_ADAPTOR_struct::strFactory, ANTLR3_COMMON_TOKEN_struct::strFactory, ANTLR3_BASE_TREE_ADAPTOR_struct::super, ANTLR3_BASE_TREE_ADAPTOR_struct::tokenFactory, and ANTLR3_TOKEN_FACTORY_struct::unTruc.

Referenced by ANTLR3_TREE_ADAPTORDebugNew(), and antlr3CommonTreeNodeStreamNew().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_ARBORETUM antlr3ArboretumNew ( pANTLR3_STRING_FACTORY  factory  ) 

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 implements the tree adaptor used in the parse), initialize its function pointers and so on.

References ANTLR3_DEBUG_EVENT_LISTENER_struct::adaptor, addChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::addChild, addChildToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::addChildToken, becomeRoot(), ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRoot, becomeRootToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::becomeRootToken, createTypeText(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeText, createTypeToken(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeToken, createTypeTokenText(), ANTLR3_BASE_TREE_ADAPTOR_struct::createTypeTokenText, dbgAddChild(), dbgAddChildToken(), dbgBecomeRoot(), dbgBecomeRootToken(), dbgCreateTypeText(), dbgCreateTypeToken(), dbgCreateTypeTokenText(), dbgDupTree(), dbgNil(), dupTree(), ANTLR3_BASE_TREE_ADAPTOR_struct::dupTree, dupTreeTT(), ANTLR3_BASE_TREE_ADAPTOR_struct::dupTreeTT, getChild(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChild, getChildCount(), ANTLR3_BASE_TREE_ADAPTOR_struct::getChildCount, getText(), ANTLR3_BASE_TREE_ADAPTOR_struct::getText, getType(), ANTLR3_BASE_TREE_ADAPTOR_struct::getType, getUniqueID(), ANTLR3_BASE_TREE_ADAPTOR_struct::getUniqueID, isNilNode(), ANTLR3_BASE_TREE_ADAPTOR_struct::isNilNode, makeDot(), ANTLR3_BASE_TREE_ADAPTOR_struct::makeDot, nilNode(), ANTLR3_BASE_TREE_ADAPTOR_struct::nilNode, rulePostProcessing(), ANTLR3_BASE_TREE_ADAPTOR_struct::rulePostProcessing, setText(), ANTLR3_BASE_TREE_ADAPTOR_struct::setText, setText8(), ANTLR3_BASE_TREE_ADAPTOR_struct::setText8, setType(), and ANTLR3_BASE_TREE_ADAPTOR_struct::setType.

Referenced by ANTLR3_TREE_ADAPTORDebugNew(), ANTLR3_TREE_ADAPTORNew(), and setDebugEventListener().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_BASE_TREE antlr3BaseTreeNew ( pANTLR3_BASE_TREE  tree  ) 

ANTLR3_API pANTLR3_BITSET antlr3BitsetCopy ( pANTLR3_BITSET_LIST  blist  ) 

ANTLR3_API pANTLR3_BITSET antlr3BitsetList ( pANTLR3_HASH_TABLE  list  ) 

References ANTLR3_BITSET_struct::add, ANTLR3_SUCCESS, antlr3BitsetNew(), antlr3EnumNew(), ANTLR3_HASH_ENUM_struct::free, and ANTLR3_HASH_ENUM_struct::next.

Referenced by getTokensList().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
[in] bset A variable number of bits to add to the set, ending in -1 (impossible bit).
Returns:
A new bit set with all of the specified bitmaps in it and the API initialized.
Call as:
  • pANTLR3_BITSET = antlrBitsetLoad(bset, bset11, ..., -1);
  • pANTLR3_BITSET = antlrBitsetOf(-1); Create empty bitset

Remarks:
Stdargs function - must supply -1 as last paremeter, which is NOT added to the set.

References antlr3BitsetNew(), ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, ANTLR3_BITSET_struct::grow, and ANTLR3_BITSET_LIST_struct::length.

Referenced by combineFollows(), displayRecognitionError(), mismatchIsMissingToken(), and recoverFromMismatchedElement().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_BITSET antlr3BitsetNew ( ANTLR3_UINT32  numBits  ) 

ANTLR3_API pANTLR3_BITSET antlr3BitsetOf ( ANTLR3_INT32  bit,
  ... 
)

Creates a new bitset with at least one element, but as many elements are required.

Parameters:
[in] bit A variable number of bits to add to the set, ending in -1 (impossible bit).
Returns:
A new bit set with all of the specified elements added into it.
Call as:
  • pANTLR3_BITSET = antlrBitsetOf(n, n1, n2, -1);
  • pANTLR3_BITSET = antlrBitsetOf(-1); Create empty bitset

Remarks:
Stdargs function - must supply -1 as last paremeter, which is NOT added to the set.

References antlr3BitsetAdd(), and antlr3BitsetNew().

Referenced by getTokensType().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API void antlr3BitsetSetAPI ( pANTLR3_BITSET  bitset  ) 

ANTLR3_API ANTLR3_UCHAR antlr3c8toAntlrc ( ANTLR3_INT8  inc  ) 

Provides basic utility functions to convert between the various Unicode character conversions.

There are of course various packages that could be used instead of these functions, but then the Antlr 3 C runtime would be dependant on the particular package. Using ICU for this is a good idea if your project is already dependant on it. Convert 8 bit character to ANTLR char form.

Parameters:
[in] inc Input character to transform from 8 bit form.
Returns:
ANTLR3_UCHAR encoding of the character.

ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenDebugStreamSourceNew ( ANTLR3_UINT32  hint,
pANTLR3_TOKEN_SOURCE  source,
pANTLR3_DEBUG_EVENT_LISTENER  debugger 
)

ANTLR3_API pANTLR3_COMMON_TOKEN antlr3CommonTokenNew ( ANTLR3_UINT32  ttype  ) 

References newToken(), and ANTLR3_COMMON_TOKEN_struct::setType.

Referenced by antlr3CommonTreeNodeStreamNew().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenStreamNew ( ANTLR3_UINT32  hint  ) 

References _LA(), ANTLR3_INT_STREAM_struct::_LA, ANTLR3_TOKEN_STREAM_struct::_LT, ANTLR3_MALLOC, ANTLR3_TOKENSTREAM, antlr3IntStreamNew(), antlr3TokenStreamNew(), antlr3VectorNew(), consume(), ANTLR3_INT_STREAM_struct::consume, discardOffChannel(), ANTLR3_COMMON_TOKEN_STREAM_struct::discardOffChannelToks, discardTokenType(), ANTLR3_COMMON_TOKEN_STREAM_struct::discardTokenType, ANTLR3_TOKEN_STREAM_struct::get, getSourceName(), ANTLR3_INT_STREAM_struct::getSourceName, getTokenRange(), ANTLR3_COMMON_TOKEN_STREAM_struct::getTokenRange, getTokens(), ANTLR3_COMMON_TOKEN_STREAM_struct::getTokens, getTokensList(), ANTLR3_COMMON_TOKEN_STREAM_struct::getTokensList, getTokenSource(), ANTLR3_TOKEN_STREAM_struct::getTokenSource, getTokensSet(), ANTLR3_COMMON_TOKEN_STREAM_struct::getTokensSet, getTokensType(), ANTLR3_COMMON_TOKEN_STREAM_struct::getTokensType, ANTLR3_INT_STREAM_struct::index, ANTLR3_TOKEN_STREAM_struct::istream, mark(), ANTLR3_INT_STREAM_struct::mark, ANTLR3_COMMON_TOKEN_STREAM_struct::p, release(), ANTLR3_INT_STREAM_struct::release, reset(), ANTLR3_COMMON_TOKEN_STREAM_struct::reset, ANTLR3_INT_STREAM_struct::rewind, rewindLast(), ANTLR3_INT_STREAM_struct::rewindLast, rewindStream(), seek(), ANTLR3_INT_STREAM_struct::seek, setDebugListener(), ANTLR3_TOKEN_STREAM_struct::setDebugListener, setTokenSource(), ANTLR3_TOKEN_STREAM_struct::setTokenSource, setTokenTypeChannel(), ANTLR3_COMMON_TOKEN_STREAM_struct::setTokenTypeChannel, size(), ANTLR3_INT_STREAM_struct::size, ANTLR3_INT_STREAM_struct::super, ANTLR3_TOKEN_STREAM_struct::super, tindex(), ANTLR3_COMMON_TOKEN_STREAM_struct::tokens, tokLT(), toString(), ANTLR3_TOKEN_STREAM_struct::toString, toStringSS(), ANTLR3_TOKEN_STREAM_struct::toStringSS, toStringTT(), ANTLR3_TOKEN_STREAM_struct::toStringTT, ANTLR3_COMMON_TOKEN_STREAM_struct::tstream, and ANTLR3_INT_STREAM_struct::type.

Referenced by antlr3CommonTokenStreamSourceNew().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_COMMON_TOKEN_STREAM antlr3CommonTokenStreamSourceNew ( ANTLR3_UINT32  hint,
pANTLR3_TOKEN_SOURCE  source 
)

ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNew ( void   ) 

References ANTLR3_MALLOC, and antlr3SetCTAPI().

Referenced by antlr3CommonTreeNewFromToken().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromToken ( pANTLR3_COMMON_TOKEN  tree  ) 

References antlr3CommonTreeNew(), and ANTLR3_COMMON_TREE_struct::token.

Here is the call graph for this function:

ANTLR3_API pANTLR3_COMMON_TREE antlr3CommonTreeNewFromTree ( pANTLR3_COMMON_TREE  tree  ) 

ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNew ( pANTLR3_STRING_FACTORY  strFactory,
ANTLR3_UINT32  hint 
)

References _LA(), ANTLR3_INT_STREAM_struct::_LA, _LT(), ANTLR3_TREE_NODE_STREAM_struct::_LT, ANTLR3_COMMON_TREE_NODE_STREAM_struct::adaptor, addNavigationNode(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::addNavigationNode, ANTLR3_CALLOC, ANTLR3_COMMONTREENODE, ANTLR3_FALSE, ANTLR3_TEXT_CHARP, ANTLR3_TOKEN_DOWN, ANTLR3_TOKEN_EOF, ANTLR3_TOKEN_INVALID, ANTLR3_TOKEN_UP, ANTLR3_TREE_ADAPTORNew(), antlr3CommonTokenNew(), antlr3CommonTreeNodeStreamFree(), antlr3IntStreamNew(), antlr3SetCTAPI(), antlr3StackNew(), antlr3TreeNodeStreamNew(), antlr3VectorNew(), ANTLR3_COMMON_TOKEN_struct::chars, consume(), ANTLR3_INT_STREAM_struct::consume, ANTLR3_TREE_NODE_STREAM_struct::ctns, DEFAULT_INITIAL_BUFFER_SIZE, ANTLR3_COMMON_TREE_NODE_STREAM_struct::DOWN, ANTLR3_COMMON_TREE_NODE_STREAM_struct::EOF_NODE, ANTLR3_TREE_NODE_STREAM_struct::free, ANTLR3_BASE_TREE_ADAPTOR_struct::free, ANTLR3_COMMON_TREE_NODE_STREAM_struct::free, ANTLR3_TREE_NODE_STREAM_struct::get, getTreeAdaptor(), ANTLR3_TREE_NODE_STREAM_struct::getTreeAdaptor, getTreeSource(), ANTLR3_TREE_NODE_STREAM_struct::getTreeSource, hasUniqueNavigationNodes(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::hasUniqueNavigationNodes, ANTLR3_INT_STREAM_struct::index, INITIAL_CALL_STACK_SIZE, ANTLR3_COMMON_TREE_NODE_STREAM_struct::INVALID_NODE, ANTLR3_TREE_NODE_STREAM_struct::istream, mark(), ANTLR3_INT_STREAM_struct::mark, ANTLR3_COMMON_TREE_NODE_STREAM_struct::markers, newDownNode(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::newDownNode, newUpNode(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::newUpNode, ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodes, ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodeStack, ANTLR3_COMMON_TREE_NODE_STREAM_struct::p, pop(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::pop, push(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::push, release(), ANTLR3_INT_STREAM_struct::release, reset(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::reset, ANTLR3_INT_STREAM_struct::rewind, rewindLast(), ANTLR3_INT_STREAM_struct::rewindLast, rewindMark(), seek(), ANTLR3_INT_STREAM_struct::seek, setUniqueNavigationNodes(), ANTLR3_TREE_NODE_STREAM_struct::setUniqueNavigationNodes, size(), ANTLR3_INT_STREAM_struct::size, ANTLR3_COMMON_TOKEN_struct::strFactory, ANTLR3_COMMON_TREE_NODE_STREAM_struct::stringFactory, ANTLR3_COMMON_TREE_NODE_STREAM_struct::super, ANTLR3_INT_STREAM_struct::super, ANTLR3_COMMON_TOKEN_struct::textState, tindex(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::tnstream, ANTLR3_COMMON_TREE_struct::token, ANTLR3_COMMON_TOKEN_struct::tokText, toString(), ANTLR3_TREE_NODE_STREAM_struct::toString, toStringSS(), ANTLR3_TREE_NODE_STREAM_struct::toStringSS, toStringWork(), ANTLR3_TREE_NODE_STREAM_struct::toStringWork, ANTLR3_INT_STREAM_struct::type, ANTLR3_COMMON_TREE_NODE_STREAM_struct::uniqueNavigationNodes, and ANTLR3_COMMON_TREE_NODE_STREAM_struct::UP.

Referenced by antlr3CommonTreeNodeStreamNewTree().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNewStream ( pANTLR3_COMMON_TREE_NODE_STREAM  inStream  ) 

References _LA(), ANTLR3_INT_STREAM_struct::_LA, _LT(), ANTLR3_TREE_NODE_STREAM_struct::_LT, ANTLR3_COMMON_TREE_NODE_STREAM_struct::adaptor, addNavigationNode(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::addNavigationNode, ANTLR3_CALLOC, ANTLR3_COMMONTREENODE, ANTLR3_FALSE, ANTLR3_TRUE, antlr3CommonTreeNodeStreamFree(), antlr3IntStreamNew(), antlr3SetCTAPI(), antlr3TreeNodeStreamNew(), antlr3VectorNew(), consume(), ANTLR3_INT_STREAM_struct::consume, ANTLR3_TREE_NODE_STREAM_struct::ctns, DEFAULT_INITIAL_BUFFER_SIZE, ANTLR3_COMMON_TREE_NODE_STREAM_struct::DOWN, ANTLR3_COMMON_TREE_NODE_STREAM_struct::EOF_NODE, ANTLR3_TREE_NODE_STREAM_struct::free, ANTLR3_COMMON_TREE_NODE_STREAM_struct::free, ANTLR3_TREE_NODE_STREAM_struct::get, getLookaheadSize(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::getLookaheadSize, getTreeAdaptor(), ANTLR3_TREE_NODE_STREAM_struct::getTreeAdaptor, getTreeSource(), ANTLR3_TREE_NODE_STREAM_struct::getTreeSource, hasUniqueNavigationNodes(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::hasUniqueNavigationNodes, ANTLR3_INT_STREAM_struct::index, ANTLR3_COMMON_TREE_NODE_STREAM_struct::INVALID_NODE, ANTLR3_COMMON_TREE_NODE_STREAM_struct::isRewriter, ANTLR3_TREE_NODE_STREAM_struct::istream, mark(), ANTLR3_INT_STREAM_struct::mark, ANTLR3_COMMON_TREE_NODE_STREAM_struct::markers, newDownNode(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::newDownNode, newUpNode(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::newUpNode, ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodes, ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodeStack, ANTLR3_COMMON_TREE_NODE_STREAM_struct::p, pop(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::pop, push(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::push, release(), ANTLR3_INT_STREAM_struct::release, reset(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::reset, ANTLR3_INT_STREAM_struct::rewind, rewindLast(), ANTLR3_INT_STREAM_struct::rewindLast, rewindMark(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::root, seek(), ANTLR3_INT_STREAM_struct::seek, setUniqueNavigationNodes(), ANTLR3_TREE_NODE_STREAM_struct::setUniqueNavigationNodes, size(), ANTLR3_INT_STREAM_struct::size, ANTLR3_COMMON_TOKEN_struct::strFactory, ANTLR3_COMMON_TREE_NODE_STREAM_struct::stringFactory, ANTLR3_COMMON_TREE_NODE_STREAM_struct::super, ANTLR3_INT_STREAM_struct::super, tindex(), ANTLR3_COMMON_TREE_NODE_STREAM_struct::tnstream, ANTLR3_COMMON_TREE_struct::token, toString(), ANTLR3_TREE_NODE_STREAM_struct::toString, toStringSS(), ANTLR3_TREE_NODE_STREAM_struct::toStringSS, toStringWork(), ANTLR3_TREE_NODE_STREAM_struct::toStringWork, ANTLR3_INT_STREAM_struct::type, ANTLR3_COMMON_TREE_NODE_STREAM_struct::uniqueNavigationNodes, and ANTLR3_COMMON_TREE_NODE_STREAM_struct::UP.

Here is the call graph for this function:

ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3CommonTreeNodeStreamNewTree ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  hint 
)

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 debugger via a socket.

References addChild(), ANTLR3_DEBUG_EVENT_LISTENER_struct::addChild, ANTLR3_CALLOC, becomeRoot(), ANTLR3_DEBUG_EVENT_LISTENER_struct::becomeRoot, beginBacktrack(), ANTLR3_DEBUG_EVENT_LISTENER_struct::beginBacktrack, beginResync(), ANTLR3_DEBUG_EVENT_LISTENER_struct::beginResync, commence(), ANTLR3_DEBUG_EVENT_LISTENER_struct::commence, consumeHiddenToken(), ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeHiddenToken, consumeNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeNode, consumeToken(), ANTLR3_DEBUG_EVENT_LISTENER_struct::consumeToken, createNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::createNode, createNodeTok(), ANTLR3_DEBUG_EVENT_LISTENER_struct::createNodeTok, DEFAULT_DEBUGGER_PORT, endBacktrack(), ANTLR3_DEBUG_EVENT_LISTENER_struct::endBacktrack, endResync(), ANTLR3_DEBUG_EVENT_LISTENER_struct::endResync, enterAlt(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterAlt, enterDecision(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterDecision, enterRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterRule, enterSubRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::enterSubRule, errorNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::errorNode, exitDecision(), ANTLR3_DEBUG_EVENT_LISTENER_struct::exitDecision, exitRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::exitRule, exitSubRule(), ANTLR3_DEBUG_EVENT_LISTENER_struct::exitSubRule, handshake(), ANTLR3_DEBUG_EVENT_LISTENER_struct::handshake, location(), ANTLR3_DEBUG_EVENT_LISTENER_struct::location, LT(), ANTLR3_DEBUG_EVENT_LISTENER_struct::LT, LTT(), ANTLR3_DEBUG_EVENT_LISTENER_struct::LTT, mark(), ANTLR3_DEBUG_EVENT_LISTENER_struct::mark, nilNode(), ANTLR3_DEBUG_EVENT_LISTENER_struct::nilNode, ANTLR3_DEBUG_EVENT_LISTENER_struct::port, ANTLR3_DEBUG_EVENT_LISTENER_struct::PROTOCOL_VERSION, recognitionException(), ANTLR3_DEBUG_EVENT_LISTENER_struct::recognitionException, ANTLR3_DEBUG_EVENT_LISTENER_struct::rewind, rewindLast(), ANTLR3_DEBUG_EVENT_LISTENER_struct::rewindLast, rewindMark(), semanticPredicate(), ANTLR3_DEBUG_EVENT_LISTENER_struct::semanticPredicate, setTokenBoundaries(), ANTLR3_DEBUG_EVENT_LISTENER_struct::setTokenBoundaries, terminate(), and ANTLR3_DEBUG_EVENT_LISTENER_struct::terminate.

Referenced by antlr3DebugListenerNewPort().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API ANTLR3_INT32 antlr3dfapredict ( void *  ctx,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_INT_STREAM  is,
pANTLR3_CYCLIC_DFA  cdfa 
)

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.

ANTLR3_API ANTLR3_INT32 antlr3dfaspecialTransition ( void *  ctx,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_INT_STREAM  is,
pANTLR3_CYCLIC_DFA  dfa,
ANTLR3_INT32  s 
)

ANTLR3_API pANTLR3_HASH_ENUM antlr3EnumNew ( pANTLR3_HASH_TABLE  table  ) 

Creates an enumeration structure to traverse the hash table.

Parameters:
table Table to enumerate
Returns:
Pointer to enumeration structure.

References ANTLR3_ERR_NOMEM, ANTLR3_FUNC_PTR, ANTLR3_MALLOC, antlr3EnumFree(), antlr3EnumNext(), antlr3EnumNextEntry(), ANTLR3_HASH_ENUM_struct::bucket, ANTLR3_HASH_TABLE_struct::buckets, ANTLR3_HASH_BUCKET_struct::entries, ANTLR3_HASH_ENUM_struct::entry, ANTLR3_HASH_ENUM_struct::free, ANTLR3_HASH_ENUM_struct::next, and ANTLR3_HASH_ENUM_struct::table.

Referenced by antlr3BitsetList().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_EXCEPTION antlr3ExceptionNew ( ANTLR3_UINT32  exception,
void *  name,
void *  message,
ANTLR3_BOOLEAN  freeMessage 
)

Creates a new ANTLR3 exception structure.

Parameters:
[in] exception One of the ANTLR3_xxx_EXCEPTION indicators such as ANTLR3_RECOGNITION_EXCEPTION
[in] message Pointer to message string
[in] freeMessage Set to ANTLR3_TRUE if the message parameter should be freed by a call to ANTLR3_FREE() when the exception is destroyed.
Returns:
Pointer to newly initialized exception structure, or an ANTLR3_ERR_xx defined value upon failure.
An exception is 'thrown' by a recognizer when input is seen that is not predicted by the grammar productions or when some other error condition occurs. In C we do not have the luxury of try and catch blocks, so exceptions are added in the order they occur to a list in the baserecognizer structure. The last one to be thrown is inserted at the head of the list and the one currently installed is pointed to by the newly installed exception.

Remarks:
After an exception is created, you may add a pointer to your own structure and a pointer to a function to free this structure when the exception is destroyed.
See also:
ANTLR3_EXCEPTION

References ANTLR3_CALLOC, antlr3ExceptionFree(), antlr3ExceptionPrint(), ANTLR3_EXCEPTION_struct::freeEx, ANTLR3_EXCEPTION_struct::freeMessage, ANTLR3_EXCEPTION_struct::message, ANTLR3_EXCEPTION_struct::name, ANTLR3_EXCEPTION_struct::print, and ANTLR3_EXCEPTION_struct::type.

Referenced by antlr3RecognitionExceptionNew().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_INPUT_STREAM antlr3FileStreamNew ( pANTLR3_UINT8  fileName,
ANTLR3_UINT32  encoding 
)

ANTLR3_API ANTLR3_UINT32 antlr3Hash ( void *  key,
ANTLR3_UINT32  keylen 
)

Given an input key of arbitrary length, return a hash value of it.

This can then be used (with suitable modulo) to index other structures.

Referenced by antlr3HashGet(), antlr3HashPut(), and antlr3HashRemove().

Here is the caller graph for this function:

ANTLR3_API pANTLR3_HASH_TABLE antlr3HashTableNew ( ANTLR3_UINT32  sizeHint  ) 

ANTLR3_API pANTLR3_INT_TRIE antlr3IntTrieNew ( ANTLR3_UINT32  depth  ) 

ANTLR3_API pANTLR3_LEXER antlr3LexerNew ( ANTLR3_UINT32  sizeHint,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

References ANTLR3_MALLOC, ANTLR3_TOKEN_EOF, ANTLR3_TOKEN_INVALID, ANTLR3_TRUE, ANTLR3_TYPE_LEXER, antlr3BaseRecognizerNew(), antlr3SetTokenAPI(), displayRecognitionError(), ANTLR3_BASE_RECOGNIZER_struct::displayRecognitionError, emit(), ANTLR3_LEXER_struct::emit, emitNew(), ANTLR3_LEXER_struct::emitNew, ANTLR3_TOKEN_SOURCE_struct::eofToken, ANTLR3_COMMON_TOKEN_struct::factoryMade, ANTLR3_BASE_RECOGNIZER_struct::free, ANTLR3_LEXER_struct::free, freeLexer(), getCharIndex(), ANTLR3_LEXER_struct::getCharIndex, getCharPositionInLine(), ANTLR3_LEXER_struct::getCharPositionInLine, getCurrentInputSymbol(), ANTLR3_BASE_RECOGNIZER_struct::getCurrentInputSymbol, getLine(), ANTLR3_LEXER_struct::getLine, getMissingSymbol(), ANTLR3_BASE_RECOGNIZER_struct::getMissingSymbol, getText(), ANTLR3_LEXER_struct::getText, matchAny(), ANTLR3_LEXER_struct::matchAny, matchc(), ANTLR3_LEXER_struct::matchc, matchRange(), ANTLR3_LEXER_struct::matchRange, matchs(), ANTLR3_LEXER_struct::matchs, mTokens(), ANTLR3_LEXER_struct::mTokens, nextToken(), ANTLR3_TOKEN_SOURCE_struct::nextToken, popCharStream(), ANTLR3_LEXER_struct::popCharStream, pushCharStream(), ANTLR3_LEXER_struct::pushCharStream, ANTLR3_LEXER_struct::rec, recover(), ANTLR3_LEXER_struct::recover, reportError(), ANTLR3_BASE_RECOGNIZER_struct::reportError, reset(), ANTLR3_BASE_RECOGNIZER_struct::reset, setCharStream(), ANTLR3_LEXER_struct::setCharStream, ANTLR3_COMMON_TOKEN_struct::setType, ANTLR3_TOKEN_SOURCE_struct::skipToken, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_COMMON_TOKEN_struct::strFactory, ANTLR3_TOKEN_SOURCE_struct::strFactory, ANTLR3_TOKEN_SOURCE_struct::super, ANTLR3_BASE_RECOGNIZER_struct::super, ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokFactory, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokSource.

Referenced by antlr3LexerNewStream().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_LEXER antlr3LexerNewStream ( ANTLR3_UINT32  sizeHint,
pANTLR3_INPUT_STREAM  input,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

References antlr3LexerNew(), and setCharStream().

Here is the call graph for this function:

ANTLR3_API pANTLR3_LIST antlr3ListNew ( ANTLR3_UINT32  sizeHint  ) 

ANTLR3_API void antlr3MTNExceptionNew ( pANTLR3_BASE_RECOGNIZER  recognizer  ) 

Creates a new Mismatched Tree Nde Exception and inserts in the recognizer exception stack.

Parameters:
recognizer Context pointer for this recognizer

References ANTLR3_MISMATCHED_TREE_NODE_EXCEPTION, ANTLR3_MISMATCHED_TREE_NODE_NAME, antlr3RecognitionExceptionNew(), ANTLR3_RECOGNIZER_SHARED_STATE_struct::exception, ANTLR3_EXCEPTION_struct::name, ANTLR3_BASE_RECOGNIZER_struct::state, and ANTLR3_EXCEPTION_struct::type.

Referenced by antlr3TreeParserNewStream().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_PARSER antlr3ParserNew ( ANTLR3_UINT32  sizeHint,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

ANTLR3_API pANTLR3_PARSER antlr3ParserNewStream ( ANTLR3_UINT32  sizeHint,
pANTLR3_TOKEN_STREAM  tstream,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

References antlr3ParserNew(), and ANTLR3_PARSER_struct::setTokenStream.

Referenced by antlr3ParserNewStreamDbg().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_PARSER antlr3ParserNewStreamDbg ( ANTLR3_UINT32  sizeHint,
pANTLR3_TOKEN_STREAM  tstream,
pANTLR3_DEBUG_EVENT_LISTENER  dbg,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

References antlr3ParserNewStream(), and ANTLR3_PARSER_struct::setDebugListener.

Here is the call graph for this function:

ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAE ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description 
)

ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAEE ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description,
void *  oneElement 
)

ANTLR3_API pANTLR3_REWRITE_RULE_NODE_STREAM antlr3RewriteRuleNODEStreamNewAEV ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description,
pANTLR3_VECTOR  vector 
)

ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAE ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description 
)

ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAEE ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description,
void *  oneElement 
)

ANTLR3_API pANTLR3_REWRITE_RULE_SUBTREE_STREAM antlr3RewriteRuleSubtreeStreamNewAEV ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description,
pANTLR3_VECTOR  vector 
)

ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAE ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description 
)

ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAEE ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description,
void *  oneElement 
)

ANTLR3_API pANTLR3_REWRITE_RULE_TOKEN_STREAM antlr3RewriteRuleTOKENStreamNewAEV ( pANTLR3_BASE_TREE_ADAPTOR  adaptor,
pANTLR3_BASE_RECOGNIZER  rec,
pANTLR3_UINT8  description,
pANTLR3_VECTOR  vector 
)

ANTLR3_API void antlr3SetCTAPI ( pANTLR3_COMMON_TREE  tree  ) 

ANTLR3_API void antlr3SetTokenAPI ( pANTLR3_COMMON_TOKEN  token  ) 

ANTLR3_API void antlr3SetVectorApi ( pANTLR3_VECTOR  vector,
ANTLR3_UINT32  sizeHint 
)

ANTLR3_API pANTLR3_STACK antlr3StackNew ( ANTLR3_UINT32  sizeHint  ) 

ANTLR3_API pANTLR3_STRING_FACTORY antlr3StringFactoryNew ( ANTLR3_UINT32  encoding  ) 

ANTLR3_API pANTLR3_INPUT_STREAM antlr3StringStreamNew ( pANTLR3_UINT8  data,
ANTLR3_UINT32  encoding,
ANTLR3_UINT32  size,
pANTLR3_UINT8  name 
)

ANTLR3_API pANTLR3_TOKEN_FACTORY antlr3TokenFactoryNew ( pANTLR3_INPUT_STREAM  input  ) 

ANTLR3_API pANTLR3_TOPO antlr3TopoNew (  ) 

Allocate and initialize a new ANTLR3 topological sorter, which can be used to define edges that identify numerical node indexes that depend on other numerical node indexes, which can then be sorted topologically such that any node is sorted after all its dependent nodes.

Use:

/verbatim

pANTLR3_TOPO topo; topo = antlr3NewTopo();

if (topo == NULL) { out of memory }

topo->addEdge(topo, 3, 0); // Node 3 depends on node 0 topo->addEdge(topo, 0, 1); // Node - depends on node 1 topo->sortVector(topo, myVector); // Sort the vector in place (node numbers are the vector entry numbers)

/verbatim

References addEdge(), ANTLR3_TOPO_struct::addEdge, ANTLR3_FALSE, ANTLR3_MALLOC, ANTLR3_TOPO_struct::cycle, ANTLR3_TOPO_struct::cycleMark, ANTLR3_TOPO_struct::edges, ANTLR3_TOPO_struct::free, freeTopo(), ANTLR3_TOPO_struct::hasCycle, ANTLR3_TOPO_struct::limit, ANTLR3_TOPO_struct::sorted, sortToArray(), ANTLR3_TOPO_struct::sortToArray, sortVector(), ANTLR3_TOPO_struct::sortVector, and ANTLR3_TOPO_struct::visited.

Here is the call graph for this function:

ANTLR3_API pANTLR3_TREE_NODE_STREAM antlr3TreeNodeStreamNew (  ) 

ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream ( ANTLR3_UINT32  sizeHint,
pANTLR3_COMMON_TREE_NODE_STREAM  ctnstream,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3UnbufTreeNodeStreamNew ( pANTLR3_STRING_FACTORY  strFactory,
ANTLR3_UINT32  hint 
)

ANTLR3_API pANTLR3_COMMON_TREE_NODE_STREAM antlr3UnbufTreeNodeStreamNewTree ( pANTLR3_BASE_TREE  tree,
ANTLR3_UINT32  hint 
)

ANTLR3_API pANTLR3_VECTOR_FACTORY antlr3VectorFactoryNew ( ANTLR3_UINT32  sizeHint  ) 

ANTLR3_API pANTLR3_VECTOR antlr3VectorNew ( ANTLR3_UINT32  sizeHint  ) 

ANTLR3_API void fillBufferExt ( pANTLR3_COMMON_TOKEN_STREAM  tokenStream  ) 


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