lestes::lang::cplus::lex::concat Class Reference

Token concatenator. More...

#include <concat.hh>

Inheritance diagram for lestes::lang::cplus::lex::concat:

Inheritance graph
[legend]
List of all members.

Public Types

typedef char char_type
 Type of character in flex.
typedef int size_type
 Type of size in flex.

Public Member Functions

virtual ~concat (void)
 Finalizes object.
size_type yy_input (char_type *cbuf, size_type max)
 Stores next characters for YY_INPUT.
ptr< token_sequenceprocess (const ptr< pp_token > &left, const ptr< pp_token > &right)
 Performs token concatenation.

Static Public Member Functions

static ptr< concatinstance (void)
 Returns the only instance.

Protected Member Functions

 concat (void)
 Creates the object.
virtual void gc_mark (void)
 Marks the object.

Private Types

typedef concat_guts::yy_buffer_state * yy_buffer_type
 Type of flex buffer.

Private Member Functions

 concat (const concat &copy)
 Hides copy constructor.
concatoperator= (const concat &rhs)
 Hides assignment operator.

Private Attributes

yy_buffer_type yy_buffer
 Flex buffer.
ucn_string value
 Current value of input string.
ucn_string::size_type index
 Current index in the input.
ucn_string::size_type length
 Current length of the input.

Static Private Attributes

static ptr< concatsingleton
 The only instance.

Detailed Description

Token concatenator.

Performs token concatenation. Handles integration with concat_guts flexer.


Member Typedef Documentation

typedef char lestes::lang::cplus::lex::concat::char_type

Type of character in flex.

typedef int lestes::lang::cplus::lex::concat::size_type

Type of size in flex.

typedef struct concat_guts::yy_buffer_state* lestes::lang::cplus::lex::concat::yy_buffer_type [read, private]

Type of flex buffer.


Constructor & Destructor Documentation

lestes::lang::cplus::lex::concat::~concat ( void   )  [virtual]

Finalizes object.

Finalizes the object, releases flex buffer.

lestes::lang::cplus::lex::concat::concat ( void   )  [protected]

Creates the object.

Creates the object, allocates flex buffer.

lestes::lang::cplus::lex::concat::concat ( const concat copy  )  [private]

Hides copy constructor.


Member Function Documentation

concat::size_type lestes::lang::cplus::lex::concat::yy_input ( char_type cbuf,
size_type  max 
)

Stores next characters for YY_INPUT.

Fills buffer with characters from current input string. Called through YY_INPUT flex macro.

Parameters:
cbuf The buffer to fill.
max Maximum count of characters to fill.
Returns:
The actual count of filled characters.

ptr< token_sequence > lestes::lang::cplus::lex::concat::process ( const ptr< pp_token > &  left,
const ptr< pp_token > &  right 
)

Performs token concatenation.

Atttempts to concatenate two tokens.

Precondition:
left != NULL || right != NULL.
Parameters:
left The left token to concatenate.
right The right token to concatenate.
Returns:
A token sequence containing the new token, or the input tokens in case of error.

ptr< concat > lestes::lang::cplus::lex::concat::instance ( void   )  [static]

Returns the only instance.

Returns the only instance of the object.

Returns:
The new instance with own flexer buffer.

void lestes::lang::cplus::lex::concat::gc_mark ( void   )  [protected, virtual]

Marks the object.

Marks the object.

Reimplemented from lestes::std::mem::keystone.

concat& lestes::lang::cplus::lex::concat::operator= ( const concat rhs  )  [private]

Hides assignment operator.


Member Data Documentation

yy_buffer_type lestes::lang::cplus::lex::concat::yy_buffer [private]

Flex buffer.

ucn_string lestes::lang::cplus::lex::concat::value [private]

Current value of input string.

ucn_string::size_type lestes::lang::cplus::lex::concat::index [private]

Current index in the input.

ucn_string::size_type lestes::lang::cplus::lex::concat::length [private]

Current length of the input.

ptr< concat > lestes::lang::cplus::lex::concat::singleton [static, private]

The only instance.

The only instance of the class, managing the associated flexer.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:43:38 2007 for lestes by doxygen 1.5.1-20070107