lestes::lang::cplus::lex::special_tokens Class Reference

Token type assignment filter. More...

#include <special_tokens.hh>

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

Inheritance graph
[legend]
List of all members.

Public Member Functions

ptr< ucn_tokenread (void)
 Reads next token.

Static Public Member Functions

static ptr< special_tokenscreate (void)
 Returns new instance.

Protected Member Functions

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

Private Types

enum  { ERRORS_LIMIT = 8 }
enum  state_type { START, END }
 States of the automaton. More...

Private Member Functions

 special_tokens (const special_tokens &copy)
 Hides copy constructor.
special_tokensoperator= (const special_tokens &rhs)
 Hides assignment operator.

Private Attributes

state_type state
 Current state of the parser.
srp< ucn_tokensaved
 Saved token.
ulint errors
 Number of incoming errors.

Detailed Description

Token type assignment filter.

Assigns type to tokens according to their value. Checks invalid values of characters. Cuts input flooding errors


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
ERRORS_LIMIT  Number of errors to cut the input.

enum lestes::lang::cplus::lex::special_tokens::state_type [private]

States of the automaton.

Enumerator:
START  Ordinary tokens.
END  Already encountered end of file.


Constructor & Destructor Documentation

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

Creates the object.

Creates the object.

Postcondition:
errors == 0

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

Hides copy constructor.


Member Function Documentation

ptr< ucn_token > lestes::lang::cplus::lex::special_tokens::read ( void   )  [virtual]

Reads next token.

Returns next token, assigns token type. Saves the EOF token to return it again. Tries to stop the error flood from encoder by sending EOF.

Returns:
The token with assigned type.

Implements lestes::lang::cplus::lex::ucn_filter.

ptr< special_tokens > lestes::lang::cplus::lex::special_tokens::create ( void   )  [static]

Returns new instance.

Returns new instance.

Postcondition:
state == BEGIN
Returns:
New instance of the class.

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

Marks the object.

Marks the object.

Reimplemented from lestes::lang::cplus::lex::ucn_filter.

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

Hides assignment operator.


Member Data Documentation

state_type lestes::lang::cplus::lex::special_tokens::state [private]

Current state of the parser.

srp<ucn_token> lestes::lang::cplus::lex::special_tokens::saved [private]

Saved token.

ulint lestes::lang::cplus::lex::special_tokens::errors [private]

Number of incoming errors.


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