Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 6 Aug 2009 10:41:35 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n768fYl9026077 for ; Thu, 6 Aug 2009 10:41:34 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n768amjE022673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Aug 2009 10:36:48 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n7687nKl001169; Thu, 6 Aug 2009 10:35:01 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 287225 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 6 Aug 2009 10:33:54 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n768XsKC020114 for ; Thu, 6 Aug 2009 10:33:54 +0200 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n768Xnir021203 for ; Thu, 6 Aug 2009 10:33:52 +0200 Received: by wa-out-1112.google.com with SMTP id n7so153678wag.26 for ; Thu, 06 Aug 2009 01:33:48 -0700 (PDT) Received: by 10.114.173.10 with SMTP id v10mr11874161wae.197.1249547628535; Thu, 06 Aug 2009 01:33:48 -0700 (PDT) Received: from ?129.127.15.244? ([129.127.15.244]) by mx.google.com with ESMTPS id k37sm311808waf.42.2009.08.06.01.33.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Aug 2009 01:33:47 -0700 (PDT) Content-Type: multipart/signed; boundary=Apple-Mail-4-657483046; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v935.3) References: <4A7921CF.5020803@morningstar2.co.uk> <4A7A1505.4040604@residenset.net> <4A7A726F.3080006@morningstar2.co.uk> <4A7A857F.4010400@morningstar2.co.uk> <4A7A906B.6080709@morningstar2.co.uk> X-Mailer: Apple Mail (2.935.3) X-Spam-Whitelist: Message-ID: <913BFFC3-4041-4426-9FCB-49E95C7C2541@gmail.com> Date: Thu, 6 Aug 2009 18:03:42 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: xparse To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A7A906B.6080709@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 06 Aug 2009 08:41:35.0233 (UTC) FILETIME=[B4B49710:01CA1671] Status: R X-Status: X-Keywords: X-UID: 5831 --Apple-Mail-4-657483046 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 06/08/2009, at 5:42 PM, Joseph Wright wrote: >> I like this way of doing coordinates. Could 'd{}{-default-}' be >> shoe-horned into this syntax as well? I suppose that would mean >> completely re-writing the parser. But then we wouldn't need another >> letter for my feature of limited value. > > I thought about this. There is an issue, though. For a standard > delimited argument, the two "ends" are arbitrary: [) will work as well > as []. You can easily pick up: > > d{ ... > > for the opening-group token, but in this case you have to have a > closing > group token as the closing token (both for d{} and for gathering the > argument). So d[]{default} and d{}{default} are subtly but > importantly > different. I'm not opposed, though: > > "d{}{} can be used to include an optional argument surrounded > by braces. Note that in this case the closing token *must* be a > close-group token (usually `}')." Yep, sounds good. So, to perhaps summarise: m M - mandatory braced argument d D - optional delimited argument; picks up material between and . Can be used for {}, (), etc. Can be followed by a default value to use. o O - shorthand for d[] t - lookahead for optional s - shorthand for t* l L - everything before the next brace (not often used, but sometimes useful) No longer: c - as d() but mandatory; can perform the check manually (only a small processing overhead?). p - shorthand for d(); drop this to keep things simple. * * * Open issues: - Do we want to support something like 'd{[[}{]]}{default}' to allow \foo[[bar]] ? (I'd say no.) - Do we want to support something analogous to \def\foo #1\endfoo{...#1...} Consider active quotes, and macros like '\<...>' Maybe this is as important to support as 'l'. Could use the letter 'u{}' for "until". Any thoughts? Will --Apple-Mail-4-657483046 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGITCCAtow ggJDoAMCAQICECN4qE5kBXLk2f/jVDfSZPwwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA5MDEyOTA1NDkxNVoXDTEwMDEyOTA1NDkx NVowQjEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEfMB0GCSqGSIb3DQEJARYQd3Nw cjgxQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0BeSiAbKuqxeRN p2qn/m8ZL+xawr/WXyPgEF0FipWgRe9l3sMXcFHokcUu0xOc97R7xkUsGcQ8EyybGHuWey6x7X1Y xJZXnoAxqcaG+eREytoYGMIKs6BhEEogLVb2ERw3lQNVnOzanSFeGo8suMAN4zzCtqAjJiA1ph7h 1pksTgECYK5EiIZbFsB6zSDa8crNk404z1CfIA6YO8ezvjbDda+D0r8NU2tq9WS9F5IaG+bW71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