Code:

#ifndef tree_h
#define tree_h
typedef enum{
T_EXPR_INTCON,
T_EXPR_STRINGCON,
T_EXPR_CHARCON,//
T_EXPR_VARIABLE,
T_EXPR_ARRAY,
T_EXPR_FUNCALL,
T_EXPR_ADD,
T_EXPR_SUB,
T_EXPR_MUL,
T_EXPR_DIV,
T_EXPR_UMINUS,
T_EXPR_REOP_GT,
T_EXPR_REOP_LT,
T_EXPR_REOP_LE,
T_EXPR_REOP_GE,
T_EXPR_REOP_NE,
T_EXPR_REOP_EQ,
T_EXPR_NOT,
T_EXPR_AND,
T_EXPR_OR,
//T_FUNCAL_ENTRY,//could be in expr, also could be in stamtment
T_TYPE_INT,
T_TYPE_ARRAY_INT,
T_TYPE_CHAR,
T_TYPE_ARRAY_CHAR,
T_TYPE_VOID,// an fun could has no return, thus has void, it is necessary to check error, like a+f(b), but f has no return,
T_TYPE_BOOL,
T_TYPE_STRINGCON,
T_EXTERN,
T_NOT_FOUND,//return when look up a variables not found,
T_STMT_IF,
T_STMT_IFELSE,
T_STMT_WHILE,
T_STMT_FOR,
T_STMT_RETURN,
T_STMT_FUNCALL,
T_STMT_ASSIGN_VAR,
T_STMT_ASSIGN_ARRAY,
// include the array,
// to think, if it is array, it should have a
// arrayExp point to an Integer constant
T_DCL_VAR_INT,
T_DCL_VAR_CHAR,
T_DCL_ARRAY_INT,
T_DCL_ARRAY_CHAR,
T_DCL_ARRAYLEN,
T_DCL_EXTERN_VAR_INT,
T_DCL_EXTERN_VAR_CHAR,
T_DCL_EXTERN_ARRAY_INT,
T_DCL_EXTERN_ARRAY_CHAR,
T_DCL_FUN_VOID,
T_DCL_FUN_INT,
T_DCL_FUN_CHAR,
T_DCL_FUN_STRING,
T_DCL_FUN_EXTERN_VOID,
T_DCL_FUN_EXTERN_INT,
T_DCL_FUN_EXTERN_CHAR,
T_FUN_BODY_INT,//used
T_FUN_BODY_CHAR,//used
T_FUN_BODY_VOID,//used
T_PARAM_VAR_INT,
T_PARAM_VAR_CHAR,
T_PARAM_ARRAY_INT,
T_PARAM_ARRAY_CHAR,
T_PARAM_VOID,
T_SYM_INT,
T_SYM_CHAR,
T_SYM_VOID
} ExprType;
struct ExprNode {
ExprType type;
struct ExprNode *next;//used for parameter exprList r;
struct ExprNode *prior;//used for parameter list
struct ExprNode *parent;//or the son exp
struct ExprNode *left; //used for any expression element, array,
struct ExprNode *right;
struct ExprNode *StmtDomain[4];
//it is used for statment and function body
char* name;// name for function and Identfier
int n;
int nodeSeen;
int tempVarCount;
int rootLabelCount;
/*static void print(ExprNode *p,int n);
static void printTab(int n);//print n tabs*/
};
#endif