58 }
else if(isspace(ch)) {
79 }
else if(ch1 ==
'*') {
85 "Comment not closed.");
90 if(ch ==
'"' || ch ==
'\'') {
93 }
else if(isalpha(ch)) {
96 }
else if(isdigit(ch) ||
132 "Comment not closed.");
163 std::string lexeme(
line.data() + lex_pos,
curr_char - lex_pos);
179 if(! digit) eflag =
true;
198 if(! digit) eflag =
true;
203 while(! isspace(ch) && ! ispunct(ch)) {
211 std::string lexeme(
line.data() + lex_pos,
curr_char - lex_pos);
215 "Invalid numeric token \"" + lexeme +
"\".");
217 int power = expsig * expval - places;
220 for(places = power; places > 0; places--)
223 for(places = - power; places > 0; places--)
242 lexeme +
"\" not terminated at end of line.");
265 lexeme += toupper(ch);
268 while(isalnum(ch) || ch ==
'_' || ch ==
'.') {
269 lexeme += toupper(ch);
virtual bool fillLine()=0
Read next input line.
virtual Token readToken()
Read single token from file.
Representation of a single input token.
Abstract interface for a stream of input tokens.