Solved

JAVA LISP reader

Posted on 2004-09-25
4
261 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
Comment Utility
0
 
LVL 2

Accepted Solution

by:
SergeiKo earned 250 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

772 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

11 Experts available now in Live!

Get 1:1 Help Now