lestes::lang::cplus::lex::expander Class Reference

Macro expander. More...

#include <expander.hh>

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

Inheritance graph
[legend]
List of all members.

Public Types

enum  mode_type { NORMAL, DIRECTIVE, FILE_END }
 The modes of input. More...

Public Member Functions

ptr< token_sequenceread_line (void)
 Reads line from input.
ptr< token_sequenceread_expanded (void)
 Reads expanded line from input.
mode_type mode_get (void)
 Returns input mode.

Static Public Member Functions

static ptr< expandercreate (const ptr< pp_filter > &a_input, const ptr< macro_storage > &a_macros)
 Returns new expander.

Protected Member Functions

 expander (const ptr< pp_filter > &a_input, const ptr< macro_storage > &a_macros)
 Creates new expander.
virtual void gc_mark (void)
 Marks the object.

Private Attributes

srp< macro_storagemacros
 The macro storage for expansion.
srp< token_streamstream
 The stream connected to input.

Detailed Description

Macro expander.

Performs reading of possibly expanded lines of tokens.


Member Enumeration Documentation

enum lestes::lang::cplus::lex::expander::mode_type

The modes of input.

Enumerator:
NORMAL  Normal mode.
DIRECTIVE  Directive.
FILE_END  End of file.


Constructor & Destructor Documentation

lestes::lang::cplus::lex::expander::expander ( const ptr< pp_filter > &  a_input,
const ptr< macro_storage > &  a_macros 
) [protected]

Creates new expander.

Creates new expander.

Precondition:
a_input != NULL

a_macros != NULL

Parameters:
a_input The input into the expander.
a_macros The macro storage for macro expansion.


Member Function Documentation

ptr< token_sequence > lestes::lang::cplus::lex::expander::read_line ( void   ) 

Reads line from input.

Returns the next line without expansion.

Returns:
The next line.

ptr< token_sequence > lestes::lang::cplus::lex::expander::read_expanded ( void   ) 

Reads expanded line from input.

Returs the next line expanded.

Returns:
The expanded line.

expander::mode_type lestes::lang::cplus::lex::expander::mode_get ( void   ) 

Returns input mode.

Returns current mode of the input.

Returns:
The mode of input.

ptr< expander > lestes::lang::cplus::lex::expander::create ( const ptr< pp_filter > &  a_input,
const ptr< macro_storage > &  a_macros 
) [static]

Returns new expander.

Returns new expander.

Precondition:
a_input != NULL

a_macros != NULL

Parameters:
a_input The input into the expander.
a_macros The macro storage for macro expansion.

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

Marks the object.

Marks the object.

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


Member Data Documentation

srp<macro_storage> lestes::lang::cplus::lex::expander::macros [private]

The macro storage for expansion.

srp<token_stream> lestes::lang::cplus::lex::expander::stream [private]

The stream connected to input.


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