项目作者: hemantmehra

项目描述 :
A simple lisp interpreter.
高级语言: C
项目地址: git://github.com/hemantmehra/lisp.git
创建时间: 2017-01-02T10:56:28Z
项目社区:https://github.com/hemantmehra/lisp

开源协议:

下载


lisp

A simple lisp interpreter implementation in C.
About lisp: https://en.wikipedia.org/wiki/Lisp_(programming_language)

Syntax

Declaring variables

  1. (define x 10)

Declaring function

  1. (define sqr
  2. (lambda (x)
  3. (* x x)))
  4. (define sos
  5. (lambda (x y)
  6. (+ (sqr x) (sqr y))))

Function calling

  1. (sos 3 4)

Output: - 25

Here
sqr - square

sos - sum of squares

Build

run command: - (needs gcc compilier and make tool)

  1. make

Start interpreter

on mac/linux - .\lisp.o

on windows - ./lisp.o