nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Thoughts: header/address parsing

2014-08-04 10:57:38
a classic problem with IETF documents and their use
of "ABNF" is no apparent understanding of the difference
between syntax and lexical structure. There is a very
important reason programming languages carefully
factor the problem into identifcation of lexemes
and the recognition of the syntactic structure:
most programming languages are ambiguous if you try to do
both jobs at the same time in YACC. It's true
that YACC is more powerful than LEX as to the
class of languages it can recognize, but it cannot
do *both* jobs (disamgiguate the lexical structure
and recognize the syntax) at the same time in the 
same recognizer!

that's not to say one might not be able to do something
with a modified recursive descent recognizer because
of the ease of inserting special-case logic, but 
if you want an automatically generated parser,
factoring the description is likely required
because the average IETF ABNF description
does *not* do it.

     -mo

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