theclapp

Search theclapp.blog-city.com

 

The Listener shell reader

posted Monday, 23-Apr-2007
So it turns out that using #\\ (backslash) as the macro reader for the "this is a shell command" syntax is a bad idea. It makes it difficult to enter strings with embedded quotes later on. "This \"is a\" test" turns into something totally wonky, i.e. something more like "This " (run "is a\" test"). Anyway, it's weird. Not sure what a better choice would be just yet. I've had a couple thoughts:
  1. Modify the Listener reader so that all input lines are assumed to be shell input unless they start with #\( or #\:
  2. give up on the idea of entering shell commands in a Lisp Listener as easily as I do at a shell prompt
  3. do like the clisp shell page does and a) use #[...] and b) program a keyboard macro to generate the "#[ ]" sequence.
  4. Abandon the Listener reader and write a custom reader. Of course I'm not sure how to do this in Lispworks. :)
For now I'll probably go with the clisp shell approach.

tags:  

links: digg this    del.icio.us    technorati    reddit