aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Context free grammar by arithmetic expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Context free grammar by arithmetic expression" Watch "Context free grammar by arithmetic expression" New topic
Author

Context free grammar by arithmetic expression

smith Matthew
Greenhorn

Joined: May 02, 2012
Posts: 1
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.

any help would be greatly appreciated
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Smith, welcome to Java Ranch!

1) Which IDE are you using?

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


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context free grammar by arithmetic expression