|
|
1.1 root 1: #include <stdio.h>
2: #include <assert.h>
3:
4: #define MAXIDSIZE 100
5: #define HASHSIZE 1181
6: #define MAXPATH 32
7: #define MAXBRANCH 10
8: #define MAXACCEPTS 100
9: #define MAXSTATES 200
10: /* type definitions */
11: typedef char byte;
12:
13: /* forward and external type defs */
14: extern struct node *GetNode();
15: extern struct edges *GetEdge();
16: extern struct augmented_edges *GetAugEdges();
17: extern char *malloc();
18: extern char *strrchr();
19: extern FILE *outfile;
20: extern FILE *symfile;
21:
22: extern int debug_flag;
23: # define DB_LEX 1 /* print out lexical analyser debugging info */
24: # define DB_MACH 2 /* print out machine information */
25: # define DB_SYM 4 /* print out symbol debugging info */
26: # define DB_TREE 8 /* print out trees */
27: # define DB_MEM 16 /* check memory usage */
28: extern int tflag; /* generate tables only */
29: extern int ntrees;
30: extern int unique;
31:
32: /* tree definitions */
33: typedef struct node Node;
34: typedef struct symbol_entry SymbolEntry;
35:
36: /* Nodes provide the backbone for the trees built by the parser */
37: struct node {
38: SymbolEntry *sym;
39: int nlleaves; /* count of the labelled leaves */
40: Node *children;
41: Node *siblings;
42: };
43:
44: extern Node *TreeBuild();
45:
46: /* path defintions */
47: extern void path_setup();
48:
49: /* lexical analyser */
50: extern int yyline;
51: extern char *inFileName;
52: extern char token_buffer[MAXIDSIZE+1];
53:
54: extern void LexInit();
55: extern yylex();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.