| Author |
Message |
terri
Guest
|
Posted:
Tue Sep 27, 2005 4:10 pm Post subject:
lisp programming |
|
|
Hello! I am trying to learn lisp programming. My goal is to open a
file and parse the line for comments. The comments syntax is
/*comments*/. I can open a file with the command
with-open-file, but I don't know how to parse a line. Would anyone be
able to help me with some code to do this? Thanks!
|
|
| Back to top |
|
 |
CarlB
Joined: 27 Sep 2005
Posts: 52
|
Posted:
Tue Sep 27, 2005 10:49 pm Post subject:
re:lisp programming |
|
|
| If the line begins and ends with "\*", you can get the string in between with (vl-string-trim "\*" Stringname) If there can be random characters before the "\*", you'll have to step through each character with "substr", find the positions of the "*", then again use "substr" from 1st to 2nd position to get the "between" string. |
|
| Back to top |
|
 |
Ben Gun
Guest
|
Posted:
Wed Sep 28, 2005 4:10 pm Post subject:
Re: lisp programming |
|
|
I have to admit I don't understand the structure of your file.
On 27 Sep 2005 05:27:26 -0700, "terri" <twrazel@uark.edu> wrote:
| Quote: | Hello! I am trying to learn lisp programming. My goal is to open a
file and parse the line for comments. The comments syntax is
/*comments*/. I can open a file with the command
with-open-file, but I don't know how to parse a line. Would anyone be
able to help me with some code to do this? Thanks! |
|
|
| Back to top |
|
 |
|
|
|
|