327
|
1 /* for mc-parse.c */
|
|
2
|
452
|
3 extern int sym; /* next symbol */
|
|
4 extern int type; /* current type */
|
|
5 extern int mode; /* grammer mode (STAT,ADECL) */
|
|
6 extern int stmode; /* storage mode (STATIC,EXTRN) */
|
|
7 extern int ctmode; /* constant mode */
|
454
|
8 extern int inmode; /* inline mode */
|
452
|
9 extern int labelno; /* label number */
|
|
10 extern int gpc; /* global variable size (unused?) */
|
|
11 extern int disp; /* local variable offset */
|
|
12 extern int args; /* function arguments */
|
|
13 extern int init_vars; /* variable initialize list in local decl */
|
|
14 extern int cslabel; /* case label */
|
454
|
15 extern int cslist; /* case list */
|
|
16 extern int clabel; /* continue label */
|
452
|
17 extern int control; /* control is reached */
|
|
18 extern NMTBL *nptr; /* current name table */
|
|
19 extern NMTBL *gnptr; /* currrent global name table (unsed?) */
|
|
20 extern NMTBL *fnptr; /* current function name table */
|
547
|
21 extern NMTBL *local_nptr; /* initialzing local variable nptr */
|
452
|
22 extern int retlabel; /* return label */
|
|
23 extern int retpending; /* jump to return label suspended */
|
|
24 extern int retcont; /* continuation label */
|
|
25 extern int pending_jmp; /* suspended jump label */
|
|
26 extern int chk; /* no code generation */
|
|
27 extern int bit_field_disp; /* bit field bit offset */
|
|
28 extern int fields; /* struct field */
|
|
29 extern int struct_return; /* temporal return structure variable */
|
|
30 extern int lastexp; /* last expression in statement expressoin */
|
|
31 extern int debug; /* debug flag */
|
|
32 extern int decl_str_init; /* partial structure initializer */
|
453
|
33 extern int inline_funcs; /* inline function list */
|
452
|
34
|
|
35 extern int parse; /* parse tree */
|
328
|
36
|
346
|
37 /*
|
|
38 STRING nptr
|
|
39 MACRO nptr
|
|
40 FMACRO nptr
|
|
41 RESERVE nptr
|
|
42 TAG nptr
|
|
43 FIELD nptr
|
|
44 TYPE nptr
|
|
45 */
|
|
46
|
452
|
47 /* memory pool structure */
|
|
48 /* extendable */
|
346
|
49 typedef struct cheap
|
|
50 {
|
452
|
51 char *ptr; /* current pointer */
|
346
|
52 char *last;
|
|
53 char *first;
|
452
|
54 struct cheap *next; /* previous cheap */
|
346
|
55 } CHEAP;
|
|
56
|
327
|
57
|
|
58 /* used in mc-macro.c */
|
|
59
|
452
|
60 extern int asmf; /* assembler generating mode (old) */
|
|
61 extern int ch; /* current character */
|
|
62 extern int chptrsave; /* nested character pointer */
|
|
63 extern int chsave; /* saved current character */
|
|
64 extern char linebuf[LBUFSIZE]; /* line buffer */
|
|
65 extern char *chptr; /* current character pointer */
|
|
66 extern int glineno; /* total lineno */
|
|
67 extern int in_comment; /* tokenizer mode */
|
|
68 extern int in_quote; /* tokenizer mode */
|
|
69 extern int lfree; /* local free heap top */
|
|
70 extern int lineno; /* lineno in current file */
|
|
71 extern int lsrc; /* source listing flag */
|
327
|
72 extern char *include_path[MAX_INCLUDE_PATH_COUNT];
|
|
73
|
|
74 /* used in mc-code-* */
|
|
75
|
|
76 extern NMTBL null_nptr;
|
|
77
|
346
|
78 extern char * make_filename_with_extension(char *filename,char *ext);
|
|
79
|
327
|
80 /* used in mc-switch */
|
|
81
|
|
82 extern void free_glist3(int e1);
|
383
|
83 extern void free_glist3_a(int e1);
|
452
|
84 extern int csvalue1; /* current switch variable */
|
|
85 extern int blabel; /* break label in switch */
|
|
86 extern int dlabel; /* default label in switch */
|
327
|
87
|
|
88 /* used in mc-tree.c */
|
|
89
|
547
|
90 extern int gtypedefed; /* global typedef list */
|
452
|
91 extern int typedefed; /* accumlated typedef name */
|
327
|
92
|
|
93 /* global variable end */
|
|
94
|
|
95 extern void free_glist2(int e1);
|
|
96
|
|
97 /* used in mc-codegen.c */
|
|
98
|
554
|
99 extern NMTBL * anonymous_nptr();
|
327
|
100 extern int append4(int p,int a1,int a2,int a3);
|
|
101 extern void display_ntable(NMTBL *n, char *s);
|
355
|
102 extern NMTBL * lsearch(char *name,int sc);
|
327
|
103 #if FLOAT_CODE
|
440
|
104 extern int dlist2(int e1, double d1);
|
327
|
105 #endif
|
|
106 extern void error(int n);
|
|
107 extern int glist2(int e1,int e2);
|
|
108 extern int glist3(int e1,int e2,int e3);
|
574
|
109 extern int glist4(int e1,int e2,int e3,int e4);
|
327
|
110
|
|
111 extern int insert_ascend(int p,int e,int eq());
|
|
112 extern int length(int list);
|
|
113 extern int list2(int e1, int e2);
|
|
114 extern int list3(int e1, int e2, int e3);
|
|
115 extern int list4(int e1, int e2, int e3, int e4);
|
|
116 extern void extern_define(char *s,int d,int type,int use);
|
447
|
117 extern void set_lfree(int save);
|
327
|
118
|
453
|
119 extern int has_attr(NMTBL *n,int attr);
|
|
120 extern int attr_value(NMTBL *n,int attr);
|
|
121 extern void set_attr(NMTBL *n,int attr,int value);
|
487
|
122 extern int set_type_attr(int type,int attr);
|
488
|
123 extern int gset_type_attr(int type,int attr);
|
487
|
124 extern int get_type_attr(int type);
|
|
125 extern int type_value(int type);
|
|
126 extern int set_type_with_attr(int type,int type_with_attr);
|
488
|
127 extern int gset_type_with_attr(int type,int type_with_attr);
|
487
|
128
|
453
|
129
|
327
|
130 #if LONGLONG_CODE
|
|
131 extern int llist2(int e1, long long d1);
|
|
132 #endif
|
|
133 extern int neqname(char *p,char *q);
|
347
|
134 extern NMTBL *new_static_name(char *name,int delimit);
|
327
|
135 extern int reverse0(int t1);
|
|
136 extern int size(int t);
|
|
137
|
|
138 /* used in mc-macro.c */
|
|
139
|
346
|
140 extern struct cheap *cheap;
|
560
|
141 extern struct cheap *st_cheap, *cheap1; // for ST_COMMENT
|
350
|
142
|
|
143 extern NMTBL *get_name(char *name,int *i,int mode);
|
|
144 #define DEF 1
|
|
145 #define NONDEF 2
|
|
146
|
349
|
147 extern NMTBL * get_name_from_chptr();
|
347
|
148 extern NMTBL *name_space_search(NMTBL *ns,int sc);
|
346
|
149
|
327
|
150 extern int getsym(int sc);
|
|
151 extern int getch(void);
|
|
152 extern int skipspc(void);
|
|
153 extern void copy_current_file_dir(char *name);
|
|
154 extern int expr(int noconv);
|
|
155
|
|
156 extern int alpha(int c);
|
|
157 extern int digit(int c);
|
359
|
158 extern void enter_scope();
|
|
159 extern void leave_scope();
|
|
160 extern NMTBL *make_local_scope();
|
327
|
161
|
346
|
162 extern struct cheap * increment_cheap(struct cheap *cheap,char **save);
|
|
163 extern void save_cheap(struct cheap *scheap,struct cheap *cheap);
|
|
164 extern struct cheap * reset_cheap(struct cheap *scheap);
|
560
|
165 extern struct cheap * new_cheap();
|
453
|
166 extern void pfdecl(NMTBL *nptr);
|
454
|
167 #if CASE_CODE
|
|
168 extern int docase_eq();
|
|
169 #endif
|
|
170 extern NMTBL *l_top_search(char *name,int sc);
|
346
|
171
|
327
|
172 /* end */
|