⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parse_yy.v

📁 大3编译原理课程设计 绝对符合老师要求 报告代码一应俱全 很详细 很靠谱
💻 V
📖 第 1 页 / 共 2 页
字号:
	fun_def : type_spec id fid LPAREN params . RPAREN comp_stmt
	fun_dec : type_spec id fid LPAREN params . RPAREN SEMI

	RPAREN  shift 78


state 57
	id_list : id_list COMMA id ASSIGN . simple_exp

	ID  shift 3
	NUM  shift 27
	LPAREN  shift 28

	id  goto 29
	var  goto 30
	simple_exp  goto 79
	factor  goto 32
	call  goto 33


state 58
	param : type_spec id LBRA . RBRA
	param : type_spec id LBRA . simple_exp RBRA

	ID  shift 3
	NUM  shift 27
	LPAREN  shift 28
	RBRA  shift 80

	id  goto 29
	var  goto 30
	simple_exp  goto 81
	factor  goto 32
	call  goto 33


state 59
	fun_dec : id fid LPAREN params RPAREN SEMI .  (19)

	.  reduce 19


state 60
	comp_stmt : LBRACE . local_dec stmt_list RBRACE
	local_dec : .  (30)

	.  reduce 30

	local_dec  goto 82


state 61
	fun_def : id fid LPAREN params RPAREN comp_stmt .  (17)

	.  reduce 17


state 62
	param_list : param_list COMMA param .  (22)

	.  reduce 22


state 63
	exp : var ASSIGN . exp

	ID  shift 3
	NUM  shift 27
	LPAREN  shift 28

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	exp  goto 83
	factor  goto 32
	call  goto 33


state 64
	factor : LPAREN exp RPAREN .  (60)

	.  reduce 60


state 65
	arg_list : exp .  (66)

	.  reduce 66


state 66
	call : var LPAREN args . RPAREN

	RPAREN  shift 84


state 67
	arg_list : arg_list . COMMA exp
	args : arg_list .  (67)

	COMMA  shift 85
	.  reduce 67


state 68
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp PLUS simple_exp .  (55)
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	TIMES  shift 47
	OVER  shift 48
	.  reduce 55


state 69
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp MINUS simple_exp .  (56)
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	TIMES  shift 47
	OVER  shift 48
	.  reduce 56


state 70
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp TIMES simple_exp .  (57)
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	.  reduce 57


state 71
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp OVER simple_exp .  (58)
	simple_exp : simple_exp . OVER simple_exp

	.  reduce 58


state 72
	simple_exp : simple_exp LT simple_exp .  (49)
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	.  reduce 49


state 73
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp LTEQ simple_exp .  (50)
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	.  reduce 50


state 74
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp GT simple_exp .  (51)
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	.  reduce 51


state 75
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp GTEQ simple_exp .  (52)
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	.  reduce 52


state 76
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp EQ simple_exp .  (53)
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	LT  shift 49
	LTEQ  shift 50
	GT  shift 51
	GTEQ  shift 52
	.  reduce 53


state 77
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp NOEQ simple_exp .  (54)
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	LT  shift 49
	LTEQ  shift 50
	GT  shift 51
	GTEQ  shift 52
	.  reduce 54


state 78
	fun_def : type_spec id fid LPAREN params RPAREN . comp_stmt
	fun_dec : type_spec id fid LPAREN params RPAREN . SEMI

	SEMI  shift 86
	LBRACE  shift 60

	comp_stmt  goto 87


state 79
	id_list : id_list COMMA id ASSIGN simple_exp .  (12)
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	LT  shift 49
	LTEQ  shift 50
	GT  shift 51
	GTEQ  shift 52
	EQ  shift 53
	NOEQ  shift 54
	.  reduce 12


state 80
	param : type_spec id LBRA RBRA .  (26)

	.  reduce 26


