Commit 870ca5cd authored by Richard P. Curnow's avatar Richard P. Curnow

Further changes for revised dfasyn

Attribute types are supplied through header files rather than being generated
by dfasyn.
parent 5c76c2dd
......@@ -59,11 +59,14 @@ mairix : $(OBJ)
%.o : %.c memmac.h mairix.h reader.h Makefile
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
datescan.c : datescan.nfa ../dfasyn/dfasyn
../dfasyn/dfasyn -o datescan.c -ho datescan_new.h -r datescan.report -v -u datescan.nfa
datescan.c datescan.h : datescan.nfa ../dfasyn/dfasyn
../dfasyn/dfasyn -o datescan.c -ho datescan.h -r datescan.report -v -u datescan.nfa
fromcheck.c : fromcheck.nfa ../dfasyn/dfasyn fromcheck.h
../dfasyn/dfasyn -o fromcheck.c -ho fromcheck_new.h -r fromcheck.report -v -u fromcheck.nfa
fromcheck.c fromcheck.h : fromcheck.nfa ../dfasyn/dfasyn
../dfasyn/dfasyn -o fromcheck.c -ho fromcheck.h -r fromcheck.report -v -u fromcheck.nfa
dates.o : datescan.h
mbox.o : fromcheck.h
../dfasyn/dfasyn:
echo "Assume dfasyn is up to date"
......
......@@ -26,7 +26,8 @@
#include <ctype.h>
#include <assert.h>
#include "mairix.h"
#include "datescan_new.h"
#include "dates.h"
#include "datescan.h"
static enum DATESCAN_TYPE discover_type(char *first, char *last)/*{{{*/
{
......
......@@ -23,7 +23,7 @@
# Stuff to pass through verbatim
%{
#include "datescan_new.h"
#include "dates.h"
%}
Abbrev A = [a-zA-Z]
......@@ -104,7 +104,7 @@ ATTR DS_DMY
DEFATTR DS_FAILURE
TYPE "DATESCAN_TYPE"
TYPE "enum DATESCAN_TYPE"
PREFIX datescan
......
......@@ -20,28 +20,13 @@
**********************************************************************
*/
#ifndef _FROMCHECK_H
#define _FROMCHECK_H
#ifndef _FROM_H
#define _FROM_H
enum fromcheck_result {
FROMCHECK_PASS,
FROMCHECK_FAIL
};
extern int fromcheck_next_state(int, int);
extern enum fromcheck_result fromcheck_exitval[];
/* Tokens, keep in the same sequence as the list in the fromcheck.nfa file */
#define FS_LF 0
#define FS_CR 1
#define FS_DIGIT 2
#define FS_AT 3
#define FS_COLON 4
#define FS_WHITE 5
#define FS_LOWER 6
#define FS_UPPER 7
#define FS_PLUSMINUS 8
#define FS_OTHEREMAIL 9
#endif
......@@ -20,7 +20,7 @@
# =======================================================================
%{
#include "fromcheck_new.h"
#include "from.h"
%}
......@@ -170,6 +170,6 @@ ATTR FROMCHECK_PASS
ATTR FROMCHECK_FAIL
DEFATTR FROMCHECK_FAIL
PREFIX fromcheck
TYPE "fromcheck_result"
TYPE "enum fromcheck_result"
# vim:ft=txt:et:sw=4:sts=4:ht=4
......@@ -30,7 +30,8 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include "mairix.h"
#include "fromcheck_new.h"
#include "from.h"
#include "fromcheck.h"
#include "md5.h"
struct extant_mbox {/*{{{*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment