LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Bruno Le Floch <[log in to unmask]>
Wed, 19 Feb 2020 12:27:31 +0100
text/plain (27 lines)
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.