Question: 10. (15 points) Convert the lexical analyzer given in Section 4.2 to Java and modify it to recognize the following list of reserved words and
10. (15 points) Convert the lexical analyzer given in Section 4.2 to Java and modify it to recognize the following list of reserved words and return their respective token codes:
for, 30;
if, 31;
else, 32;
while, 33;
do, 34;
int, 35;
float, 36;
switch, 37
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
