Question: 1. Convert the lexical analyzer (which is written in C) given in Section 4.2 of the book to Java, and it to recognize the following

1. Convert the lexical analyzer (which is written in C) given in Section 4.2 of the book to Java, and it to recognize the following list of reserved words and return their respective token codes: for (FOR CODE, 30), if (IF_CODE, 31), else (ELSE_CODE, 32), while (WHILE_CODE, 33), do (DO CODE, 34), int (INT CODE, 35), float (FLOAT_CODE, 36), switch (SWITCH CODE, 37) 1. Convert the lexical analyzer (which is written in C) given in Section 4.2 of the book to Java, and it to recognize the following list of reserved words and return their respective token codes: for (FOR CODE, 30), if (IF_CODE, 31), else (ELSE_CODE, 32), while (WHILE_CODE, 33), do (DO CODE, 34), int (INT CODE, 35), float (FLOAT_CODE, 36), switch (SWITCH CODE, 37)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
