Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Expr Class Reference

#include <expr.h>

Inheritance diagram for Expr:

Inheritance graph
[legend]
Collaboration diagram for Expr:

Collaboration graph
[legend]

Public Member Functions

 Expr (const string &aBuffer)
virtual const char atSr (const int ati, const int atj)
virtual const int EofId (void) const
virtual const int IdentifierId (void) const
virtual const int NumberId (void) const

Static Private Attributes

const char sr [10][10]

Constructor & Destructor Documentation

Expr::Expr const string &  aBuffer  ) 
 

Initializes the lexical symbol

Definition at line 30 of file expr.cpp.

References Lexer::symbol.

00031 : Lexer( aBuffer )
00032 {
00034         symbol.insert( std::make_pair( string( "$" ) , 8) );
00035         symbol.insert( std::make_pair( string( "(" ) , 6) );
00036         symbol.insert( std::make_pair( string( ")" ) , 7) );
00037         symbol.insert( std::make_pair( string( "|" ) , 4) );
00038         symbol.insert( std::make_pair( string( "+" ) , 0) );
00039         symbol.insert( std::make_pair( string( "-" ) , 1) );
00040         symbol.insert( std::make_pair( string( "/" ) , 3) );
00041         symbol.insert( std::make_pair( string( "*" ) , 2) );
00042         symbol.insert( std::make_pair( string( "Id" ) , 5) );
00043 
00044         symbol.insert( std::make_pair( string( "Val" ) , 9) );
00045 
00046 
00047 }


Member Function Documentation

virtual const char Expr::atSr const int  ati,
const int  atj
[inline, virtual]
 

Implements Lexer.

Definition at line 13 of file expr.h.

References sr.

00013 {       return sr[ati][atj];    }

const int Expr::EofId void   )  const [virtual]
 

Implements Lexer.

Definition at line 48 of file expr.cpp.

00049 {
00050         return 8;
00051 }

const int Expr::IdentifierId void   )  const [virtual]
 

Implements Lexer.

Definition at line 53 of file expr.cpp.

00054 {
00055         return 5;
00056 }

const int Expr::NumberId void   )  const [virtual]
 

Implements Lexer.

Definition at line 58 of file expr.cpp.

00059 {
00060         return 9;
00061 }


Field Documentation

const char Expr::sr [static, private]
 

Initial value:

        
{       
                {       '>' , '>' , '<' , '<' , '>' , '<' , '<' , '>' , '>'     , '<' } ,
                {       '>' , '>' , '<' , '<' , '>' , '<' , '<' , '>' , '>'     , '<' } ,
                {       '>' , '>' , '>' , '>' , '>' , '<' , '<' , '>' , '>'     , '<' } ,
                {       '>' , '>' , '>' , '>' , '>' , '<' , '<' , '>' , '>'     , '<' } ,
                {       '>' , '>' , '<' , '<' , '>' , '<' , '<' , '>' , '>'     , '<' } ,
                {       '>' , '>' , '>' , '>' , '>' ,   ,   , '>' , '>' ,   } ,
                {       '<' , '<' , '<' , '<' , '<' , '<' , '<' , '=' , '>'     , '<' } ,
                {       '>' , '>' , '>' , '>' , '>' ,   ,   , '>' , '>' ,   } ,
                {       '<' , '<' , '<' , '<' , '<' , '<' , '<' ,   , '$'       , '<' } ,
                {       '>' , '>' , '>' , '>' , '>' ,   ,   , '>' , '>' ,   } 
}

Definition at line 16 of file expr.cpp.

Referenced by atSr().


The documentation for this class was generated from the following files:
Generated on Fri Dec 5 04:06:20 2003 for Borqueror by doxygen 1.3.3