Skip to content

vladiibine/whispy_lispy

Repository files navigation

whispy_lispy

Documentation Status Travis-CI Build Status AppVeyor Build Status Coverage Status Code Quality Status Scrutinizer Status
PyPI Package latest release PyPI Package monthly downloads PyPI Wheel Supported versions Supported imlementations

Toy LISP implementation - because everyone does it!

  • Free software: MIT license

Disclaimer

This document will get deprecated fast. I'm working on features, and that most likely means I'll forget to update the docs.

Features

  • Can evaluate strings from the command line:

    python -m whispy_lispy '(print 3)'
    
  • Can run an interactive REPL interpreter:

    python -m whispy_lispy -r
    
  • The interpreter knows these builtin functions:

def, quote, sum, sub, quit

  • The interpreter evaluates literals and function calls, and displays the result

Functions

  • def defines a value in the current (global) scope:

    (WL)$ (def x 9)
    
  • quote should be the lisp quote, but it's buggy atm.

  • sum sums its arguments:

    (WL)$ (sum 1 2 3 4 5)
    
  • sub subtracts from the first argument, all of the rest:

    (WL)$ (sub 5 1 2)
    
  • quit quits the interpreter (optionally, provide an int as an exit code):

    (WL)$ (quit)
    (WL)$ (quit 127)
    

Development

To run the all tests run:

tox

Future reading

Lisp interpreter (diddn't read it, but heard it's cool) http://norvig.com/lispy.html

About

Toy LISP implementation in Python - because everyone does it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published