From philipp at marek.priv.at Fri Sep 28 06:06:16 2012 From: philipp at marek.priv.at (Philipp Marek) Date: Fri, 28 Sep 2012 08:06:16 +0200 Subject: [cl-interpol-devel] Patch for line-comments Message-ID: <67883acbabf3d26c8a6df9e87ba240c7.squirrel@webmail.hitco.org> After a short discussion on #lisp the current behaviour was seen as a bug; a line-comment should _only_ be terminated by a newline, and not by a terminating character as well. Eg. for #?rx( ... # (a test) hello) the current version would return an error about "hello" being an unknown variable. Regards, Phil $ diff -u read.lisp.orig read.lisp --- read.lisp.orig 2012-09-28 07:56:57.201746774 +0200 +++ read.lisp 2012-09-28 07:57:32.989790049 +0200 @@ -462,8 +462,7 @@ ;; or *TERM-CHAR* (read-while (lambda (char) - (and (char/= char #\Newline) - (char/= char *term-char*)))) + (char/= char #\Newline))) (when (char= (peek-char*) #\Newline) (read-char*)) (cond ((not (digit-char-p (peek-char*) From edi at agharta.de Sat Sep 29 08:24:16 2012 From: edi at agharta.de (Edi Weitz) Date: Sat, 29 Sep 2012 10:24:16 +0200 Subject: [cl-interpol-devel] Patch for line-comments In-Reply-To: <67883acbabf3d26c8a6df9e87ba240c7.squirrel@webmail.hitco.org> References: <67883acbabf3d26c8a6df9e87ba240c7.squirrel@webmail.hitco.org> Message-ID: Hi, But what about #?x/[a-z]#blabla/ with your patch applied? I'd expect CL-INTERPOL to interpret the second slash as the end of the regular expression. Cheers, Edi. On Fri, Sep 28, 2012 at 8:06 AM, Philipp Marek wrote: > After a short discussion on #lisp the current behaviour was seen as a bug; a > line-comment should _only_ be terminated by a newline, and not by a terminating > character as well. > > Eg. for > > #?rx( ... > # (a test) > hello) > > the current version would return an error about "hello" being an unknown variable. > > > Regards, > > Phil > > > $ diff -u read.lisp.orig read.lisp > --- read.lisp.orig 2012-09-28 07:56:57.201746774 +0200 > +++ read.lisp 2012-09-28 07:57:32.989790049 +0200 > @@ -462,8 +462,7 @@ > ;; or *TERM-CHAR* > (read-while > (lambda (char) > - (and (char/= char #\Newline) > - (char/= char *term-char*)))) > + (char/= char #\Newline))) > (when (char= (peek-char*) #\Newline) > (read-char*)) > (cond ((not (digit-char-p (peek-char*) > > > > > > _______________________________________________ > cl-interpol-devel site list > cl-interpol-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-interpol-devel >