Skip to content

martin-minarik/pjp-compiler-interpreter

Repository files navigation

Compiler-Interpreter

This is PJP course project, focusing on compiler and interpreter development. It's based on the Project's definition.

Basic description

This project utilizes ANTLR for programming language processing. It focuses on parsing specified language, ensuring syntactic correctness and thorough type checking, and generating executable stack-based instructions. The project also includes an interpreter that executes these instructions.


Installation

pip install -r requirements.txt

Dependencies

Usage

compile.py

python main.py code.txt
  • options:
    • -o, --output_file
    • --no_output_file
    • -v, --verbose
    • -i, --interpret
      • automatically runs virtual machine
    • -h, --help

virtual_machine.py

python virtual_machine.py instructions.txt

Chore

  • Recompile antlr4 grammar
    • antlr4 -Dlanguage=Python3 language/Language.g4 -visitor

About

School project for the PJP course.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published