Link to home
Start Free TrialLog in
Avatar of djchiena
djchiena

asked on

JAVA LISP reader

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.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER CERTIFIED SOLUTION
Avatar of SergeiKo
SergeiKo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of djchiena
djchiena

ASKER

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.