?
Solved

JAVA LISP reader

Posted on 2004-09-25
4
Medium Priority
?
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Accepted Solution

by:
SergeiKo earned 750 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

771 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