Java Reading txt custom methods

I was working on a project that can translate a simple language.This language translates simple commands like print(hello) in to System.out.println("hello"); line by line in a .txt file. the template goes like this:

setup()
{
   print(hello);
}    
setup()
end

Does anyone have any suggestions how this could work?

Upvotes: 1

Views: 36

Answers (1)

bb1950328
bb1950328

Reputation: 1599

In general, splitting the problem in parts helps a lot. In your case, there are three main steps:

  1. Read the input from the file
  2. Translate it to java code
  3. Write it to another file

There are so many tutorials and websites about java, so you can use a searching engine and find tutorials which help you.

Upvotes: 1

Related Questions