Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t7K0DX4l018941 for ; Thu, 20 Aug 2015 02:13:35 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx003) with ESMTPS (Nemesis) id 0MWh3r-1ZHZBU3pFb-00XwnX for ; Thu, 20 Aug 2015 02:13:28 +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 t7K0BlxH000934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Aug 2015 02:11:47 +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 t7JM13NZ002541; Thu, 20 Aug 2015 02:11:47 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12511361 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 20 Aug 2015 02:11:47 +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 t7K0BkGV010216 for ; Thu, 20 Aug 2015 02:11:46 +0200 Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7K0BeJ7000884 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 20 Aug 2015 02:11:43 +0200 Received: by igui7 with SMTP id i7so18905512igu.0 for ; Wed, 19 Aug 2015 17:11:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.112.229 with SMTP id it5mr5147496igb.46.1440029100909; Wed, 19 Aug 2015 17:05:00 -0700 (PDT) Received: by 10.36.81.201 with HTTP; Wed, 19 Aug 2015 17:05:00 -0700 (PDT) References: <55D6114D.4050100@clear.net.nz> Content-Type: text/plain; charset=UTF-8 Message-ID: Date: Thu, 20 Aug 2015 02:05:00 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: peek functions To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <55D6114D.4050100@clear.net.nz> 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:WjdnWuuK/pI=:2mRlQ3Sp/Y0s8QKgm1b4KgCndG ZWHW81ivHwdgZO20+jnNelMNU54mFS/SVi4HebuzjbYNxsNNpfD9W+SvAQKfBi+5DOfrSGLQA ELRGWNg0PyYxRDIBQPvCxnnP1vF0HCc10PFASTKBAR8mH76VoGsakJw2nekJ2I2kAxVxwJrQ4 q0igqKNML/0cKEoCAxtuvFtZLFa/MaElWqEMleGaThloighQbKpdb963NFq5vAxRgLl84uaNk gHKSBEyBjlK8qKcKnhjKj8bcGkCarwCdXAeaWT/ORXsIAiGrywgM+6xyf/lo1iFyXccPl0UNI 60NpwKNVDTxXsChy+4/DOBKg7NrL9WRLPpPv43Gpi1bl5vrPQ/t69nuoWpTqFhv2P+f9JDMiy PtRyTMFOi56EQ0OB7lKJzgu/xfD+gpfpehIblqwX9hu8o0GAKzPnl2/VWvRoPHspD+086EvLD Rl/HNOSo1cjkP31eh8TlIx8X/eTVD6RHQRKIfZmYyMx7/tVaH4DGF1Lc8XwUE629qC2CUclC0 DPpA6tHyrowyKB4RTTSIGCCS+TceiRpH8V59sOIx8zXlXwWmAbzenBE+Tryu6zY42vE2Lc04L ZZj91Tg8S17+AsrG0/lA+PCLpjXymcaJv/gG8aFfcO8KYXGHMqYfikqeDG/IgKpddttBg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bVAW9fBuLBJ1KykNShI1Hy+EXFqd1Ax+Q8Euh1JlkI9OYm8oQdqEz53hPvINmYd6+ sjqeCTIcYBmcwlGDnlPfSjd2JVWbEj+rnBQTDwiA4+XURzbBsqQPleg604Fbzeh6/9niwEnqV ux2BvlR1hqmn0aWb6RfRSgn/HRacMPTGr9yCO+B0OFz+yMu/nyvscOU004s9Vw8zqIDmx4WN5 U05y5PDpqtYhFHTuwm1fm0l9aGwDi9OnJcBBkICosqomw+F3haT1ZYdA3vtJTzZpPB9EwsAwt D2knfYd7icrOaJrhiuhfyMy+zB11uUimsW/y36bqble76zOoM3uIo3HzkiaBQMtjaVBbn6sXM jFBnHDa2cTWt0RrP7dsbWzPmqKyTmdERZxkqxKkNYS+fF8IV88sP X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7818 Hello, > Can someone show me or point me to some code where the peek functions > have been used (preferably in a straightforward way)? I'm thinking in > particular of functions like \peek_charcode:NTF. Two packages seem to use these peek functions a lot: mhchem and pkgloader. One thing I note is that both packages involve constructions reminiscent of a case statement: \peek_charcode:NTF M { \mypkg_grab_M_and_do_something:n } { \peek_charcode:NTF C { \mypkg_grab_C_and_do_something:n } { \mypkg_something_else: } } Such code may be simplified (and sped up a bit) if we provided a \peek_case_charcode:NnTF function. Is there interest for such an additional function? Actually, looking at mhchem a bit more, it seems that there is probably room for simplification if we provided better tools for parsing. I'll think. Regards, Bruno