Skip to content

SinclairGurny/PSIL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  ***********************************************
  ***_______*****_________****_______****___******
  **|\   _  \***|\   _____\**/\__   _\**|\  \******
  **\ \  \\  \**\ \  \____|**\/_ \  \/**\ \  \******
  ***\ \  \\  \**\ \  \_____****\ \  \***\ \  \******
   ***\ \  ___/***\ \____   \****\ \  \***\ \  \******
    ***\ \ \_/*****\/____|\  \****\ \  \***\ \  \******
     ***\ \ \*********____\\  \****\_\  \_**\ \  \_____*
      ***\ \_\*******/\________\**/\      \**\ \_______\*
       ***\/_/*******\/________/**\/______/***\/_______/*
        *************************************************


PSIL:
Stands for Programming Some Idiotic Lisp.
(It's actually based on Scheme Syntax)

PSIL is a interpreter for my own version of a LISP like language

Current version 1.0
For more information in docs/

written by Sinclair Gurny
July 2019

=====================================================================

Compiling:
make - for normal
make debug - for debugger friendly compilation
make clean - delete unnecessary files

Running:
./psil or ./psil_debug
  Runs PSIL in REPL mode
  Executes any code or command given.
./psil <code.psil> or ./psil_debug <code.psil>
  Runs PSIL in file mode,
  PSIL executes the code in the given .psil file, then exits.

REPL Commands:
quit - exits
exit - also exits
help - displays commands
psil - displays syntax of current version of PSIL

=====================================================================

Examples:
See examples/ for more.
For explanations of the examples see docs/EXAMPLES.

Hello World Program:
>> (print #\H #\e #\l #\l #\o #\, #\space #\W #\o #\r #\l #\d #\!)

Hello, World!

>> (begin
     (define fact (lambda (n)
                    (if (equal? n 1)
		        1
			(* n (fact (- n 1))))))
     (fact 10))

3628800