Skip to content

Repository files navigation

microj build badge

Compiler for a Java-like language. Made for the Compiler Construction course, at the Faculty of Sciences, Novi Sad.

Example of micro java:

programPfinalintsize = 10;
classTable {
int[] pos;
int[] neg;
}
Tableval;
{
voidmain()
intx, i;
{ //---------- Initialize valval = newTable;
val.pos = newint[size]; val.neg = newint[size];
i = 0;
while (i < size) {
val.pos[i] = 0; val.neg[i] = 0;
i++;
}
//---------- Read valuesread(x);
while (x != 0) {
if (0 <= x && x < size) {
val.pos[x]++;
} elseif (-size < x && x < 0) {
val.neg[-x]++;
}
read(x);
}
}
}

About

Compiler for a Java-like language. Made for the Compiler Construction course, at the Faculty of Sciences, Novi Sad.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages