[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*: "srfi-110" <srfi-110@xxxxxxxxxxxxxxxxx>*Subject*: Re: The ". $" notation*From*: "David A. Wheeler" <dwheeler@xxxxxxxxxxxx>*Date*: Mon, 18 Mar 2013 12:25:36 -0400 (EDT)*Delivered-to*: srfi-110@xxxxxxxxxxxxxxxxx*In-reply-to*: <CAF+kUQX3ghwPo3Jk95Na0zY3kuxtbLQ-RyzZvthYo7Q-soTXyQ@xxxxxxxxxxxxxx>*References*: <CAF+kUQX5mK=VStZyu6zfGQj9SE+J4D=dHPF6+d-T-5a+tZ7XvA@xxxxxxxxxxxxxx> <20130317.154441.695066990312419885.shiro@xxxxxxxx> <CAF+kUQX3ghwPo3Jk95Na0zY3kuxtbLQ-RyzZvthYo7Q-soTXyQ@xxxxxxxxxxxxxx>*Reply-to*: dwheeler@xxxxxxxxxxxx

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). --- David A. Wheeler

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

**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

- 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):