Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
src
 
 
 
 
 
 
 
 
 
 

README.md

Lispy

Project from the website Build your own Lisp.

What is Lispy ?

Lispy is a small Lisp-like programming language written in C, using mpc library to parse the input easily.

What are Lispy's features ?

Lispy supports all the basic features that you would expect from a programming language, like :

  • Variables
  • Functions
  • Conditionals
  • Error handling
  • Standard library
  • etc.

But, there is more to it :

  • S-Expression : symbolic-expression is a list of one or more expressions (number, string, symbol, etc.).
  • Q-Expression : quoted-expression is a list of one or more expressions that are not evaluated during process but instead left exactly as they were typed in.

Examples of programs written in Lispy

Hello World! :

("Hello World!")

Fibonacci function :

(fun {fib n} {
  select
    { (== n 0) 0 }
    { (== n 1) 1 }
    { otherwise (+ (fib (- n 1)) (fib (- n 2))) }
})

Factorial function :

(fun {fac n} {
   select
      { (== n 0) 1 }
      { otherwise (* (n) (fac(- n 1)))}
})

About

Minimal Lisp-like programming language written in C

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.