Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t7T9n68c024105 for ; Sat, 29 Aug 2015 11:49:07 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx112) with ESMTPS (Nemesis) id 0M5prh-1Yl6wf3Q2D-00xurd for ; Sat, 29 Aug 2015 11:49:01 +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 t7T9l1HH025596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 29 Aug 2015 11:47:02 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7SM14sq026719; Sat, 29 Aug 2015 11:47:01 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12511692 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 29 Aug 2015 11:47:00 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7T9l0Vq032124 for ; Sat, 29 Aug 2015 11:47:00 +0200 Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7T99qHM011675 for ; Sat, 29 Aug 2015 11:09:56 +0200 Received: from mxin1-orange.clear.net.nz (lb1-srcnat.clear.net.nz [203.97.32.236]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0NTU00MYK6SEYP00@smtp3.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Sat, 29 Aug 2015 21:09:51 +1200 (NZST) Received: from 203-96-202-14.dsl.dyn.ihug.co.nz (HELO [127.0.0.1]) ([203.96.202.14]) by smtpin1.clear.net.nz with ESMTP; Sat, 29 Aug 2015 21:09:50 +1200 MIME-version: 1.0 Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 150827-1, 28/08/2015), Outbound message X-Antivirus-Status: Clean References: <55DBB7F6.1070307@clear.net.nz> <55DABA1D.3050706@morningstar2.co.uk> <55DCFDF7.7080305@clear.net.nz> <55DC05BF.1040505@morningstar2.co.uk> <55DC28E8.9090405@morningstar2.co.uk> <55DDFD0A.4000901@clear.net.nz> <55DDACCB.1070104@morningstar2.co.uk> <55DF523F.2050905@clear.net.nz> <55DF48BE.5030503@residenset.net> <55DF5276.7010500@morningstar2.co.uk> <55DF70B2.1090700@morningstar2.co.uk> <55E09AA8.6070100@residenset.net> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 Message-ID: <55E176DB.6000109@clear.net.nz> Date: Sat, 29 Aug 2015 21:09:47 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Re: Catcode changes To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:8RiNhjUH3Gs=:N+NwkM2QMv31UfQ0urLjszivIu 9JD98Zny/lANXoI1xxKlLdl5UrO3FqIVFV1i9MTv6VGKclFoKxLkoNbaQqyADcFDgFSyymgD3 ancgaOW4srkIHLWNkd5DnxNr/Lv4oC4BPe6UmTB47R5nee2ewo8uZf0JhzDWWTt6w71HvB1/D 1+1BE0BIQbGAelE5UOGiaJ2cQZ6TbeKFr7UEXLclQzzJi1gvFHOUGs4i1tbYiLEevJeqVAZZ7 0BSzVe8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TfWUCsZUO3k7oFEQXggNDZjPKBFq8OVLu21OpKoWFyHBw9RnUrmP2LU+3b5tl89AZI5MUOoz q+qhNfzUPcV+NsDSu3QDsHRiv+0IrkpHGtc+/sTrHmK2H4X8+hfMwM4ohoEvSADLjNvQt6Ne+ Zoe2/Le8WAN00OUXzgppda6LSKayI5bBC3Ik9VczQE/UUQB4gR X-UI-Loop:V01:OaJVyx62V5Y=:dwIwG6gmfBKLCf6CpvSzx4DfjpBTIOKOaLVvVGxbB54= X-UI-Out-Filterresults: notjunk:1;V01:K0:lTsrh4ltf10=:y6CaCsdNdfKOqhwlvCqlwn EOUXn55Ur82dfvDvUZxfBk2ZmzVN+JKCYZXWj2KVv4AnYUhrrNBnrWnI5nS1awsCYt1IDf7dv 9l4GTRQ+pbodu38wukBFMkB/icMPQZfuFOIealB32kAXD+WxMiQeDmSe7XZ+bbAKuMEzzoZAP zBjvms3Bivu9eZFrKGZK62096AHYJa+1UB2wwozqbZ2IuY9Lbmh8e2ONs3IML8Xi7HAjOSWjb zb4A9zzYfQQtZeR2V2Gwsa8cyHtx6ZKZgP3W1vzvF2YzhkV94Ky+lyPNJHfgMw7mczpMZo0i0 tu2/1WakwG3EqBf6VqP+G6b8YfuIWDKgPM4MtnLXnBaBu95/jspvc6jQPVXsEHsV4I83khGMi SDxmcZETqRJFSCzII1MPR+8m8Y6ZxuPlAcNGJ/7vtbjNuPlyyaoG/YJHUJMQUC0G/tZRYxjqx LmjArbpH+H3kfNnDw++2vpKnlHGiAYNK/6Ip/KoC8RFqWAVgUq34 X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7857 On 29/08/2015 9:26 a.m., Bruno Le Floch wrote: > Joseph understood your point perfectly well. Xparse takes care of > matching nested parentheses, and does that expandably too. It would be > possible for Andrew to abuse xparse to grab his parenthesized group, > but I am not sure whether I want to advise this or not. It would also > be possible to simply copy the code, but finding out where this is > done in xparse's code is non-trivial. I could also just provide code > that does that, but it would take 30 minutes to get completely right > and clean (the code needs to carefully preserve braces when grabbing > delimited arguments, for instance). Using \tl_set_rescan:Nnn seems > reasonable given the above. > Bruno The suggestion that the documentation note the use of empty setups for \tl_set_rescan:Nnn seems to have sparked a wider discussion (much of it beyond me, but interesting as a spectator). The final area where I've used rescanning is in parsing nested commas for functions of multiple arguments. l3fp has max and min. It is easy to translate an expression involving possibly nested \max and \min to a form that l3fp can digest. All the hard parsing work is conducted out of sight in l3fp. But there are other functions, like greatest common divisor, \gcd, which have no corresponding l3fp member. To handle an expression like \gcd(15,24,33) I equate a comma list to the argument 15,24,33 then pop the items of the comma list into token list variables which can be converted to integers and fed to the gcd algorithm. But for a nested expression like \gcd(\max(7+\max(5,2),8),\min(24,29),10+5,\gcd(30,45,6)) the argument of the outer \gcd can't be equated to a comma list without mangling the mathematical syntax. I've treated this by rescanning ( and ) to group begin and end in the argument token list, then equating a comma list to the rescanned argument. The individual items of the comma list are now the correct ones. The token lists resulting on popping items from the comma list are then rescanned with an empty setup to get everything back to "normal", converted to integers and fed to the gcd algorithm. To me the way rescanning cuts through the complexity makes it seem (as they say in medicine of an effective drug) like a magic bullet. Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus