Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Implementation of Alpha's compiler in 5 stages. Lexicographic analysis, grammar and syntax construction, intermediate code and quad generation, final code generation, construction of Alpha's virtual machine

Notifications You must be signed in to change notification settings

malvag/Alpha-Language-Compiler-and-VM

Repository files navigation

Alpha-Language-Compiler-and-VM

Build

Implementation of Alpha's compiler in 5 stages.

  • Lexicographic analysis (yylex)
  • Grammar and syntax construction (yacc - bison)
  • Intermediate code and quad generation (library in c)
  • Final code generation
  • Construction of Alpha's virtual machine (AVM)

Usage:

        $ make {(empty)|out|avm_exec|clean}:
                - (empty)      : clean up, then build out and avm_exec
                - out          : alpha language compiler compilation recipe
                - avm_exec     : alpha language virtual machine executable compilation recipe
                - clean        : clean every executable and object

Compiles and returns a binary file at given location with .abc extension.

        $ ./out {file_path}

Runs the given file

        $ ./avm_exec {file_path}

About

Implementation of Alpha's compiler in 5 stages. Lexicographic analysis, grammar and syntax construction, intermediate code and quad generation, final code generation, construction of Alpha's virtual machine

Topics

Resources

Stars

Watchers

Forks