#include <Lexer.hpp>

Public Types | |
| typedef std::map< const char *, int, Lexer::eqstr > | KeyWordList |
Public Member Functions | |
| Lexer (std::istream &In, std::ostream &Out=std::cout, const size_t WMaxL=255) | |
| Constructs a Lexer. | |
| virtual | ~Lexer () |
| Destructor. | |
| virtual int | yylex ()=0 |
| Interface with parser. | |
| const size_t & | lineno () const |
| Read-only access to the current line number. | |
| const char * | YYText () const |
| Read-only access to the current Word. | |
Protected Attributes | |
| std::istream & | in |
| The input std::istream. | |
| std::ostream & | out |
| The output std::istream. | |
| size_t | linenumber |
| The current number line. | |
| std::string | yytext |
| The current "word". | |
| KeyWordList | __keyWordList |
| int | declarationToken |
Private Attributes | |
| size_t | WordMaxLenght |
| The maximum autorized length for a "word". | |
Classes | |
| struct | eqstr |
Definition at line 44 of file Lexer.hpp.
| typedef std::map<const char*, int, Lexer::eqstr> Lexer::KeyWordList |
| Lexer::Lexer | ( | std::istream & | In, | |
| std::ostream & | Out = std::cout, |
|||
| const size_t | WMaxL = 255 | |||
| ) | [inline] |
Constructs a Lexer.
Definition at line 87 of file Lexer.hpp.
References linenumber.
00090 : WordMaxLenght(WMaxL), 00091 in(In), 00092 out(Out) 00093 { 00094 // yytext = new char[WMaxL+1]; 00095 linenumber = 1; 00096 }
| virtual Lexer::~Lexer | ( | ) | [inline, virtual] |
| virtual int Lexer::yylex | ( | ) | [pure virtual] |
| const size_t& Lexer::lineno | ( | ) | const [inline] |
Read-only access to the current line number.
Definition at line 108 of file Lexer.hpp.
References linenumber.
00109 { 00110 return linenumber; 00111 }
| const char* Lexer::YYText | ( | ) | const [inline] |
size_t Lexer::WordMaxLenght [private] |
std::istream& Lexer::in [protected] |
The input std::istream.
Definition at line 60 of file Lexer.hpp.
Referenced by XMLLexer::XMLLexer(), XMLLexer::yylex(), POVLexer::yylex(), and FFLexer::yylex().
std::ostream& Lexer::out [protected] |
size_t Lexer::linenumber [protected] |
The current number line.
Definition at line 66 of file Lexer.hpp.
Referenced by Lexer(), lineno(), XMLLexer::yylex(), POVLexer::yylex(), and FFLexer::yylex().
std::string Lexer::yytext [protected] |
The current "word".
Definition at line 69 of file Lexer.hpp.
Referenced by XMLLexer::yylex(), POVLexer::yylex(), FFLexer::yylex(), and YYText().
KeyWordList Lexer::__keyWordList [protected] |
Definition at line 78 of file Lexer.hpp.
Referenced by FFLexer::FFLexer(), POVLexer::isKeyword(), FFLexer::isKeyword(), POVLexer::POVLexer(), and FFLexer::switchToContext().
int Lexer::declarationToken [protected] |
This contains the token associated to a type. This is used for variables declaration to know its type.
Definition at line 83 of file Lexer.hpp.
Referenced by FFLexer::yylex().
1.5.6