ANTLR3_TOKEN_FACTORY_struct (3) - Linux Manuals

NAME

ANTLR3_TOKEN_FACTORY_struct -

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

SYNOPSIS


#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.
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(* 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.

Detailed Description

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

Field Documentation

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

pANTLR3_INPUT_STREAM ANTLR3_TOKEN_FACTORY_struct::input

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

ANTLR3_UINT32 ANTLR3_TOKEN_FACTORY_struct::nextToken

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

pANTLR3_COMMON_TOKEN* ANTLR3_TOKEN_FACTORY_struct::pools

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

ANTLR3_INT32 ANTLR3_TOKEN_FACTORY_struct::thisPool

Current pool tokens we are allocating from.

Referenced by antlr3TokenFactoryNew(), factoryClose(), newPool(), and newPoolToken().

ANTLR3_COMMON_TOKEN ANTLR3_TOKEN_FACTORY_struct::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.

Referenced by ANTLR3_TREE_ADAPTORNew(), antlr3TokenFactoryNew(), and setInputStream().

Author

Generated automatically by Doxygen for ANTLR3C from the source code.