Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-11 Thread Ludovic Courtès
Hi Alex, Alex Shinn skribis: > This is not a bug. R5RS states: > > The keyword at the beginning of the pattern in a is > not involved in the matching and is not considered a pattern > variable or literal identifier. > > R6RS forbids _ as a literal. R7RS retains the R5RS ignorin

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Alex Shinn
On Thu, Oct 11, 2012 at 5:41 AM, Ludovic Courtès wrote: > Hi, > > Mark H Weaver skribis: > >> Unfortunately, preserving the macro keyword breaks one of Oleg >> Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: > > [...] > >> Oleg's macro uses '_' in the keyword position of the pattern,

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> Unfortunately, preserving the macro keyword breaks one of Oleg >> Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: > > [...] > >> Oleg's macro uses '_' in the keyword position of the pattern, even >> though '_' is in

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Ludovic Courtès
Hi, Mark H Weaver skribis: > Unfortunately, preserving the macro keyword breaks one of Oleg > Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: [...] > Oleg's macro uses '_' in the keyword position of the pattern, even > though '_' is in the literals list. Therefore, it fails to mat

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-10 Thread Mark H Weaver
Unfortunately, preserving the macro keyword breaks one of Oleg Kiselyov's macros, namely 'ppat' in system/base/pmatch.scm: --8<---cut here---start->8--- (define-syntax ppat (syntax-rules (_ quote unquote) ((_ v _ kt kf) kt) ((_ v () kt kf) (if (null? v

Re: [PATCH] Preserve keyword in 'syntax-rules' and 'define-syntax-rule'

2012-10-09 Thread Ludovic Courtès
Hi Mark! Makes sense to me, you can apply it. Thanks, Ludo’.