Coders Packet

Lisp programming language in C++

By Pramita Kastha

This project aims to implement a lisp-based programming language in C++ which we chose to call Lispy.

Lisp, which originates from the word 'List Processing', is a family of functional programming languages. We start from a simple REPL(read-execute-print-loop), subsequently formulating coding grammar, regular expressions, evaluation using Polish notation. Then, we work on error handling, and write helper functions to handle different kinds of syntaxes like comments, functions, conditionals,  The project folder contains four files: the cpp source file, a custom defined header file, an executable file and a standard library containing some basic functions written in the lispy programming language. Please note that this program requires certain OS specific header files and can hence compile only in Linux environment.

Compilation of the program can be done using g++. To start the interpreter, simply run ./lispy on the command line(terminal). Alternatively, you can also write a program following the lisp syntax rules, save it with a .lspy extension and run it using the command ./lispy filename.lspy.

 

Download project

Reviews Report

Submitted by Pramita Kastha (prami1806)

Download packets of source code on Coders Packet