nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] post ignores extra commas

2017-06-17 18:31:14
 | My goal is to completely rewrite the address parser in lex/yacc;

Is there a specific reason for that?  yacc/lex parsers tend to be
bigger, slower, less tolerant, and pathetic in handling errors
(unless you do a lot of work.)

Well, note that it hasn't happened YET.  Call it "an experiment"; I'd
like to answer the question: is it even feasible?

First, take a gander at sbr/mf.c, our current address parser.  Ugh.  Our
address parser has been causing us a number of problems (exhibit A:
anyone who puts a period in their name and doesn't quote it, which is
technically permitted by the current grammar).  So, it "works", sort
of, but it needs some updates for updates that have occured along the
way.  But fixing the problems with it is hard, and the API is weird.
If someone else wants to rewrite it or use something else to generate
an address parser, then please feel free!  I'm really concerned about
long-term maintenance issues; it feels like it's m_getfld() all over
again.

As for speed .... well, that MIGHT have been a concern 30 years ago.
Nowadays, I don't think it matters.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>