[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is "]" == "\]"?

Hello Peter!

>  > > Have you tried "\\]" and/or "\\\]"?
>  > >
>  > That is not the point. My input data looks like that "[..... some text
>  > \[ some more text \] even more text]", and I want to locate with
>  > search the [ and ], but my clisp or any other lisp I tried stops at
>  > the \]. 
> What else did you expect? 

Well, I expected, if I read from a string-char-stream with
read-char-sequence that I get a sequence of the characters from the
input stream. And I expected the characters are the same as in the

> If you want to skip the '\]'s, you have to 
> implement this (in LISP or in any other language). Your problem is 
> absolutely not related to LISPs *reading* syntax. 
> If your input file contains a line like this:
> [ foo \[ bar \] baz ] 
> (read-line your-file-stream) will produce this:
> "[foo \\[ bar \\] baz ]"
Nope! If I make a string-char-input-stream with the string above or a
file containing the string, I dont't get what you said, but you get 
"[foo [ bar ] baz ]".

> And don't forget: EVERYTHING you can do in perl or any other language
> you can do much better in (C)LISP! :)

But slower.

Bye Oliver