ANTLR3_TOKEN_FACTORY_struct Struct Reference

#include <antlr3commontoken.h>

Collaboration diagram for ANTLR3_TOKEN_FACTORY_struct:

Collaboration graph
[legend]

Detailed Description

ANTLR3 Token factory interface to create lots of tokens efficiently rather than creating and freeing lots of little bits of memory.

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_TOKENpools
 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.

Field Documentation

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().

Maximum pool count we have available.

Referenced by antlr3TokenFactoryNew(), and newPool().

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().

Pointer to a function that resets the factory so you can reuse the pools it has laready allocated.

Referenced by antlr3TokenFactoryNew(), and reset().

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().


The documentation for this struct was generated from the following file:

Generated on Mon Nov 29 17:24:07 2010 for ANTLR3C by  doxygen 1.5.5