Question: So this is the code case for REAL: case REAL: if ( isdigit ( ch ) ) { lexeme + = ch; } else if

So this is the code case for REAL: case REAL:
if (isdigit(ch))
{
lexeme += ch;
}
else if (ch =='.')
{
lexeme += ch;
return LexItem(ERR, lexeme, linenum);
}
else
{
lexstate = START;
in.putback(ch);
return LexItem(RCONST, lexeme, linenum); And the content of a file I"m reading is this: 23.5 "Please type the coordinates of three points"
15.25125
4321.725 'The center of the circle through these points is'
625. Now for some reason it's not reading the "Please type the coordinates of three points" and 125 after the reading the real tokens. How do i adjust the code so it can return those two tokens to INSTRING and ININT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!