state 81
	param : type_spec id LBRA simple_exp . RBRA
	simple_exp : simple_exp . LT simple_exp
	simple_exp : simple_exp . LTEQ simple_exp
	simple_exp : simple_exp . GT simple_exp
	simple_exp : simple_exp . GTEQ simple_exp
	simple_exp : simple_exp . EQ simple_exp
	simple_exp : simple_exp . NOEQ simple_exp
	simple_exp : simple_exp . PLUS simple_exp
	simple_exp : simple_exp . MINUS simple_exp
	simple_exp : simple_exp . TIMES simple_exp
	simple_exp : simple_exp . OVER simple_exp

	PLUS  shift 45
	MINUS  shift 46
	TIMES  shift 47
	OVER  shift 48
	LT  shift 49
	LTEQ  shift 50
	GT  shift 51
	GTEQ  shift 52
	EQ  shift 53
	NOEQ  shift 54
	RBRA  shift 88


state 82
	comp_stmt : LBRACE local_dec . stmt_list RBRACE
	local_dec : local_dec . var_dec
	stmt_list : .  (32)

	INT  shift 1
	VOID  shift 2
	.  reduce 32

	var_dec  goto 89
	type_spec  goto 90
	stmt_list  goto 91


state 83
	exp : var ASSIGN exp .  (45)

	.  reduce 45


state 84
	call : var LPAREN args RPAREN .  (64)

	.  reduce 64


state 85
	arg_list : arg_list COMMA . exp

	ID  shift 3
	NUM  shift 27
	LPAREN  shift 28

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	exp  goto 92
	factor  goto 32
	call  goto 33


state 86
	fun_dec : type_spec id fid LPAREN params RPAREN SEMI .  (18)

	.  reduce 18


state 87
	fun_def : type_spec id fid LPAREN params RPAREN comp_stmt .  (16)

	.  reduce 16


state 88
	param : type_spec id LBRA simple_exp RBRA .  (27)

	.  reduce 27


state 89
	local_dec : local_dec var_dec .  (29)

	.  reduce 29


state 90
	var_dec : type_spec . id_list SEMI

	ID  shift 3

	id  goto 93
	id_list  goto 15
	var  goto 16


state 91
	comp_stmt : LBRACE local_dec stmt_list . RBRACE
	stmt_list : stmt_list . stmt

	IF  shift 94
	RETURN  shift 95
	WHILE  shift 96
	ID  shift 3
	NUM  shift 27
	SEMI  shift 97
	LPAREN  shift 28
	LBRACE  shift 60
	RBRACE  shift 98

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	comp_stmt  goto 99
	stmt  goto 100
	exp_stmt  goto 101
	sele_stmt  goto 102
	iter_stmt  goto 103
	return_stmt  goto 104
	exp  goto 105
	factor  goto 32
	call  goto 33


state 92
	arg_list : arg_list COMMA exp .  (65)

	.  reduce 65


state 93
	id_list : id . ASSIGN simple_exp
	var : id .  (47)
	var : id . LBRA simple_exp RBRA

	ASSIGN  shift 18
	LBRA  shift 19
	.  reduce 47


state 94
	sele_stmt : IF . LPAREN exp RPAREN stmt
	sele_stmt : IF . LPAREN exp RPAREN stmt ELSE stmt

	LPAREN  shift 106


state 95
	return_stmt : RETURN . SEMI
	return_stmt : RETURN . exp SEMI

	ID  shift 3
	NUM  shift 27
	SEMI  shift 107
	LPAREN  shift 28

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	exp  goto 108
	factor  goto 32
	call  goto 33


state 96
	iter_stmt : WHILE . LPAREN exp RPAREN stmt

	LPAREN  shift 109


state 97
	exp_stmt : SEMI .  (39)

	.  reduce 39


state 98
	comp_stmt : LBRACE local_dec stmt_list RBRACE .  (28)

	.  reduce 28


state 99
	stmt : comp_stmt .  (37)

	.  reduce 37


state 100
	stmt_list : stmt_list stmt .  (31)

	.  reduce 31


state 101
	stmt : exp_stmt .  (33)

	.  reduce 33


