lex&yacc2

YACC:

每个归约后yacc 都执行默认动作,在运行任何明确的动作代码之前,将值$1 赋介$$.

下面是从这个语法中生成的 y.tab.h:
#define NAME 257
#define NUMBER 258
#define UMINUS 259
typedef union {
double dval;
int vblno;
}YYSTYPE;
extern YYSTYPE yylval;

$$ 's type

how can we know the action in yacc, $1... parameters of the function make the action consisty.

 

posted @ 2014-04-01 16:28  Peaceful-蓝蓝的  阅读(124)  评论(0编辑  收藏  举报