

#define REJECTING 256
#define STATE 257
#define PAIR 258
#define STATENAME 259
#define STRCONST 260
#define INCLUDE 261
#define MACHINE 262
#define KREJECT 263
#define OTHERS 264
#define SUBSET 265

#define MAXCOLS 50
#define MAXALPHABET 50

extern char *lexical, *surface, *statename, *strconst;

extern int yylineno;
extern char *yysptr;
extern char yysbuf[];
extern FILE *yyin;
extern char *yyfname;

typedef struct subset {
  char *name;
  char *letters[MAXALPHABET];
  int numletters;
  struct subset *next;
} Subset;

typedef struct pair {
  char *lexical;
  char *surface;
} Pair;

typedef struct state {
  char *name;				/* Symbolic name */
  struct machine *machine;		/* In case we need it */
  int rejecting;			/* Flag */
  int number;				/* State number assignment */
  char *newstate[MAXCOLS];		/* Which pair?  Check its machine's pairs array */
  char *others;				/* For things not mentioned (others clause) */
  struct state *next;			/* Linked list */
} State;

#define REJECTSTATE ((char *)-1)

typedef struct machine {
  char *name;				/* Symbolic name of this machine */
  Pair pairs[MAXCOLS];			/* All pairs used in this machine */
  int used;				/* How many pairs are used? */
  State *states;			/* Linked list of states for this machine */
  struct machine *next;			/* Linked list of machines */
} Machine;

