gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
docs - mj-compiler.txt is a more logical name
[mjc2wsl.git] / lib / mj-compiler.txt
diff --git a/lib/mj-compiler.txt b/lib/mj-compiler.txt
new file mode 100644 (file)
index 0000000..99b136d
--- /dev/null
@@ -0,0 +1,67 @@
+MicroJava Compiler
+==================
+
+About MicroJava
+---------------
+
+MicroJava is a simple language made by H. Mössenböck for a Compiler Construction
+course.  It is not the same as Java Micro Edition (JavaME) used on mobile
+phones.
+
+More about the course, the language and its VM:
+http://www.ssw.uni-linz.ac.at/Misc/CC/
+
+The site for the Serbian version of the course:
+http://perun.pmf.uns.ac.rs/kurbalija/Teaching/kk.htm
+
+
+About the compiler and runner
+-----------------------------
+
+A jar file "mj.jar" for a functional MJ compiler is given in
+the lib folder. The implementation used is heavily based on
+the source templates that are used in the Compiler
+Construction classes and finished by students during the
+course.
+
+The original source templates were written by Moessenboeck
+and are available on the sites given above, though there are
+posible updates. The version given has the compiler finished
+by a student, and a few additional changes (such as the
+optional decoding while writeing to file).
+
+
+Usage of the compiler
+---------------------
+
+Calls to the compiler can be made with:
+
+java MJ.Compiler <input.mj> [-print]
+
+"-print" is to output the bytecode generated to the screen
+
+
+Calling the interpreter is done with:
+
+java MJ.Run [-d] <input.obj>
+
+"-d" is to decode the input file before running it.
+
+
+There is also a Decoder available:
+
+java MJ.Decode <input.obj>
+
+
+You might want to include the "mj.jar" into your CLASSPATH,
+or just use "-cp mj.jar" in the command line.
+
+
+Ant
+----
+
+An ant build script can be found in the root folder of the
+project and it includes tasks for building using the
+compiler and runner. It also includes tasks for building a
+compiler from and into the appropriate directories which
+are then overrideing the jar file.
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner