Giter Site home page Giter Site logo

1101-compiler-final-minilisp-interpreter's Introduction

MiniLisp Interpreter

1101 Compiler Final Project

我徒手幹出了一個 C# 的 Mini-Lisp 直譯器。
A hand-craft Mini-Lisp (subset of LISP) interpreter written in C#

Usage

  • Simply open the program, paste your lisp code and press Ctrl + Z,
  • or you can pass in the path to the lisp code file inro the program (e.g. "./output.exe testcase/test_data/03_1.lsp")

Available Args

  • --debug : Debug Mode
  • --help : Print help and quit
  • --once : Run once only
  • --quiet : Quiet Mode
  • (file path) : Read Mini-Lisp code from file

Tasks

Basic Features

  • 1. Syntax Validation Print “syntax error” when parsing invalid syntax (10%)
  • 2. Print Implement print-num statement (10%)
  • 3. Numerical Operations Implement all numerical operations (25%)
  • 4. Logical Operations Implement all logical operations (25%)
  • 5. if Expression Implement if expression (8%)
  • 6. Variable Definition Able to define a variable (8%)
  • 7. Function Able to declare and call an anonymous function (8%)
  • 8. Named Function Able to declare and call a named function (6%)

Bonus Features

  • 1. Recursion Support recursive function call (+5%)
  • 2. Type Checking Print error messages for type errors (+5%)
  • 3. Nested Function Nested function (static scope) (+5%)
  • 4. First-class Function Able to pass functions, support closure (+5%)
Note

Currently all number is treated as double, so the test cases might give a different output than the answer.

Screenshots

  • Read from file

  • Open debug

  • Quiet & Once

  • Error Message

1101-compiler-final-minilisp-interpreter's People

Contributors

jcxyis avatar

Stargazers

 avatar  avatar  avatar  avatar  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.