Take all the methods from this program and put it into single program and compile, and then test the program with some expressions.
Should have two files: Lex.java and a output.txt file
package lexicalanalyser;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
enum CharacterClass{
LETTER(0), DIGIT(1), UNKNOWN(99), EOF(-1);
private int value;
private CharacterClass(int value){
this.value = value;
}
public int getValue(){
return value;
}
}
enum TokenCodes{
INT_LIT(10), IDENT(11), ASSIGN_OP(20), ADD_OP(21),
SUB_OP(22),...