Received: from localhost (daemon@localhost) by CS.UTK.EDU with SMTP (cf v2.9s-UTK) id KAA10306; Thu, 1 Aug 1996 10:53:40 -0400 Received: by CS.UTK.EDU (bulk_mailer v1.6); Thu, 1 Aug 1996 10:52:36 -0400 Received: from koobera.math.uic.edu (qmailr@KOOBERA.MATH.UIC.EDU [128.248.178.247]) by CS.UTK.EDU with SMTP (cf v2.9s-UTK) id KAA10201; Thu, 1 Aug 1996 10:52:32 -0400 Received: (qmail-queue invoked by uid 666); 1 Aug 1996 14:56:17 -0000 Date: 1 Aug 1996 14:56:17 -0000 Message-ID: <19960801145617.8632.qmail@koobera.math.uic.edu> From: djb@koobera.math.uic.edu (D. J. Bernstein) To: drums@cs.utk.edu Subject: Re: Allowing and disallwoing LWSP between elements in ABNF Here's the data flow in an RFC 822 parser: message | | look for a blank line V header (+ body) | | handle continuation lines V header field (+ header field + ...) | | look for colons V body (+ name) | | tokenize V sequence of atoms, specials, qstrings, literals, comments, spaces | | throw away comments and spaces V sequence of atoms, specials, qstrings, literals | | parse V higher-level data Some people want to combine the last few steps. I don't understand why. Instead of saying ``throw away comments and spaces'' once, we'd have to say it in every single parsing rule. Adding a special notation for that is begging the question: what's the benefit supposed to be? Why can't we just keep the steps separate? > We also need the grammar to clearly state exactly which kinds > of production syntax permit LWSP between elements The problem you're addressing comes up only a few times. It's easier to handle it directly--- minute = "00" / "01" / ... / "59" ---than to spend several paragraphs explaining some fancy meta-solution. A sensible implementor is just going to apply atoi() to the atom anyway. ---Dan