项目作者: pBouillon

项目描述 :
YAL compiler implementation in Java
高级语言: Java
项目地址: git://github.com/pBouillon/YAL_compiler.git
创建时间: 2018-01-21T12:53:05Z
项目社区:https://github.com/pBouillon/YAL_compiler

开源协议:MIT License

下载


YAL_compiler

School project: YAL compiler (Yet Another Language)

Usage

~$ java -jar Yal.jar source_code.yal will generate a .mips file.

Errors will be displayed with lines and columns in the terminal.

If everything is fine, you should see COMPILATION OK in your console prompt.

Yal sample

  1. programme YALsample debut
  2. // declarations
  3. entier a ;
  4. entier b ;
  5. fonction fonc() debut
  6. b = fonc1() ;
  7. retourne b ;
  8. fin
  9. fonction fonc1 () debut
  10. retourne 30 ;
  11. fin
  12. // core
  13. a = fonc() ;
  14. ecrire "You should see 30 below\n" ;
  15. ecrire a ;
  16. fin

Compilation will be:

  1. ~$ java -jar yal.jar YALsample.yal
  2. COMPILATION_OK

MIPS

Running MIPS

Run MIPS with MARS

Learning more about MIPS

Documentation available here or summary here

Authors