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


| #define _stat stat |
Referenced by antlr3Fsize().
| #define ANTLR3_API |
| #define ANTLR3_API |
| #define ANTLR3_AVERAGE |
| #define ANTLR3_CALLOC | ( | numEl, | |||
| elSize | ) | calloc (numEl, (size_t)(elSize)) |
Default definition of ANTLR3_CALLOC.
You can override this before including antlr3.h if you wish to use your own implementation.
Referenced by antlr3AsciiFileStreamNew(), antlr3BaseRecognizerNew(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3DebugListenerNew(), antlr3ExceptionNew(), antlr3IntStreamNew(), antlr3IntTrieNew(), antlr3TreeNodeStreamNew(), intTrieAdd(), and newPool().
| #define ANTLR3_CDECL |
Referenced by addChild(), newRaw16(), newRaw8(), and newVector().
| #define ANTLR3_CLOSESOCKET close |
Referenced by handshake().
| #define ANTLR3_ENCODING_LATIN1 0 |
Referenced by stringInit8().
| #define ANTLR3_ENCODING_UCS2 1 |
Referenced by stringInit16().
| #define ANTLR3_ENCODING_UTF32 3 |
| #define ANTLR3_ENCODING_UTF8 2 |
| #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.
Note that you can define this to be // without harming the runtime.
Referenced by addChild(), alreadyParsedRule(), antlr3ExceptionPrint(), antlr3RecognitionExceptionNew(), becomeRoot(), consumeUntil(), consumeUntilSet(), ConvertUTF16toUTF32(), displayRecognitionError(), dupTok(), dupTreeNode(), getChild(), getChildCount(), getText(), match(), matchAny(), memoize(), mismatch(), mTokens(), recover(), recoverFromMismatchedElement(), recoverFromMismatchedSet(), recoverFromMismatchedToken(), replaceChildren(), setText(), setText8(), setType(), and synpred().
| #define ANTLR3_FREE | ( | ptr | ) | free ((void *)(ptr)) |
Default definition of ANTLR3_FREE.
You can override this before including antlr3.h if you wish to use your own implementation.
Referenced by antlr3BaseRecognizerNew(), antlr3BitsetCopy(), antlr3BitsetFree(), antlr3BitsetNew(), antlr3CommonTreeNodeStreamFree(), antlr3CTSFree(), antlr3EnumFree(), antlr3ExceptionFree(), antlr3HashDelete(), antlr3HashDeleteI(), antlr3HashFree(), antlr3HashRemove(), antlr3HashTableNew(), antlr3InputClose(), antlr3IntTrieNew(), antlr3ListFree(), antlr3StackFree(), antlr3StringFactoryNew(), antlr3TokenStreamFree(), antlr3TreeNodeStreamFree(), antlr3VectorFactoryNew(), antlr3VectorFree(), antlr3VectorNew(), closeFactory(), closeVectorFactory(), ctaFree(), expungeRS(), factoryClose(), freeBR(), freeIntNode(), freeLexer(), freeParser(), freeStream(), grow(), intTrieFree(), replaceChildren(), stringFree(), and toUTF8_16().
| #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 antlr3AsciiMark().
| #define ANTLR3_FUNC_PTR | ( | ptr | ) | (void *)((ANTLR3_UINT32)(ptr)) |
| #define ANTLR3_INLINE inline |
| #define ANTLR3_LIST_SIZE_HINT 63 |
| #define ANTLR3_MALLOC | ( | request | ) | malloc ((size_t)(request)) |
Default definition of ANTLR3_MALLOC.
You can override this before including antlr3.h if you wish to use your own implementation.
Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3ArboretumNew(), antlr3AsciiMark(), antlr3BaseRecognizerNew(), antlr3BitsetCopy(), antlr3BitsetNew(), antlr3BitsetToIntList(), antlr3CommonTokenStreamNew(), antlr3CommonTreeNew(), antlr3EnumNew(), antlr3HashPut(), antlr3HashPutI(), antlr3HashTableNew(), antlr3LexerNew(), antlr3ListNew(), antlr3NewAsciiStringCopyStream(), antlr3NewAsciiStringInPlaceStream(), antlr3NewUCS2StringInPlaceStream(), antlr3ParserNew(), antlr3readAscii(), antlr3RewriteRuleElementStreamNewAE(), antlr3StackNew(), antlr3StringFactoryNew(), antlr3TokenFactoryNew(), antlr3TokenStreamNew(), antlr3TreeParserNewStream(), antlr3VectorFactoryNew(), antlr3VectorNew(), grow(), newPool(), newRaw16(), newRaw8(), newSize16(), newSize8(), newToken(), to8_16(), and toUTF8_16().
| #define ANTLR3_MEMMOVE | ( | target, | |||
| source, | |||||
| size | ) | memcpy((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 antlr3BitsetClone(), antlr3BitsetCopy(), antlr3NewAsciiStringCopyStream(), antlr3VectorDel(), antrl3VectorRemove(), append16_16(), append8(), grow(), insert16_16(), insert16_8(), insert8(), newPoolToken(), newPoolTree(), newPtr16_16(), newPtr8(), set16_16(), and set8().
| #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.
Referenced by antlr3VectorResize().
| #define ANTLR3_PRINTF printf |
| #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 addc16(), addc8(), antlr3VectorResize(), append16_16(), append16_8(), append8(), insert16_16(), insert16_8(), insert8(), newPool(), set16_16(), set16_8(), and set8().
| #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) |
Referenced by antlr3UCS2Substr(), displayRecognitionError(), getUniqueID(), and toUTF8_16().
| #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 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 |
| 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.

| 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, dupN