Skip to content

Main point of the project is to create a java translator from a "handmade" language.

License

Notifications You must be signed in to change notification settings

tdf4j/tdf4j-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Translator

Main point of the project is to create a java translator from a "handmade" language.

What is translator?

A translator or programming language processor is a computer program that performs the translation of a program written in a given programming language into a functionally equivalent program in another computer language (the target language), without losing the functional or logical structure of the original code (the "essence" of each program).
Wiki page

How to use it?

  • Add a dependency to your project
    • Maven

      <dependency>
          <groupId>io.github.therealmone</groupId>
          <artifactId>JavaTranslator</artifactId>
          <version>1.1.0</version>
      </dependency>
    • Gradle

      compile 'io.github.therealmone:JavaTranslator:1.1.0'
    • Apache Ivy

      <dependency org="io.github.therealmone" name="JavaTranslator" rev="1.1.0" />
  • Now you can create Translator object and invoke translate() method
    Translator translator = Translator.getInstance();
    translator.translate("new a = 100; print(a);");
  • You can load program from InputStream
    translator.translate(Translator.loadProgram(new FileInputStream("example.txt")));
  • You can set your own OutputStream
    Translator.setOutputStream(new FileOutputStream(new File("out.txt")));

About

Main point of the project is to create a java translator from a "handmade" language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages