Solved

JAVA LISP reader

Posted on 2004-09-25
4
281 Views
Last Modified: 2008-03-10
Hi,

I was wondering if there is any source code out there for a LISP reader/scanner that just reads a LISP command but doesn't evaluate it or anything; I just want it to store in an array or something.  This is not for homework or a project...just preparing for an exam and I would like to know how the program would work.  Thanks in advance.
0
Comment
Question by:djchiena
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12151016
0
 
LVL 2

Accepted Solution

by:
SergeiKo earned 250 total points
ID: 12151025
Hello, djchiena.

I do not know exectly what is the purpose of LISP reader you want.

But if you are looking for source code of some script language interpreter written in Java, how it is designed and so on, I would recommend you
1. search in google
2. look at source code at http://www.jython.org/ - it allows to run Python over Java (may be useful if you want to embedde some script language into your program, in this case it is Python)
3. read some materials on building translators.

The last thin I haven't tried, but have link is http://www.cobase.cs.ucla.edu/pub/javacc/


Regards.
0
 

Author Comment

by:djchiena
ID: 12151113
I dont want an interpreter or anything...i have a review question that asks for this:

Write a program that will read-in lisp expressions generated by the
following  grammar  and store them in
a character array. Make sure you take care of the following details:

1) Skip all the characters until end of line (comments) when a
   ; (semi coloan) is encounterd.
2) If a end of line character is encountered issue a different
   prompt if the paranthesis are not balanced.
3) Make sure you remember the length of the input.

4) Add a special character to end of the input in the character array.

I just want to see a program that closely resembles this...i dont need to it to be exact.
 
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
starter POM and spring-boot-starter,  spring-boot-web 2 54
servlet doXXX methods 3 48
print map entry 34 67
fibonacci ten numbers 4 38
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question