my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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

Context free grammar by arithmetic expression

smith Matthew

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

Joined: May 14, 2008
Posts: 5812

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 (this is merely a guess).

Based on the code you posted, you should have placed this source code in a file name 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: and

JBoss In Action
It is sorta covered in the JavaRanch Style Guide.
subject: Context free grammar by arithmetic expression
Similar Threads
How to clear a JTextField!!
J2ME HttpConnection problem ...
How to query a thirt-party datatabase table with Hibernate CriteriaBuilder/JPA?
Linked List help
org.springframework.dao.EmptyResultDataAccessException: No entity found for query