Return-Path: Delivered-To: rainer Received: from h2774747.stratoserver.net (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) by h2774747.stratoserver.net (Dovecot) with LMTP id 84jbBjtCTV61fgAA4+3H6A for ; Wed, 19 Feb 2020 15:12:11 +0100 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h2774747.stratoserver.net (8.15.2/8.15.2/Debian-3) with ESMTP id 01JEC8Oh032435 for ; Wed, 19 Feb 2020 15:12:09 +0100 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx002 [212.227.15.9]) with ESMTP (Nemesis) id 1MgNQb-1jf9wK28y7-00hwgr for ; Wed, 19 Feb 2020 15:12:03 +0100 Received: from listserv.uni-heidelberg.de ([129.206.100.94]) by relay2.uni-heidelberg.de with ESMTP; 19 Feb 2020 15:12:04 +0100 Received: from listserv (localhost [127.0.0.1]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 5E924127CE1; Wed, 19 Feb 2020 14:34:33 +0100 (CET) Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 17.0) with spool id 42053009 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 19 Feb 2020 14:34:33 +0100 Delivered-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Received: from listserv (localhost [127.0.0.1]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 3939F126D2C for ; Wed, 19 Feb 2020 14:34:33 +0100 (CET) Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Message-ID: <5933602064531107.WA.kellysmith12.21gmail.com@listserv.uni-heidelberg.de> Date: Wed, 19 Feb 2020 14:34:33 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Kelly Smith Subject: Re: Discussion: Specialized Syntax To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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-Spam-Flag: NO X-UI-Filterresults: notjunk:1;V03:K0:R02QYHZJSgw=:BLGDYlygksleJGx2OqxfWJ+w8I LqvokzwJHU/wsX5oQs+d7p0wuXOZtyeNTcZ5d8Ifgi8T7wEFeJOwtNhTgt4N7zfvTUL/XIqpR 4NhssDUSj8k9E7V7lQUlWn280JLWt8vmk+72xXkMcGgjGmtxP8rcS8NvJFNmFXIR3Wz1qxhJg 2pObwUo197XStY4Ft2BUbzSt5kuofYzYWWGEYqDtuEsMCei/UzfjicPGp4BVTTQ3/3vrIKgaW nrLdU6TFhqFrWRLt99oTW19oyVockJ75VUWnX57brZt42HvotC2NypS8GpBq0OFtOQ9JYIHTe NVJTaxsGNxVY9XAYyd7hPqHKEnZA6yM23BZ1TWFZ+7fl2Wtew8G8RD7caD7bKlZiceI6pRlnt SrWro1xignN8MkGXQX2CFxU0oftT8vqbR7cdApgH0TXms9vjRVsuAqTIFZRFSLbSNlETHTWAh KPW6z21bDD2Q9yHybfCN/WCp3QiaPLjDFgq/e54bbHZE39hw0j+uPblDDfEYrIXm9HYhLCxGu l6/lr7eHNQHzjMyVESHWOLS4XKdlyjm2RPXu0+aMkE4veqeYL/mkJeh6vimptUBFGkTE4BFp/ Q99GTZIipe3uq6Io5PmnnSuAOpc/rhAYw9ead2qHmUz9DIx3SsCF3r9b+FEcUpIN7N91nSniS pdTa+4o/S1m6wg3bUyF6+dBRwlWhsYksPoCKB7ccmg9HVgX9O9NCOYGOLY6oGmuS/EvbMLfx0 Y4DxWyNcHg2VDYe4hr0I8C/pcwTwv6K8v/4zjsWPEldgpNq7u8V5Qb0C4FjjlPDhVgnHmjspK B68Hh3sgH1Hg77BQCylYpmkLNOlGoGZqaUDtBE75YgetjW7sh75AJR4BkfhfxpwynhQzGLz/t U2NG8uP6aOzWf8Qtvc0J3qdxcsKnz7QyNZT8jG2KtHF4/l19QHgPZSzTkaD8ESSWpTW3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 cMAlk3ZkPWKEOw/w2RyH2HnXfEwVxudenCPqKgNKNj2SaasgBp2ZcBNfdGCXp5L4bwC8ZW5CZ 8G1d5faoIVL1FNRQkmMv1mRndUOw9oV4NUUe1Wkck6WakIu9uWwiWOF6u8iw19H32y5oB6oQM 3mQdPkWSYObsrW0f4l6/Kq9pTOZtDq+burue2gKIR5P804O5TFOWaX8HPBxHm0t5RYbT+MVNm di+zrWm1cGKF0RkbCWHuyp6svD82sHU= X-Scanned-By: MIMEDefang 2.78 on 81.169.212.23 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h2774747.stratoserver.net id 01JEC8Oh032435 Status: R X-Status: X-Keywords: X-UID: 8197 On Wed, 19 Feb 2020 12:27:31 +0100, Bruno Le Floch wrote: >On 2/19/20 10:25 AM, Jonathan Spratte wrote: >> Hi, >> >>> - Defining an environment that sets up active characters to emulate >>> traditional BNF syntax is very concise, but comes at the cost of >>> delimited arguments and catcode madness. >> >> You could as well use a letter-by-letter parser that doesn't need altered >> category codes. Take a look at the pgf module `parser`. That's not `expl3` >> but could give you an idea on what's possible. >> >> Best, >> Jonathan >> > >I've been *toying* for a long time (haven't gone very far) with the idea >of writing a parser generator, but I couldn't decide how powerful to >make it. One option would be to support "parsing expression grammars" >(PEGs), which can be parsed in linear time using a packrat parser (but >use a lot of memory, possibly problematic). Another option would be to >stick with more traditional things like LL or LR parser. To be honest, >I don't know enough about parsers and what useful languages they cover >to decide. Thoughts welcome. > >Best, >Bruno Given that the machinery already exists in the regex module, I would suggest making a lexer generator and then complementing it with a parser generator. Some quick reading suggests that LALR parsers (e.g. YACC) would be a good balance of expressiveness and efficiency. Since this would be used for document syntax, the parsers do not need to be very powerful, since user-facing syntax should be relatively simple and certainly should be unambiguous. Warmly, Kelly