home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume17 / pps / mail.l < prev    next >
Text File  |  1989-02-06  |  476b  |  30 lines

  1. %{
  2. #ifndef lint
  3. static char rcsid[] = "$Header: mail.l,v 0.0 88/06/22 05:22:14 on Rel $";
  4. #endif
  5. #include "pps.h"
  6. #define KEYWORD INITIAL
  7. %}
  8. field    ^[^ \t:]+:
  9. %Start COMMENT
  10. %%
  11. <INITIAL>{field}    {
  12.             begin(KEYWORD);
  13.             ECHO;
  14.             if (!iskw(yytext))
  15.                 begin(INITIAL);
  16.         }
  17. <INITIAL>\n\n+    { begin(COMMENT); REJECT; }
  18. <COMMENT>^From    { begin(INITIAL); REJECT; }
  19. [\t\n\f]+    { space(yytext); }
  20. .        { ECHO; }
  21. %%
  22. char *keywords[] = {
  23.     "",
  24.     "Date:",
  25.     "From:",
  26.     "Subject:",
  27.     "To:",
  28.     NULL
  29. };
  30.