Giter Site home page Giter Site logo

lispy-1's Introduction

LisPy README

Author: Kemal Eren ([email protected])

ABOUT

LisPy is an implementation of a subset of the features of LISP 1.5, as outlined in John McCarthy's LISP 1.5 Programmer's Manual.

The following primitives are defined:

  • T
  • NIL
  • CAR
  • CDR
  • CONS
  • ATOM
  • EQ
  • NULL
  • INT
  • PLUS
  • MINUS
  • TIMES
  • QUOTIENT
  • REMAINDER
  • LESS
  • GREATER
  • COND
  • QUOTE
  • DEFUN
  • HELP
  • QUIT

and various math symbols: + - % * / = < >

LisPy supports both interactive and batch modes.

REQUIREMENTS

  • Python (tested with 2.6 and 2.7)

USAGE

NB: LisPy is case-insensitive, and allows both dot and list notation (though they may not be mixed).

See demo.lsp for some simple examples.

Interactive mode:

In interactive mode, individual LISP commands may be entered into the REPL (read-eval-print loop).

Simply run ./interpreter.py to start an interactive toplevel. LISP commands may be entered over multiple lines; a command will not be evaluated until the parentheses match.

Pressing "Control+c" abandons the current expression and starts a new line. Calling (help) gives some minimal help.

When finished, type (quit) or press "Control+d" to exit.

Batch mode

Run ./interpreter.py <input file>. All expressions in the file will be read, evaluated, and printed in order to standard output.

lispy-1's People

Contributors

kemaleren avatar

Watchers

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