Skip to content

S3Blevins/lisp_interpreter

Repository files navigation

README

This a lisp interpreter. The purpose of the interpreter is to process some basic lisp commands and learn about some of the basic concepts behind creating an interpreter. It is built in Java.

Instructions: - To compile, simply enter 'make' into the command line. - To run, use the command 'java Interface'

    - To exit the interpreter, enter 'quit' into the cmd line
    - To change the scoping mechanism from static (default) to Dynamic (broken),
    enter 'dynamic' into the command line
    - If in a dynamic mode, and needing to change back to a static mode,
    enter 'static' into the command line

Details: Every sample that was provided by the TAs runs and displays properly and is written to an autogenerated file. Please make sure that the input is exactly the same as the samples. Although there is a little flexibility for errors in spaces, error checking is not very advanced.

    I have attempted to implemented the extra credit, and it seems to work,
    by sharing the function and normal AR variable hash-maps.


    Special Keywords:
            'quote'         - will quote the math equation input
            'if'            - will evaluate and execute based on a condition
            'define'        - will define a variable
            'set!'          - will assign a value to a previously defined variable
            'defun'         - will define a function (lambda as listed in assignment)

    Built-in Procedures:
            'exp'           - exponential figure    -> exp(value, exponent)
            'cos'           - radians cosine        -> cos(value)
            'sin'           - radians sine          -> sin(value)
            'tan'           - radians tangent       -> tan(value)
            'sqrt'          - square root           -> sqrt(value)

About

A lisp interpreter made (in Java) to work for specific cases in principles of programming course (CSE324) at NMT.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors