#include <expr.h>
Inheritance diagram for Expr:
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] |
|
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 } |
|
Implements Lexer. Definition at line 13 of file expr.h. References sr.
00013 { return sr[ati][atj]; } |
|
Implements Lexer. Definition at line 48 of file expr.cpp.
00049 {
00050 return 8;
00051 }
|
|
Implements Lexer. Definition at line 53 of file expr.cpp.
00054 {
00055 return 5;
00056 }
|
|
Implements Lexer. Definition at line 58 of file expr.cpp.
00059 {
00060 return 9;
00061 }
|
|
Initial value: { { '>' , '>' , '<' , '<' , '>' , '<' , '<' , '>' , '>' , '<' } , { '>' , '>' , '<' , '<' , '>' , '<' , '<' , '>' , '>' , '<' } , { '>' , '>' , '>' , '>' , '>' , '<' , '<' , '>' , '>' , '<' } , { '>' , '>' , '>' , '>' , '>' , '<' , '<' , '>' , '>' , '<' } , { '>' , '>' , '<' , '<' , '>' , '<' , '<' , '>' , '>' , '<' } , { '>' , '>' , '>' , '>' , '>' , , , '>' , '>' , } , { '<' , '<' , '<' , '<' , '<' , '<' , '<' , '=' , '>' , '<' } , { '>' , '>' , '>' , '>' , '>' , , , '>' , '>' , } , { '<' , '<' , '<' , '<' , '<' , '<' , '<' , , '$' , '<' } , { '>' , '>' , '>' , '>' , '>' , , , '>' , '>' , } } Definition at line 16 of file expr.cpp. Referenced by atSr(). |