Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 2.03 KB

README.md

File metadata and controls

46 lines (30 loc) · 2.03 KB

CE40364 Project

An interpreter written in Racket for a given programming language. This code is developed for CE40364 (Design of Programming Languages) Course Project.

Getting Started

  • Download and install DrRacket based on your platform.(here)

  • Open terminal and insert following command

    <git clone https://github.com/alirezadaghigh99/PL-Project.git>

  • Run interpreter.rkt

Source Code

Source code is consisted of four parts. Functionality of each part will be explained in this part.

parser-lexer.rkt

As its name shows, this module does lexical analysis process and then creates parser according to given grammar.

environment.rkt

This module defines environment functions to store variables and their values.

operations.rkt

This module is used for handling defined operations, such as addition, multiplication, comparison, list operations, etc. Error handling is done in this module too.

interpreter.rkt

This module is main module and combines all other parts to compute value of given program by interpreting input language to Racket.

Outputs

In this section you can see two codes in given language and their corresponding output in racket.

alt text

alt text

alt text

alt text

Author

Contributors

This project is available thanks to all contributors.