Question: Write java program and read text from file. The program then recognize this Keywords (keyword): begin, end, if, then, else, int, float, char, string Identifiers
Write java program and read text from file. The program then recognize this Keywords (keyword): begin, end, if, then, else, int, float, char, string Identifiers (id): letter followed by zero or more letters or digits. Whenever any of the above tokens are matched, your program should also print the respective token name keyword or id and for keywords, some attribute value (any numeric value) after printing the lexeme.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
