本文解析lcc中最复杂的模块之一decl.c,作为语法分析的一部分,它处理各个声明。
#include "c.h"
static char rcsid[] = "$Id: decl.c,v 1.1 2002/08/28 23:12:42 drh Exp $";
#define add(x,n) (x > inttype->u.sym->u.limits.max.i-(n) ? (overflow=1,x) : x+(n))
#define chkoverflow(x,n) ((void)add(x,n))
#define bits2bytes(n) (((n) + 7)/8)
static int regcount;
static List autos, registers;
Symbol cfunc; /* current function */
Symbol retv; /* return value location for structs */
static void......
阅读全文