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

TokenMatch Class Reference

#include <TokenMatch.h>

List of all members.

Public Methods

 TokenMatch (AIDA_STD::string text)
 Constructor taking string parameter. More...

virtual ~TokenMatch ()
 Destructor. More...

bool isInt ()
 Matches 1 or -1. More...

bool isReal1 ()
 Matches 1.0 & 1.or -1.0 & -1. More...

bool isReal2 ()
 Matches .1 or -.1. More...

bool isReal3 ()
 Matches 1.0e23 or -1.0e23. More...

bool isReal4 ()
 Matches 1.0e-23 or -1.0e-23. More...

bool isReal5 ()
 Matches 1e23 or -1e23. More...

bool isReal6 ()
 Matches 1e-23 or 1e-23. More...

bool isReal ()
 Is current token a real number ? More...

bool isNum ()
 Is current token a number? More...

bool isId ()
 Is current token an identifier? More...

bool match (const char *a_regexp)
 Method to match the token to the pattern a_regexp. More...


Private Attributes

AIDA_STD::string token


Detailed Description

Class to match a token as a number, an identifier or against any regular expression. This class takes a string as contructor parameter and allows the user to check whether the token is an identifier, an integer number or a real number. A generic match method allows to match against a user specified regular expression.

Definition at line 33 of file TokenMatch.h.


Constructor & Destructor Documentation

TokenMatch AIDA_STD::string    text [inline]
 

Definition at line 36 of file TokenMatch.h.

References token.

virtual ~TokenMatch   [inline, virtual]
 

Definition at line 38 of file TokenMatch.h.


Member Function Documentation

bool isId   [inline]
 

Definition at line 81 of file TokenMatch.h.

References match.

Referenced by ConstList::parseTerm.

bool isInt   [inline]
 

Definition at line 40 of file TokenMatch.h.

References match.

Referenced by isNum.

bool isNum   [inline]
 

Definition at line 77 of file TokenMatch.h.

References isInt, and isReal.

Referenced by ConstList::parseTerm.

bool isReal   [inline]
 

Definition at line 73 of file TokenMatch.h.

References isReal1, isReal2, isReal3, isReal4, isReal5, and isReal6.

Referenced by isNum.

bool isReal1   [inline]
 

Definition at line 44 of file TokenMatch.h.

References match.

Referenced by isReal.

bool isReal2   [inline]
 

Definition at line 49 of file TokenMatch.h.

References match.

Referenced by isReal.

bool isReal3   [inline]
 

Definition at line 53 of file TokenMatch.h.

References match.

Referenced by isReal.

bool isReal4   [inline]
 

Definition at line 58 of file TokenMatch.h.

References match.

Referenced by isReal.

bool isReal5   [inline]
 

Definition at line 63 of file TokenMatch.h.

References match.

Referenced by isReal.

bool isReal6   [inline]
 

Definition at line 68 of file TokenMatch.h.

References match.

Referenced by isReal.

bool match const char *    a_regexp [inline]
 

Definition at line 86 of file TokenMatch.h.

References token.

Referenced by isId, isInt, isReal1, isReal2, isReal3, isReal4, isReal5, and isReal6.


Member Data Documentation

AIDA_STD::string token [private]
 

Definition at line 100 of file TokenMatch.h.

Referenced by match, and TokenMatch.


The documentation for this class was generated from the following file:
Generated on Tue May 20 14:50:28 2003 for HepUtilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002