81 |
/*! This function returns the token associated to the name "word" if it |
/*! This function returns the token associated to the name "word" if it |
82 |
corresponds to a Keyword, else, it returns "-1". |
corresponds to a Keyword, else, it returns "-1". |
83 |
*/ |
*/ |
84 |
const int POVLexer::isKeyword(const std::string& word) |
int POVLexer::isKeyword(const std::string& word) |
85 |
{ |
{ |
86 |
KeyWordList::iterator theKeyWord |
KeyWordList::iterator theKeyWord |
87 |
= __keyWordList.find(word.c_str()); |
= __keyWordList.find(word.c_str()); |
99 |
} |
} |
100 |
|
|
101 |
//! The lexer function. |
//! The lexer function. |
102 |
const int POVLexer::yylex() |
int POVLexer::yylex() |
103 |
{ |
{ |
104 |
char readChar = ' '; |
char readChar = ' '; |
105 |
in.unsetf(std::ios::skipws); |
in.unsetf(std::ios::skipws); |