GithubHelp home page GithubHelp logo

lisplike-interpeter's Introduction

LispLike-Interpeter

An interpreter for a lisp-like language made for an university exam. The specification can be found in the "Spec" PDF file. This intepreter take as input from the command line a name of a file with ".txt" extension and does a lexical and semantic analysis on it, if it follow the grammar rules of the specification it does also an evaluation and put the output on the terminal.

Requirements:

  • A linux system
  • g++ compiler

How to get started

First you have to create the executable, to do so you have to download the code, extract the zip file, enter in the "Source" folder in the terminal and execute the following command:

$ g++ -std=c++17 -o LispLikeInterpreter *.cpp

Testing and Running

There are some script for testing the intepreter in the "TestFiles" folder. To use them to test you have to be inside the folder where the executable is and execute the following command:

$ ./LispLikeInterpreter [path_to_TestFIles_folder]/TestFiles/[name_of_the_test].txt

If you want to test it with other scripts, you just need to create a test script with ".txt" extension and from the same folder as before you have to execute the command:

$ ./LispLikeInterpreter [path_to_test_script]/[name_of_the_test_script].txt

You can also try different mode by changing the value of DEBUG and VERBOSE in the lispintepreter.cpp file:

  • VERBOSE set to 1: imply a more verbose program with more output on the console than the only output from the evaluation of the program
  • DEBUG set to 1: imply same thing as VERBOSE set to 1 but it will also display the tokens made during the tokenizing phase and printing the syntax tree made during the parsing phase.

lisplike-interpeter's People

Contributors

fedeg202 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.