[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with trailing comment in repl
From: |
Andy Wingo |
Subject: |
Re: problem with trailing comment in repl |
Date: |
Sat, 12 Feb 2011 15:36:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
On Sat 12 Feb 2011 14:21, "Jose A. Ortega Ruiz" <address@hidden> writes:
> I'm not sure i understand this reasoning, because when there are two (or
> more) complete sexps in a line they're accepted, and a new prompt
> appears;
Of course.
1. Guile: No input available, print prompt:
guile>
2. User: one line of input:
(exp-1) (exp-2)
3. Guile: read one sexp
4. Guile: flush whitespace; input state is:
(exp-2)
5. Guile: Input is ready, so don't print prompt, just read
6. Guile: Flush whitespace, no input available, so print prompt:
guile
> i was expecting a comment to be equivalent to whitespace.
We could add some hacks in that regard, but it wouldn't work for
ecmascript... If there is input, Guile calls `read', not some
hypothetical `read-syntax' that could return a comment, and `read'
doesn't return until it has read an entire expression.
> However, i think there's a problem with metacommands at the
> "non-prompt":
>
> scheme@(guile-user)> ;; foo
> ,error
> While compiling expression:
> Syntax error:
Meta-commands have to be the first thing on the prompt. It's a special
case to look for the comma character; once we've seen non-whitespace --
";" in this case -- we're in the scheme reader, not the repl reader.
Regards,
Andy
--
http://wingolog.org/
- problem with trailing comment in repl, Jose A. Ortega Ruiz, 2011/02/11
- Re: problem with trailing comment in repl, Andy Wingo, 2011/02/12
- Re: problem with trailing comment in repl, Jose A. Ortega Ruiz, 2011/02/12
- Re: problem with trailing comment in repl,
Andy Wingo <=
- Re: problem with trailing comment in repl, Noah Lavine, 2011/02/13
- Re: problem with trailing comment in repl, Andy Wingo, 2011/02/13
- Re: problem with trailing comment in repl, Noah Lavine, 2011/02/13
- Re: problem with trailing comment in repl, Ludovic Courtès, 2011/02/14
- Re: problem with trailing comment in repl, Noah Lavine, 2011/02/14