Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t7LIQuuv003408 for ; Fri, 21 Aug 2015 20:26:57 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx010) with ESMTPS (Nemesis) id 0LqV3h-1Yp8Ul0uuX-00e290 for ; Fri, 21 Aug 2015 20:26:50 +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 t7LIOpar025020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Aug 2015 20:24:51 +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 t7LHYbSD005832; Fri, 21 Aug 2015 20:24:50 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12513657 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 21 Aug 2015 20:24:50 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7LIH6Zm015352 for ; Fri, 21 Aug 2015 20:24:50 +0200 Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t7KK11QP006047 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 20 Aug 2015 22:01:04 +0200 Received: by iodt126 with SMTP id t126so59122358iod.2 for ; Thu, 20 Aug 2015 13:01:01 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.164.82 with SMTP id n79mr1715017ioe.88.1440059667535; Thu, 20 Aug 2015 01:34:27 -0700 (PDT) Received: by 10.36.126.11 with HTTP; Thu, 20 Aug 2015 01:34:27 -0700 (PDT) References: <55D6114D.4050100@clear.net.nz> Content-Type: text/plain; charset=UTF-8 X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id t7LIOoZi016542 Message-ID: Date: Thu, 20 Aug 2015 18:04:27 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: peek functions To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id t7LIOpar025020 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:eAqhCc+80K4=:q+NPTB0z/ifbHSbHYVTefgwt2+ SqH0iqaPU40ixNMK+ekiXQpJHBYbHX3spMxkbmfdRGWVivKMbXJB40Xjy8IpmiIFynMbtcLaS em+fyZj7iE+CTlJzihzS0Dn5DrCuRmNh1gMiEi09we0hJKNOaHniiUqTkB1+C17oQE7JgfoDi u+tyknJL/u1lywdODsHCuBWyGinhfrv8L+V4VfavF/3gblmXX4jcYWsaTkPcV2xBKvrxCmneN TLb4V/iZBJsjLtRn6/B/e5NZLNwvh9WgrnHw0NZdXZxqPiEioINTNCgCjdnMJU8VwU9RhNU7X x/qDvCCIzLTH+Pi5kX+ojEWrwsJA5aI36lSFI2enVc9AmPsii4OYD9emS7Z3yNhSkvyld1oD9 12tjPX/DCpKFrxYbnXYz9iSfx6+CkIrIbJ5DeCu36SWWHkhYKdh/4CoQIR73d4A9RFYmVfxHi VNGZxc36bCfMhS1mG9atu+rndLQKV/IX3vRzEJYSo/ErzQ+d7n2lGIpboObX4AilBzO9Rx433 v/fJ/ZSnnLdau5Rh+TgHzEwvX2v7hZebGXoFqqukW6ChP2rt+mFO9QmUS0FB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1qfnT0N1Gta3xqg57gRI+S9/GieLL36ZjI7percpE87OjYAa7HMJFj+p SecWJSa61T/rEEekxE70+PhJi0A8Z+pUJMi5O38rJE73si4xf6FlFOczVLu2RYt0PsKn1OJjD X5pZ5uL7T8AGt58twVMTsuP4WULHMitbpktncwd2J3g6TODUIxu86dD3UXA7SaWfO19oUUC9s Pr7XH91Enupslmx996ORrBj8Yz5MUoohhj8NBWBeWMZlexPCVtgO2TS14vHBp29i7xla+pYwU 9igub7xjE4RvcwpP/t0dczU+Ro0VvQ8RNyEix3zO64hCdbPtCDGWwoGBrTHou6eJpkwm/Xt8C mQxsQRnEgk4f3u/6aoAatlB562n1kjqvYvk1dYEjC3vGw+B2DbwenGk1bgT1N3Z5YdgcrKzDH u8IUVfGgIMFlt/cT2cXVhNpMjHQtAWX3A8Wvx0gKw+HsDNkgH/Jn X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h1439878.stratoserver.net id t7LIQuuv003408 Status: R X-Status: X-Keywords: X-UID: 7819 On Thu, Aug 20, 2015 at 9:35 AM, Bruno Le Floch wrote: > > 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. Yes, I think that would be sensible — I do some (somewhat manual) peeking in unicode-math (looking ahead for superscript chars, etc.) and the nesting of the code is pretty ugly. This could be an area that could also benefit from a more structured way to do "do this and gobble until marker if true, else another test" code pattern that we've briefly discussed. I should revisit *why* I thought the built-in peek functions weren't enough when I first wrote the code... it's probable that things have changed in the kernel since then. Cheers, Will