LL1 grammer for e-mail & RFC 822 update 
Author Message
 LL1 grammer for e-mail & RFC 822 update

I have used Coco, as announced in C.L.O recently.  I have used it
to generate a couple of small application grammers.  The first
two efforts, a calculator and a mailfile parser, are now on
oberon.Meakins.McGill.CA:~anonymous/Oberon/Incoming.

The Calculator accepts an expression such as ( 1,042 + 23 ) as a
selection, and inserts the answer immediately before the terminating
parenthesis.  So I can type an expression and read/mail/use the answer. :-)

The mail scanner highlights the header field names in red, the header body
in green or olive, the text in black, and the line between successive mails
in gold/aqua.  So I know the simple scanner/parser work, and I'm ready to
do a real project.  Essentially, I want to accept student e-mail with an
experiment description language, process the file.  "Process" means
sending receipts, building a database to audit lab troubles, assigning
grade hints based on the class standard deviation, etc.

----

I have read the RFC 822 once through, and the variant EBNF in appendix D
several times.  I have an edited file that makes this conform to the Coco input,
e.g.  1*2DIGIT is replaced with [DIGIT] DIGIT. and *mailbox is replaced with
{mailbox}.  But Coco complains:
e.g.

  fieldBody cannot be reached
  fieldName cannot be reached
 ...
  LL1 error in fieldBodyConten: atom is  start of several alternatives.
 ...
  LL1 error in optionalField: "In-Reply-To" is  start of several alternatives.
  LL1 error in optionalField: "References" is  start of several alternatives.

I'm sure I can either extend my simple file to do what I want but not be
rfc 822 compliant, or change the rfc 822 to make Coco happy, but surely
someone has a YACC or Bison or other variation of this already.

I have also read the FAQ titles on RTFM.MIT.EDU for those groups where I'm
not a regular.  But no enlightenment comes.

Is RFC 822 the latest word?  Is there an LL1 workup in EBNF for it?  Do real
mailers support *all* of rfc 822?

--
Aubrey McIntosh  /  Chemistry  /  University of Texas  /  Austin, TX 78712
We had freezing rain outside Dallas for thanksgiving.  Although the pine
trees did not like this, it was beautiful under the full moon.  I went into
the woods barefoot, but returned soon.  That seems far removed from here.



Thu, 23 May 1996 06:14:12 GMT  
 LL1 grammer for e-mail & RFC 822 update
mcintosh> I'm sure I can either extend my simple file to do what I
mcintosh> want but not be rfc 822 compliant, or change the rfc 822 to
mcintosh> make Coco happy, but surely someone has a YACC or Bison or
mcintosh> other variation of this already.

Visit an archive site near you and find this posting:


Newsgroups: comp.sources.misc
Subject: RFC822 parser in Yacc

Date: 29 Oct 87 04:10:48 GMT
X-Archive: comp.sources.misc/8710/19

mcintosh> Is RFC 822 the latest word?  Is there an LL1 workup in EBNF
mcintosh> for it?  Do real mailers support *all* of rfc 822?

RFC-1123 has some minor revisions of RFC-822.

There is quite a mixed bag of implementations{*filter*} around.  You
will find few that are exact matches of RFC-822.  Some implementations
are just plain deficient/broken/whatever.  Others accept some forms on
non-compliant syntax (I guess they're trying to do someone a favor,
but I wish they'd stop bad addresses at the earliest possible point).
--


  AT&T Bell Labs / AT&T EasyLink Services               LZ 3C-207



Thu, 23 May 1996 07:53:10 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Regular Expressions and RFC 822

2. Formatting RFC 822 date

3. Wanted - RFC 822 Message Parsing routines in Smalltalk

4. ANN: RFC 2047 decoding library (MIME format for non-ascii in mail headers)

5. RFC - mail-send

6. module for pop3: rfc 1939 (and may be AUTH: rfc 1734)

7. Eiffel++: Status & RFC

8. RFC: Optional arguments & switches

9. Modula-2 compiler MOCKA: New mail/email/ftp address

10. BNF for VHDL complying LL1

11. LL1 BNF-grammar for VHDL

12. Mail() Sending Email into the Ether

 

 
Powered by phpBB® Forum Software