miniriley2012 / lisp-interpreter Goto Github PK
View Code? Open in Web Editor NEWA LISP Interpreter written in Java
A LISP Interpreter written in Java
As of right now read only takes in doubles and throws an exception if the input is not a double
Currently using RAND without any arguments does nothing.
Program will output what is in PRINT statement
Program outputs up until the closing parentheses
(PRINT (This is an example) 1 2 3)
Will output:
(This is an example
Anything after the closing parentheses will also not be shown
Comments are seen as parameters within parentheses. Outside of parenthesis they work as expected.
(ADD 1# 2)
=> "6#" is not defined
(ADD 1 # 2)
=> "#" is not defined
(ADD 1 2#)
=> "2#" is not defined
(ADD 1 2 #)
=> "#" is not defined
This will allow spaces in the print statement; strings are a general feature in programming languages; will allow for proper input.
use double quotes to denote when a string starts and ends
(PRINT "What is your name: ") # Currently the space after the colon is not possible
Adding logarithms would complete the standard math functions.
Syntax should be (LOG n base)
. If the base is not specified e
should be used by default.
Example:
(LOG 100 10) # log(10)
=> 2
(LOG 100) # log(e)
=> 4.605170
Add constants such as PI and E.
Currently PI and E can be changed using the SET command.
Strings starting with a space are printed with all spaces removed.
(PRINT "Hello " "World. Strings and stuff")
=> Hello World. Strings and stuff
(PRINT "Hello" " World. Strings and stuff")
=> HelloWorld.Stringsandstuff
Notice the space is after "Hello" in the first example and before "World" in the second.
Create functions for round, floor, and ceil
Add trigonometric functions sin, cos, and tan
The program will show an error
The program hangs until JVM runs out of heap space
(ADD 6 3
will cause the program to hang
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.