gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
wsl metrics script, nicer print of header
[mjc2wsl.git] / lib / mj-compiler.txt
1 MicroJava Compiler
2 ==================
4 About MicroJava
5 ---------------
7 MicroJava is a simple language made by H. Mössenböck for a Compiler Construction
8 course. It is not the same as Java Micro Edition (JavaME) used on mobile
9 phones.
11 More about the course, the language and its VM:
12 http://www.ssw.uni-linz.ac.at/Misc/CC/
14 The site for the Serbian version of the course:
15 http://perun.pmf.uns.ac.rs/kurbalija/Teaching/kk.htm
18 About the compiler and runner
19 -----------------------------
21 A jar file "mj.jar" for a functional MJ compiler is given in
22 the lib folder. The implementation used is heavily based on
23 the source templates that are used in the Compiler
24 Construction classes and finished by students during the
25 course.
27 The original source templates were written by Moessenboeck
28 and are available on the sites given above, though there are
29 posible updates. The version given has the compiler finished
30 by a student, and a few additional changes (such as the
31 optional decoding while writeing to file).
34 Usage of the compiler
35 ---------------------
37 Calls to the compiler can be made with:
39 java MJ.Compiler <input.mj> [-print]
41 "-print" is to output the bytecode generated to the screen
44 Calling the interpreter is done with:
46 java MJ.Run [-d] <input.obj>
48 "-d" is to decode the input file before running it.
51 There is also a Decoder available:
53 java MJ.Decode <input.obj>
56 You might want to include the "mj.jar" into your CLASSPATH,
57 or just use "-cp mj.jar" in the command line.
60 Ant
61 ----
63 An ant build script can be found in the root folder of the
64 project and it includes tasks for building using the
65 compiler and runner. It also includes tasks for building a
66 compiler from and into the appropriate directories which
67 are then overrideing the jar file.
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner