#include <antlr3commontoken.h>
Data Fields | |
void(* | close )(struct ANTLR3_TOKEN_FACTORY_struct *factory) |
Pointer to a function the destroys the factory. | |
pANTLR3_INPUT_STREAM | input |
Pointer to an input stream that is using this token factory (may be NULL) which will be assigned to the tokens automatically. | |
ANTLR3_INT32 | maxPool |
Maximum pool count we have available. | |
pANTLR3_COMMON_TOKEN(* | newToken )(struct ANTLR3_TOKEN_FACTORY_struct *factory) |
Pointer to a function that returns a new token. | |
ANTLR3_UINT32 | nextToken |
The next token to throw out from the pool, will cause a new pool allocation if this exceeds the available tokenCount. | |
pANTLR3_COMMON_TOKEN * | pools |
Pointers to the array of tokens that this factory has produced so far. | |
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. | |
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 reference to their originating text. | |
ANTLR3_INT32 | thisPool |
Current pool tokens we are allocating from. | |
ANTLR3_COMMON_TOKEN | unTruc |
Trick to initialize tokens and their API quickly, we set up this token when the factory is created, then just copy the memory it uses into the new token. |
void(* ANTLR3_TOKEN_FACTORY_struct::close)(struct ANTLR3_TOKEN_FACTORY_struct *factory) |
Pointer to a function the destroys the factory.
Referenced by antlr3TokenFactoryNew(), ctaFree(), freeBR(), and freeLexer().
Pointer to an input stream that is using this token factory (may be NULL) which will be assigned to the tokens automatically.
Referenced by createToken(), newPoolToken(), and setInputStream().
pANTLR3_COMMON_TOKEN(* ANTLR3_TOKEN_FACTORY_struct::newToken)(struct ANTLR3_TOKEN_FACTORY_struct *factory) |
Pointer to a function that returns a new token.
Referenced by antlr3TokenFactoryNew(), createToken(), createTokenFromToken(), emit(), and getMissingSymbol().
The next token to throw out from the pool, will cause a new pool allocation if this exceeds the available tokenCount.
Referenced by factoryClose(), newPool(), and newPoolToken().
Pointers to the array of tokens that this factory has produced so far.
Referenced by antlr3TokenFactoryNew(), factoryClose(), newPool(), and newPoolToken().
void(* ANTLR3_TOKEN_FACTORY_struct::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.
Referenced by antlr3TokenFactoryNew(), and reset().
void(* ANTLR3_TOKEN_FACTORY_struct::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 reference to their originating text.
Referenced by antlr3TokenFactoryNew(), and setCharStream().
Current pool tokens we are allocating from.
Referenced by antlr3TokenFactoryNew(), factoryClose(), factoryReset(), newPool(), and newPoolToken().
Trick to initialize tokens and their API quickly, we set up this token when the factory is created, then just copy the memory it uses into the new token.
Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3TokenFactoryNew(), and setInputStream().