Skip to content

pekashy/mini-java-compiller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini Java Compiler

Project for MIPT Compilers course

Current state

class Factorial {
  public static void main () {
    System.out.println (new Fac ().ComputeFac (10));
  }
}

class Fac {
  public int ComputeFac (int num) {
    assert (num > -1);
    int num_aux;
    if (num == 0)
      num_aux = 1;
    else 
      num_aux = num * this.ComputeFac (num-1);
    return num_aux;
  }
}
  • Added several visitors, interprets programs like the simplified one:
class Factorial {
  public static void main () {
    int num_aux;
    assert(false);
    num_aux = 1;
    if ( 1 == 1)
        num_aux = 2;
    while(1)
        System.out.println(num_aux);
  }
}
  • Implemented Symbol table structure
  • Symbol Table Visitor

About

Mini Java Compiler Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published