Hey guys, first post on the forum, I have developed an arithmetic expression for a CFG for my computer science class, but i am getting the error "Editor does not contain main type". as helpful as that is, im not comprehending how to solve the problem.
2) What is the name of the file that contains this source code?
Based on the error message, I assume you create a file name Editor.java (this is merely a guess).
Based on the code you posted, you should have placed this source code in a file name termProject.java. Why? Because you have a class name termProject and that class contains the main() method, and the file name should always correspond to the class name.
You also have two other classes in that file, which is OK for small projects like this, but since the termProjetc havs the main() method, that's the name you should use for the file. You could have also placed those two classes into their own files: Token.java and TokenType.java