Skip to content
This repository has been archived by the owner on Oct 25, 2020. It is now read-only.

pBouillon/YAL_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

programme YALsample debut
    // declarations
    entier a ;
    entier b ;

    fonction fonc() debut
        b = fonc1() ;
        retourne b ;
    fin

    fonction fonc1 () debut
        retourne 30 ;
    fin

    // core
    a = fonc() ;
    ecrire "You should see 30 below\n" ;
    ecrire a ;
fin

Compilation will be:

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

MIPS

Running MIPS

Run MIPS with MARS

Learning more about MIPS

Documentation available here or summary here

Authors