Giter Club home page Giter Club logo

lisp-interpreter's People

Contributors

miniriley2012 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

itsmikeq

lisp-interpreter's Issues

Closing parentheses not shown in PRINT statement

What is expected:

Program will output what is in PRINT statement

Result:

Program outputs up until the closing parentheses

Example:

(PRINT (This is an example) 1 2 3)
Will output:
(This is an example

Additional Information

Anything after the closing parentheses will also not be shown

Comments are seen as parameters

Comments are seen as parameters within parentheses. Outside of parenthesis they work as expected.

Examples

(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

Create string type

Reason

This will allow spaces in the print statement; strings are a general feature in programming languages; will allow for proper input.

Sugested Implementation

use double quotes to denote when a string starts and ends

Example

(PRINT "What is your name: ") # Currently the space after the colon is not possible

Add Logarithms

Adding logarithms would complete the standard math functions.

Suggested Implementation

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

Strings starting with a space are not printed correctly

Problem

Strings starting with a space are printed with all spaces removed.

Example

(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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.