عکس rsharifnasab
compiler project for compiler course (spring 99) in sbu universityJava
موضوع‌ها
۰
فورک‌ها
۱
ستاره‌ها
۱۰
تاریخ ایجاد
۲۷ فروردین ۱۳۹۹
آخرین بروزرسانی
حدود ۱ ماه قبل
لایسنس
GNU General Public License v3.0

SBU compiler project

in spring 99 semester, we designed a compiler for compiler design course by Dr Jaberi pour in Shahid Beheshti university

language name is Roulang (Rouzbeh + language!)

rules & limitations

team members


how to use

  • install maven, Java 13+

  • open terminal in this folder and run:

    mvn clean package 
    
  • then you have a complete jar file (target/RoulangCompiler-1.0-jar-with-dependencies.jar)

  • to use compiler:

    java -jar ./target/*s.jar path/to/in.rou /path/to/out.class
    

    this will create an executable class file out.class from input file in.rou

  • to run the class file:

    java out
    

    and for viewing whats in it:

    javap -p out.class
    javap -v out.class #verbose
    

notes

  • in first try to run maven, it will download dependencies, don't worry.

  • if there was problem in tests, you can skip tests (not recommended)

mvn clean package -Dmaven.test.skip=true

and then use the jar file

  • parser graph in PGS format is in parser folder, after editing that, create npt file in same directory named table.npt, it will copied to folders with ./updateTable.sh.

  • this project is not well debugged, don't use it in production :D


additions

  • you can syntax highlight the language with vim, when you opened file, run: :source syntax.vim

  • you can import other rou files as well


special thanks to

  • Profossor JaberiPour
  • Roozbeh paktinat
  • Alireza Asadi
  • Amin Borjian