File: parser.h

package info (click to toggle)
magnus 20060324-5.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,436 kB
  • ctags: 20,462
  • sloc: cpp: 130,217; ansic: 37,090; tcl: 10,970; perl: 1,109; makefile: 966; sh: 403; yacc: 372; csh: 57; awk: 33; asm: 10
file content (93 lines) | stat: -rw-r--r-- 1,603 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include "tcyacc1.h"
#define   AI    127
#define   AO    128
#define   BYE   129
#define   CC    130
#define   COM   131
#define   CONT  132
#define   CT    133
#define   CY    134
#define   DI    135
#define   DR    136
#define   DS    137
#define   ENUM  138
#define   END   140
#define   FI    142
#define   GEN   143
#define   GR    144
#define   MAX   145
#define   ME    146
#define   NC    147
#define   NO    148
#define   OO    149
#define   PAR   150
#define   PR    151
#define   RC    152
#define   REL   153
#define   RES   154
#define   RL    155
#define   RT    156
#define   SA    157
#define   SC    158
#define   SG    159
#define   SORT	160
#define   SR    161
#define   SUBG  162
#define   TI   163
#define   TW   164
#define   WO   165
#define	KEY_LEN 	41	
typedef struct Keyword { /* Keywords  */
	char *name;
	int kval;
} Keyword;
static Keyword keywords[KEY_LEN] = {
	"AI", 	AI,
	"AO",	AO,
	"Bye",	BYE,
	"bye",	BYE,
	"CC",	CC,	
	"COM",	COM,
	"CONT",	CONT,
	"CT",	CT,
	"CY",	CY,
	"DI",	DI,
	"DR",	DR,
	"DS",	DS,
	"ENUM",	ENUM,
	"End",  END,
        "END",  END,
        "end",  END,
	"FI",	FI,
	"GEN",	GEN,
	"GR",	GR,
	"MAX",	MAX,
	"ME",	ME,
	"NC",	NC,
	"NO",	NO,
	"OO",	OO,
	"PAR",	PAR,
	"PR",	PR,
	"RC",	RC,
	"REL",	REL,
	"RES",	RES,
	"RL",	RL,
	"RT",	RT,
	"SA",	SA,
	"SC",	SC,
	"SG",	SG,
	"SORT",	SORT,
	"SR",	SR,
	"SUBG", SUBG,
        "TI",   TI,
        "TW",  TW,
        "WO",  WO,
	"",	0,
};

typedef struct Word_pt {  /* word pointer and the number of words  */
	Rel_stk_type *rel_pt;
	int 	numb;
} Word_pt;	
#define NumOfWord  w_pt->numb
#define Pt2Word   w_pt->rel_pt