nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] post ignores extra commas

2017-06-17 18:17:35
    Date:        Sat, 17 Jun 2017 12:27:19 -0400
    From:        Ken Hornstein <kenh(_at_)pobox(_dot_)com>
    Message-ID:  
<20170617162719(_dot_)DF93D743E7(_at_)pb-smtp2(_dot_)pobox(_dot_)com>

  | 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.)

Using those tools is great when you're starting with nothing, and want
to produce something that has a good chance of being correct, quickly.
(The same applies if you're tracking a moving target, where the
language is changing frequently as it is developed, but that is really
just the same situation.)

They are also useful when the objective is to verify that the formal
grammar in the spec actually specifies what is intended (as a debug/
test method for the specification.)

But I would very rarely replace a working hand generated parser for a
relatively stable language with an automatically generated one - once the
work is done to build it (and there's no question that it is more work
initially) you're usually going to be better off just keeping it.

kre


_______________________________________________
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>