Solved

JAVA LISP reader

Posted on 2004-09-25
4
272 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

910 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now