[m-rev.] for post-commit review: clean up extras/xml

Julien Fischer jfischer at opturion.com
Fri Jun 24 16:17:36 AEST 2022

On Fri, 24 Jun 2022, Zoltan Somogyi wrote:

> For review by anyone.
> Can anyone propose better names for the following predicates
> in parsing.m?
> - "then", which prompted the email about funny syntax on m-users;

"next" or "then_do".
(I would also change the name of "and_then" to match whatever is picked.)

> - lit, whose two different arity variants should have different names;
> - lit1, whose two different arity variants should also have different names,
>  and a base name that differs from lit by more than one digit whose meaning
>  is neither obvious nor documented;

* lit matches strings
* lit1 matches characters
* lit2 matches list of characters.

There are two variants of the first two, one which just matches and one which
matches and returns a given value.

So perhaps:


(Looking at some of the parser combinator style parsers for XML written in
Haskell that inspired this one, I don't think meaningful names was that much of
a consideration ...)

> - x


The diff looks fine, although I have only skimmed it.


More information about the reviews mailing list