Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

MacroTokenExpander Class Reference

#include <macro_token_expander.hh>

Collaboration diagram for MacroTokenExpander:

Collaboration graph
[legend]
List of all members.

Public Types

typedef struct MacroTokenExpander::t_MacroDef  MacroDef

Public Methods

void addMacro (const string &name, ReNode *regexp, const Position &pos)
ReNodegetMacro (const string &name) throw (ParseException)

Private Attributes

map<string, MacroDefmacros

Detailed Description

This is esentially a map that holds all the tokens (both "real" and "macro" tokens so that their regexps trees can be used when reffered as mactros inside other tokens' regexps.

Definition at line 60 of file macro_token_expander.hh.


Member Typedef Documentation

typedef struct MacroTokenExpander::t_MacroDef MacroTokenExpander::MacroDef
 

Referenced by addMacro().


Member Function Documentation

void MacroTokenExpander::addMacro ( const string & name,
ReNode * regexp,
const Position & pos )
 

Adds a new macro token definition. If the name already exists, it i overwritten and a warning is printed.

Definition at line 43 of file macro_token_expander.cc.

Referenced by MacroTokenExpander_addMacro().

ReNode * MacroTokenExpander::getMacro ( const string & name ) throw (ParseException)
 

Returns the expansion of the macro token with the given name.

Exceptions:
ParseException   if no macro with the given name exists.

Definition at line 55 of file macro_token_expander.cc.

Referenced by MacroTokenExpander_getMacro().


Member Data Documentation

map< string, MacroDef > MacroTokenExpander::macros<string, MacroDef> [private]
 

Definition at line 97 of file macro_token_expander.hh.


The documentation for this class was generated from the following files:
Generated at Tue Jul 9 21:07:48 2002 for CppCC by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001