Mercurial > hg > CbC > old > device
diff mc-parse.h @ 452:8e3284b0a8c9
minor update
author | kono |
---|---|
date | Mon, 29 Nov 2004 04:15:38 +0900 |
parents | 818505dd6e1f |
children | 1e5ca85d3f97 |
line wrap: on
line diff
--- a/mc-parse.h Sun Nov 28 04:16:27 2004 +0900 +++ b/mc-parse.h Mon Nov 29 04:15:38 2004 +0900 @@ -1,21 +1,34 @@ /* for mc-parse.c */ -extern int sym,type,mode,stmode,ctmode; -extern int labelno,gpc,disp; -extern int args,init_vars; -extern int cslabel,control; -extern NMTBL *nptr,*gnptr; -extern NMTBL *fnptr; -extern int gtypedefed; -extern int retlabel,retpending,retcont; -extern int pending_jmp; -extern int chk; -extern int bit_field_disp; -extern int fields; -extern int struct_return; -extern int lastexp; -extern int debug; -extern int decl_str_init; +extern int sym; /* next symbol */ +extern int type; /* current type */ +extern int mode; /* grammer mode (STAT,ADECL) */ +extern int stmode; /* storage mode (STATIC,EXTRN) */ +extern int ctmode; /* constant mode */ +extern int labelno; /* label number */ +extern int gpc; /* global variable size (unused?) */ +extern int disp; /* local variable offset */ +extern int args; /* function arguments */ +extern int init_vars; /* variable initialize list in local decl */ +extern int cslabel; /* case label */ +extern int control; /* control is reached */ +extern NMTBL *nptr; /* current name table */ +extern NMTBL *gnptr; /* currrent global name table (unsed?) */ +extern NMTBL *fnptr; /* current function name table */ +extern int gtypedefed; /* global typedef list */ +extern int retlabel; /* return label */ +extern int retpending; /* jump to return label suspended */ +extern int retcont; /* continuation label */ +extern int pending_jmp; /* suspended jump label */ +extern int chk; /* no code generation */ +extern int bit_field_disp; /* bit field bit offset */ +extern int fields; /* struct field */ +extern int struct_return; /* temporal return structure variable */ +extern int lastexp; /* last expression in statement expressoin */ +extern int debug; /* debug flag */ +extern int decl_str_init; /* partial structure initializer */ + +extern int parse; /* parse tree */ /* STRING nptr @@ -27,28 +40,31 @@ TYPE nptr */ +/* memory pool structure */ +/* extendable */ typedef struct cheap { - char *ptr; + char *ptr; /* current pointer */ char *last; char *first; - struct cheap *next; + struct cheap *next; /* previous cheap */ } CHEAP; /* used in mc-macro.c */ -extern int asmf; -extern int ch; -extern int chptrsave; -extern int chsave; -extern char linebuf[LBUFSIZE],*chptr; -extern int glineno; -extern int in_comment; -extern int in_quote; -extern int lfree; -extern int lineno; -extern int lsrc; +extern int asmf; /* assembler generating mode (old) */ +extern int ch; /* current character */ +extern int chptrsave; /* nested character pointer */ +extern int chsave; /* saved current character */ +extern char linebuf[LBUFSIZE]; /* line buffer */ +extern char *chptr; /* current character pointer */ +extern int glineno; /* total lineno */ +extern int in_comment; /* tokenizer mode */ +extern int in_quote; /* tokenizer mode */ +extern int lfree; /* local free heap top */ +extern int lineno; /* lineno in current file */ +extern int lsrc; /* source listing flag */ extern char *include_path[MAX_INCLUDE_PATH_COUNT]; /* used in mc-code-* */ @@ -61,12 +77,13 @@ extern void free_glist3(int e1); extern void free_glist3_a(int e1); -extern int csvalue1; -extern int blabel,dlabel; +extern int csvalue1; /* current switch variable */ +extern int blabel; /* break label in switch */ +extern int dlabel; /* default label in switch */ /* used in mc-tree.c */ -extern int typedefed; +extern int typedefed; /* accumlated typedef name */ /* global variable end */