Ok, now parses mail per RFC2822, but no mime-specific stuff. On to the next part! MIME ACTION NEXT! peg-mime
authorKrista Grothoff <krista@pep-project.org>
Thu, 15 Sep 2016 11:21:28 +0200
branchpeg-mime
changeset 1176020a639a2508
parent 1175 bc3d2a53ee85
child 1177 2d35f26558c2
Ok, now parses mail per RFC2822, but no mime-specific stuff. On to the next part! MIME ACTION NEXT!
mime-parser/mailmime.peg
     1.1 --- a/mime-parser/mailmime.peg	Thu Sep 15 11:16:13 2016 +0200
     1.2 +++ b/mime-parser/mailmime.peg	Thu Sep 15 11:21:28 2016 +0200
     1.3 @@ -1,4 +1,4 @@
     1.4 -Mail            <-      ( Header )+ NEWLINE ( Body )? EOF
     1.5 +Mail            <-      ( Header )+ CRLF ( Body )? EOF
     1.6  Header          <-      HeaderKey COLON HeaderValue
     1.7  HeaderKey       <-      ( Alpha / Digit / OrdinarySymbol )+
     1.8  HeaderValue     <-      HeaderLine ( HeaderCont )*
     1.9 @@ -12,7 +12,7 @@
    1.10  Symbol          <-      OrdinarySymbol / COLON
    1.11  Whitespace      <-      Space+
    1.12  Space           <-      [' ' '\t']
    1.13 -OrdinarySymbol  <-      ["!" "#" "$" "%" "&" "'" "*" "+" "\-" "/" "\" "=" "?" "^" "_" "`" "{" "|" "}" "~" "\[" "\]" "@" ";" "." "<" ">" "\"" "(" ")" ","]
    1.14 +OrdinarySymbol  <-      ["!" "#" "$" "%" "&" "'" "*" "+" "\-" "/" "\" "=" "?" "^" "_" "`" "{" "|" "}" "~" "\[" "\]" "@" ";" "." "<" ">" "\"" "(" ")" "," "\\"]
    1.15  COLON           <-      ':'
    1.16  NEWLINE         <-      '\n'
    1.17  CR              <-      '\r'