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

This page is part of the web mail archives of SRFI 110 from before July 7th, 2015. The new archives for SRFI 110 contain all messages, not just those from before July 7th, 2015.

*To*: dwheeler@xxxxxxxxxxxx*Subject*: Re: The ". $" notation*From*: Alan Manuel Gloria <almkglor@xxxxxxxxx>*Date*: Tue, 19 Mar 2013 08:17:30 +0800*Cc*: srfi-110 <srfi-110@xxxxxxxxxxxxxxxxx>*Delivered-to*: srfi-110@xxxxxxxxxxxxxxxxx*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=3m0JSJvzf0SAAsOvFNl8bl7VlH4Bex2+F8nvIgjcdYY=; b=eVgNZ6bCOX83QZzMCmQvRykAMn1pNf8+Hs5e3UuZ7VLQVmYpU4mKr12HeUw9ADxcel 1Y9dYmKRlY6QbCIHfZz7v3NxhwWmb98tIyV76Hao7w3rO7F/VkEJqoYO0dC1FMtmnyeJ mL2HO1S6aa5FlB4vkr+vrngYy4ZATinFq6/A5tyng3ZgRo5qNW40Y+m8Fv/zN/QK4Xqc 5ooDQyzcJr00jZ5wtmDp2JcQ/J17RhPTZq3DydCoLKvFi0vO2izIJ42mxxfyNWTs+5Ey oiqhc/+ZdLtMyhVoHOdUzShthB3tTiAEy39l2eg5XBRGdg+OyTF+V8dQBRH9PKurnhJ6 5V+w==*In-reply-to*: <E1UHcsS-0001aL-1g@xxxxxxxxxxxxxxxxxxxxx>*References*: <CAF+kUQX5mK=VStZyu6zfGQj9SE+J4D=dHPF6+d-T-5a+tZ7XvA@xxxxxxxxxxxxxx> <20130317.154441.695066990312419885.shiro@xxxxxxxx> <CAF+kUQX3ghwPo3Jk95Na0zY3kuxtbLQ-RyzZvthYo7Q-soTXyQ@xxxxxxxxxxxxxx> <E1UHcsS-0001aL-1g@xxxxxxxxxxxxxxxxxxxxx>

On 3/19/13, David A. Wheeler <dwheeler@xxxxxxxxxxxx> wrote: > Alan Manuel Gloria: >> >> 1. Allow "foo . EOL INDENT x ..." ==> "(foo . (x ...))" >> >> 2. Allow "foo . $ x ..." ==> "(foo x ...)" > > Unfortunately, those 2 forms greatly differ in ease-of-implementation. > > The *second* form is easy to add to the BNF. Here's the patch: > > diff --git a/sweet.g b/sweet.g > index 82055ea..937e54d 100644 > --- a/sweet.g > +++ b/sweet.g > @@ -1061,6 +1061,7 @@ rest returns [Object v] > (pn=n_expr hspace* (n_expr error)? {$v = $pn.v;} > | COLLECTING hspace* pc=collecting_tail hspace* > (n_expr error)? {$v = $pc.v;} > + | SUBLIST hspace* ps=rest {$v = $ps.v;} > | empty {$v = list(".");}) > | empty {$v = list(".");}) > | scomment hspace* (sr=rest {$v = $sr.v;} | empty {$v = null;} ) > > > So we could easily support form #2, and I don't see any big downside. > I'll post the ANTLR patch on git; we can revert it later, or implement it in > the > Scheme implementation, depending on what people say. > > I don't see an obvious way to add the first form to the BNF, though, and > I don't think we should reorganize everything for such a bizarre case. > Also, I can see form #1 being created accidentally, so *preventing* it seems > wise. > > Granted, that's a minor inconsistency, but ". $" is such a bizarre useless > sequence that I'm going to lose any sleep over it (if we add it). There's a subtle problem with ". $" though... First: a $ b ===> (a b) ; as described in the rationale for SUBLIST. Then: a . $ b ===> (a . b) ??? Hmm. Sincerely, AmkG

**Follow-Ups**:**Re: The ". $" notation***From:*David A. Wheeler

**Handling scomments after "."***From:*David A. Wheeler

**References**:**The ". $" notation (was: Re: how useful are collecting lists?)***From:*Alan Manuel Gloria

**Re: The ". $" notation***From:*Shiro Kawai

**Re: The ". $" notation***From:*Alan Manuel Gloria

**Re: The ". $" notation***From:*David A. Wheeler

- Prev by Date:
**Re: The ". $" notation** - Next by Date:
**Re: The ". $" notation** - Previous by thread:
**Re: The ". $" notation** - Next by thread:
**Re: The ". $" notation** - Index(es):