state 102
	stmt : sele_stmt .  (34)

	.  reduce 34


state 103
	stmt : iter_stmt .  (35)

	.  reduce 35


state 104
	stmt : return_stmt .  (36)

	.  reduce 36


state 105
	exp_stmt : exp . SEMI

	SEMI  shift 110


state 106
	sele_stmt : IF LPAREN . exp RPAREN stmt
	sele_stmt : IF LPAREN . exp RPAREN stmt ELSE stmt

	ID  shift 3
	NUM  shift 27
	LPAREN  shift 28

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	exp  goto 111
	factor  goto 32
	call  goto 33


state 107
	return_stmt : RETURN SEMI .  (43)

	.  reduce 43


state 108
	return_stmt : RETURN exp . SEMI

	SEMI  shift 112


state 109
	iter_stmt : WHILE LPAREN . exp RPAREN stmt

	ID  shift 3
	NUM  shift 27
	LPAREN  shift 28

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	exp  goto 113
	factor  goto 32
	call  goto 33


state 110
	exp_stmt : exp SEMI .  (38)

	.  reduce 38


state 111
	sele_stmt : IF LPAREN exp . RPAREN stmt
	sele_stmt : IF LPAREN exp . RPAREN stmt ELSE stmt

	RPAREN  shift 114


state 112
	return_stmt : RETURN exp SEMI .  (44)

	.  reduce 44


state 113
	iter_stmt : WHILE LPAREN exp . RPAREN stmt

	RPAREN  shift 115


state 114
	sele_stmt : IF LPAREN exp RPAREN . stmt
	sele_stmt : IF LPAREN exp RPAREN . stmt ELSE stmt

	IF  shift 94
	RETURN  shift 95
	WHILE  shift 96
	ID  shift 3
	NUM  shift 27
	SEMI  shift 97
	LPAREN  shift 28
	LBRACE  shift 60

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	comp_stmt  goto 99
	stmt  goto 116
	exp_stmt  goto 101
	sele_stmt  goto 102
	iter_stmt  goto 103
	return_stmt  goto 104
	exp  goto 105
	factor  goto 32
	call  goto 33


state 115
	iter_stmt : WHILE LPAREN exp RPAREN . stmt

	IF  shift 94
	RETURN  shift 95
	WHILE  shift 96
	ID  shift 3
	NUM  shift 27
	SEMI  shift 97
	LPAREN  shift 28
	LBRACE  shift 60

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	comp_stmt  goto 99
	stmt  goto 117
	exp_stmt  goto 101
	sele_stmt  goto 102
	iter_stmt  goto 103
	return_stmt  goto 104
	exp  goto 105
	factor  goto 32
	call  goto 33


state 116
	sele_stmt : IF LPAREN exp RPAREN stmt .  (40)
	sele_stmt : IF LPAREN exp RPAREN stmt . ELSE stmt

	ELSE  shift 118
	.  reduce 40


state 117
	iter_stmt : WHILE LPAREN exp RPAREN stmt .  (42)

	.  reduce 42


state 118
	sele_stmt : IF LPAREN exp RPAREN stmt ELSE . stmt

	IF  shift 94
	RETURN  shift 95
	WHILE  shift 96
	ID  shift 3
	NUM  shift 27
	SEMI  shift 97
	LPAREN  shift 28
	LBRACE  shift 60

	id  goto 29
	var  goto 41
	simple_exp  goto 42
	comp_stmt  goto 99
	stmt  goto 119
	exp_stmt  goto 101
	sele_stmt  goto 102
	iter_stmt  goto 103
	return_stmt  goto 104
	exp  goto 105
	factor  goto 32
	call  goto 33


state 119
	sele_stmt : IF LPAREN exp RPAREN stmt ELSE stmt .  (41)

	.  reduce 41


##############################################################################
# Summary
##############################################################################

29 token(s), 29 nonterminal(s)
69 grammar rule(s), 120 state(s)


##############################################################################
# End of File
##############################################################################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -