上一篇,开始了语法归约,给出变量声明定义初始化归约过程,和c99文法图,请查阅这里,相关文法图在这里依然要使用
int a[10]; int a[2][3]; int a[2][3][4]; struct AA boy[100]; struct AA boy[100][100]; union BB girl[10];
curr: int next: a type-specifier declaration-specifiers curr: ID next: [ declaration-specifiers direct-declarator curr: [ next: 10 curr: 10 next: ] declaration-specifiers direct-declarator [ primary-expression declaration-specifiers direct-declarator [ postfix-expression declaration-specifiers direct-declarator [ unary-expression declaration-specifiers direct-declarator [ cast-expression declaration-specifiers direct-declarator [ multiplicative-expression declaration-specifiers direct-declarator [ additive-expression declaration-specifiers direct-declarator [ shift-expression declaration-specifiers direct-declarator [ relational-expression declaration-specifiers direct-declarator [ equality-expression declaration-specifiers direct-declarator [ AND-expression declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-specifiers direct-declarator [ logical-AND-expression declaration-specifiers direct-declarator [ logical-OR-expression declaration-specifiers direct-declarator [ conditional-expression declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-specifiers direct-declarator declaration-specifiers declarator declaration-specifiers init-declarator declaration-specifiers init-declarator-list curr: ; next: int declaration declaration-list curr: int next: a declaration-list type-specifier declaration-list declaration-specifiers curr: ID next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 2 curr: 2 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 3 curr: 3 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: int declaration-list declaration declaration-list curr: int next: a declaration-list type-specifier declaration-list declaration-specifiers curr: ID next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 2 curr: 2 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 3 curr: 3 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 4 curr: 4 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: boy next: ID declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: ID next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 100 curr: 100 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: boy next: ID declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: ID next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 100 curr: 100 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 100 curr: 100 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: union declaration-list declaration declaration-list curr: union next: BB curr: girl next: ID declaration-list union-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: ID next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 10 curr: 10 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: NULL declaration-list declaration declaration-list translation-unit
static int *ip; signed char *str; char **str; void *vp; int *a; int ****a; struct AA *boy; struct AA **boy; struct AA ****boy; union BB *girl; union BB **girl;
curr: static next: int storage-class-specifier curr: int next: * storage-class-specifier type-specifier storage-class-specifier declaration-specifiers declaration-specifiers curr: * next: ip declaration-specifiers pointer curr: ID next: ; declaration-specifiers pointer direct-declarator declaration-specifiers declarator declaration-specifiers init-declarator declaration-specifiers init-declarator-list curr: ; next: signed declaration declaration-list curr: signed next: char declaration-list type-specifier curr: char next: * declaration-list type-specifier type-specifier declaration-list type-specifier declaration-specifiers declaration-list declaration-specifiers curr: * next: str declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: char declaration-list declaration declaration-list curr: char next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: str declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: void declaration-list declaration declaration-list curr: void next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: vp declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: int declaration-list declaration declaration-list curr: int next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: a declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: int declaration-list declaration declaration-list curr: int next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: * curr: * next: * curr: * next: a declaration-list declaration-specifiers * * * pointer declaration-list declaration-specifiers * * pointer declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: * declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: boy declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: * declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: boy declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: * declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: * curr: * next: * curr: * next: boy declaration-list declaration-specifiers * * * pointer declaration-list declaration-specifiers * * pointer declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: union declaration-list declaration declaration-list curr: union next: BB curr: ID next: * declaration-list union-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: girl declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: union declaration-list declaration declaration-list curr: union next: BB curr: ID next: * declaration-list union-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: girl declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: NULL declaration-list declaration declaration-list translation-unit
int *a[11]; int (**a)[5]; int (*a)[5][4]; int *a[11][22]; char **a[2]; char ***a[2]; struct AA *boy[11]; struct AA **boy[11][22]; struct AA (*boy)[11]; struct AA (**boy)[11]; union BB *girl[10][22]; union BB **girl[10];
curr: int next: * type-specifier declaration-specifiers curr: * next: a declaration-specifiers pointer curr: ID next: [ declaration-specifiers pointer direct-declarator curr: [ next: 11 curr: 11 next: ] declaration-specifiers pointer direct-declarator [ primary-expression declaration-specifiers pointer direct-declarator [ postfix-expression declaration-specifiers pointer direct-declarator [ unary-expression declaration-specifiers pointer direct-declarator [ cast-expression declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-specifiers pointer direct-declarator [ additive-expression declaration-specifiers pointer direct-declarator [ shift-expression declaration-specifiers pointer direct-declarator [ relational-expression declaration-specifiers pointer direct-declarator [ equality-expression declaration-specifiers pointer direct-declarator [ AND-expression declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-specifiers pointer direct-declarator [ conditional-expression declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-specifiers pointer direct-declarator declaration-specifiers declarator declaration-specifiers init-declarator declaration-specifiers init-declarator-list curr: ; next: int declaration declaration-list curr: int next: ( declaration-list type-specifier declaration-list declaration-specifiers curr: ( next: * curr: * next: * curr: * next: a declaration-list declaration-specifiers ( * pointer declaration-list declaration-specifiers ( pointer curr: ID next: ) declaration-list declaration-specifiers ( pointer direct-declarator declaration-list declaration-specifiers ( declarator curr: ) next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 5 curr: 5 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: int declaration-list declaration declaration-list curr: int next: ( declaration-list type-specifier declaration-list declaration-specifiers curr: ( next: * curr: * next: a declaration-list declaration-specifiers ( pointer curr: ID next: ) declaration-list declaration-specifiers ( pointer direct-declarator declaration-list declaration-specifiers ( declarator curr: ) next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 5 curr: 5 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 4 curr: 4 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: int declaration-list declaration declaration-list curr: int next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: a declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 11 curr: 11 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 22 curr: 22 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: char declaration-list declaration declaration-list curr: char next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: a declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 2 curr: 2 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: char declaration-list declaration declaration-list curr: char next: * declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: * curr: * next: a declaration-list declaration-specifiers * * pointer declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 2 curr: 2 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: * declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: boy declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 11 curr: 11 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: * declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: boy declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 11 curr: 11 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 22 curr: 22 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: ( declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: ( next: * curr: * next: boy declaration-list declaration-specifiers ( pointer curr: ID next: ) declaration-list declaration-specifiers ( pointer direct-declarator declaration-list declaration-specifiers ( declarator curr: ) next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 11 curr: 11 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: struct declaration-list declaration declaration-list curr: struct next: AA curr: ID next: ( declaration-list struct-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: ( next: * curr: * next: * curr: * next: boy declaration-list declaration-specifiers ( * pointer declaration-list declaration-specifiers ( pointer curr: ID next: ) declaration-list declaration-specifiers ( pointer direct-declarator declaration-list declaration-specifiers ( declarator curr: ) next: [ declaration-list declaration-specifiers direct-declarator curr: [ next: 11 curr: 11 next: ] declaration-list declaration-specifiers direct-declarator [ primary-expression declaration-list declaration-specifiers direct-declarator [ postfix-expression declaration-list declaration-specifiers direct-declarator [ unary-expression declaration-list declaration-specifiers direct-declarator [ cast-expression declaration-list declaration-specifiers direct-declarator [ multiplicative-expression declaration-list declaration-specifiers direct-declarator [ additive-expression declaration-list declaration-specifiers direct-declarator [ shift-expression declaration-list declaration-specifiers direct-declarator [ relational-expression declaration-list declaration-specifiers direct-declarator [ equality-expression declaration-list declaration-specifiers direct-declarator [ AND-expression declaration-list declaration-specifiers direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers direct-declarator [ logical-AND-expression declaration-list declaration-specifiers direct-declarator [ logical-OR-expression declaration-list declaration-specifiers direct-declarator [ conditional-expression declaration-list declaration-specifiers direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: union declaration-list declaration declaration-list curr: union next: BB curr: ID next: * declaration-list union-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: girl declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 10 curr: 10 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 22 curr: 22 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: union declaration-list declaration declaration-list curr: union next: BB curr: ID next: * declaration-list union-specifier declaration-list type-specifier declaration-list declaration-specifiers curr: * next: * curr: * next: girl declaration-list declaration-specifiers * pointer declaration-list declaration-specifiers pointer curr: ID next: [ declaration-list declaration-specifiers pointer direct-declarator curr: [ next: 10 curr: 10 next: ] declaration-list declaration-specifiers pointer direct-declarator [ primary-expression declaration-list declaration-specifiers pointer direct-declarator [ postfix-expression declaration-list declaration-specifiers pointer direct-declarator [ unary-expression declaration-list declaration-specifiers pointer direct-declarator [ cast-expression declaration-list declaration-specifiers pointer direct-declarator [ multiplicative-expression declaration-list declaration-specifiers pointer direct-declarator [ additive-expression declaration-list declaration-specifiers pointer direct-declarator [ shift-expression declaration-list declaration-specifiers pointer direct-declarator [ relational-expression declaration-list declaration-specifiers pointer direct-declarator [ equality-expression declaration-list declaration-specifiers pointer direct-declarator [ AND-expression declaration-list declaration-specifiers pointer direct-declarator [ exclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ inclusive-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-AND-expression declaration-list declaration-specifiers pointer direct-declarator [ logical-OR-expression declaration-list declaration-specifiers pointer direct-declarator [ conditional-expression declaration-list declaration-specifiers pointer direct-declarator [ assignment-expression curr: ] next: ; declaration-list declaration-specifiers pointer direct-declarator declaration-list declaration-specifiers declarator declaration-list declaration-specifiers init-declarator declaration-list declaration-specifiers init-declarator-list curr: ; next: NULL declaration-list declaration declaration-list translation-unit
原文地址:http://blog.csdn.net/cwcmcw/article/details/39430145