bossiernesto / uLisp

Little interpreter for Scheme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#uLisp

Build Status

A small Scheme Interpreter done in Python

##Objectives

Create a Scheme language from Python, by first creating an interpreter based on a Python implementation.

Working examples

We can interpret simple expresions like the one below:

  evaluator = SyntacticEvaluator()
  global_env = add_globals(Environment())
  parser = uLispParser()

  parser.parse(('(begin '
                '(car (list 3 2))'
                ')'))
  evaluator.evaluate(parsed) #returns 3

Another simple example

  evaluator.evaluate(parser.parse("(equal 5 3)"))

What's missing

  • A File parser that takes a file with .scm, that will parse and interpret the results
  • A console that will support functions similar to REPL
  • Add more primitives and support for global, local functions
  • Bootstrap part of the langauage to Scheme

About

Little interpreter for Scheme

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%