parse.v
来自「一个C语言的编译器」· Verilog 代码 · 共 2,592 行 · 第 1/4 页
V
2,592 行
local_dec goto 117
state 108
fun_def : id fid LP params RP comp_stmt . (19)
. reduce 19
state 109
param_list : param_list COMMA param . (24)
. reduce 24
state 110
simple_exp : LP INC simple_exp RP . (68)
. reduce 68
state 111
simple_exp : LP DEC simple_exp RP . (70)
. reduce 70
state 112
exp : var ASSIGN exp . (50)
. reduce 50
state 113
call : var LP args RP . (85)
. reduce 85
state 114
arg_list : arg_list COMMA . exp
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
LP shift 30
B_NOT shift 31
NOT shift 32
exp goto 118
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 115
fun_dec : type_spec id fid LP params RP SEMI . (20)
. reduce 20
state 116
fun_def : type_spec id fid LP params RP comp_stmt . (18)
. reduce 18
state 117
comp_stmt : LFP local_dec . stmt_list RFP
local_dec : local_dec . var_dec
stmt_list : . (32)
INT shift 1
CHAR shift 2
DOUBLE shift 3
VOID shift 4
. reduce 32
var_dec goto 119
stmt_list goto 120
type_spec goto 121
state 118
arg_list : arg_list COMMA exp . (86)
. reduce 86
state 119
local_dec : local_dec var_dec . (29)
. reduce 29
state 120
comp_stmt : LFP local_dec stmt_list . RFP
stmt_list : stmt_list . stmt
IF shift 122
WHILE shift 123
RETURN shift 124
FOR shift 125
INPUT shift 126
OUTPUT shift 127
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
LFP shift 107
RFP shift 129
B_NOT shift 31
NOT shift 32
comp_stmt goto 130
stmt goto 131
exp_stmt goto 132
sele_stmt goto 133
iter_stmt goto 134
return_stmt goto 135
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
input_stmt goto 137
output_stmt goto 138
id goto 37
state 121
var_dec : type_spec . id_list SEMI
ID shift 5
var goto 15
id_list goto 16
id goto 139
state 122
sele_stmt : IF . LP exp RP stmt
sele_stmt : IF . LP exp RP stmt ELSE stmt
LP shift 140
state 123
iter_stmt : WHILE . LP exp RP stmt
LP shift 141
state 124
return_stmt : RETURN . SEMI
return_stmt : RETURN . exp SEMI
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 142
LP shift 30
B_NOT shift 31
NOT shift 32
exp goto 143
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 125
iter_stmt : FOR . LP exp_stmt exp_stmt exp RP stmt
LP shift 144
state 126
input_stmt : INPUT . LP id RP SEMI
LP shift 145
state 127
output_stmt : OUTPUT . LP id RP SEMI
LP shift 146
state 128
exp_stmt : SEMI . (41)
. reduce 41
state 129
comp_stmt : LFP local_dec stmt_list RFP . (28)
. reduce 28
state 130
stmt : comp_stmt . (37)
. reduce 37
state 131
stmt_list : stmt_list stmt . (31)
. reduce 31
state 132
stmt : exp_stmt . (33)
. reduce 33
state 133
stmt : sele_stmt . (34)
. reduce 34
state 134
stmt : iter_stmt . (35)
. reduce 35
state 135
stmt : return_stmt . (36)
. reduce 36
state 136
exp_stmt : exp . SEMI
SEMI shift 147
state 137
stmt : input_stmt . (38)
. reduce 38
state 138
stmt : output_stmt . (39)
. reduce 39
state 139
id_list : id . ASSIGN simple_exp
var : id . (52)
var : id . LSP factor RSP
ASSIGN shift 21
LSP shift 22
. reduce 52
state 140
sele_stmt : IF LP . exp RP stmt
sele_stmt : IF LP . exp RP stmt ELSE stmt
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
LP shift 30
B_NOT shift 31
NOT shift 32
exp goto 148
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 141
iter_stmt : WHILE LP . exp RP stmt
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
LP shift 30
B_NOT shift 31
NOT shift 32
exp goto 149
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 142
return_stmt : RETURN SEMI . (48)
. reduce 48
state 143
return_stmt : RETURN exp . SEMI
SEMI shift 150
state 144
iter_stmt : FOR LP . exp_stmt exp_stmt exp RP stmt
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
B_NOT shift 31
NOT shift 32
exp_stmt goto 151
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 145
input_stmt : INPUT LP . id RP SEMI
ID shift 5
id goto 152
state 146
output_stmt : OUTPUT LP . id RP SEMI
ID shift 5
id goto 153
state 147
exp_stmt : exp SEMI . (40)
. reduce 40
state 148
sele_stmt : IF LP exp . RP stmt
sele_stmt : IF LP exp . RP stmt ELSE stmt
RP shift 154
state 149
iter_stmt : WHILE LP exp . RP stmt
RP shift 155
state 150
return_stmt : RETURN exp SEMI . (49)
. reduce 49
state 151
iter_stmt : FOR LP exp_stmt . exp_stmt exp RP stmt
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
B_NOT shift 31
NOT shift 32
exp_stmt goto 156
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 152
input_stmt : INPUT LP id . RP SEMI
RP shift 157
state 153
output_stmt : OUTPUT LP id . RP SEMI
RP shift 158
state 154
sele_stmt : IF LP exp RP . stmt
sele_stmt : IF LP exp RP . stmt ELSE stmt
IF shift 122
WHILE shift 123
RETURN shift 124
FOR shift 125
INPUT shift 126
OUTPUT shift 127
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
LFP shift 107
B_NOT shift 31
NOT shift 32
comp_stmt goto 130
stmt goto 159
exp_stmt goto 132
sele_stmt goto 133
iter_stmt goto 134
return_stmt goto 135
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
input_stmt goto 137
output_stmt goto 138
id goto 37
state 155
iter_stmt : WHILE LP exp RP . stmt
IF shift 122
WHILE shift 123
RETURN shift 124
FOR shift 125
INPUT shift 126
OUTPUT shift 127
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
LFP shift 107
B_NOT shift 31
NOT shift 32
comp_stmt goto 130
stmt goto 160
exp_stmt goto 132
sele_stmt goto 133
iter_stmt goto 134
return_stmt goto 135
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
input_stmt goto 137
output_stmt goto 138
id goto 37
state 156
iter_stmt : FOR LP exp_stmt exp_stmt . exp RP stmt
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
LP shift 30
B_NOT shift 31
NOT shift 32
exp goto 161
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
id goto 37
state 157
input_stmt : INPUT LP id RP . SEMI
SEMI shift 162
state 158
output_stmt : OUTPUT LP id RP . SEMI
SEMI shift 163
state 159
sele_stmt : IF LP exp RP stmt . (42)
sele_stmt : IF LP exp RP stmt . ELSE stmt
ELSE shift 164
. reduce 42
state 160
iter_stmt : WHILE LP exp RP stmt . (44)
. reduce 44
state 161
iter_stmt : FOR LP exp_stmt exp_stmt exp . RP stmt
RP shift 165
state 162
input_stmt : INPUT LP id RP SEMI . (46)
. reduce 46
state 163
output_stmt : OUTPUT LP id RP SEMI . (47)
. reduce 47
state 164
sele_stmt : IF LP exp RP stmt ELSE . stmt
IF shift 122
WHILE shift 123
RETURN shift 124
FOR shift 125
INPUT shift 126
OUTPUT shift 127
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
LFP shift 107
B_NOT shift 31
NOT shift 32
comp_stmt goto 130
stmt goto 166
exp_stmt goto 132
sele_stmt goto 133
iter_stmt goto 134
return_stmt goto 135
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
input_stmt goto 137
output_stmt goto 138
id goto 37
state 165
iter_stmt : FOR LP exp_stmt exp_stmt exp RP . stmt
IF shift 122
WHILE shift 123
RETURN shift 124
FOR shift 125
INPUT shift 126
OUTPUT shift 127
ID shift 5
NUM shift 27
FNUM shift 28
SCHAR shift 29
SEMI shift 128
LP shift 30
LFP shift 107
B_NOT shift 31
NOT shift 32
comp_stmt goto 130
stmt goto 167
exp_stmt goto 132
sele_stmt goto 133
iter_stmt goto 134
return_stmt goto 135
exp goto 136
var goto 49
simple_exp goto 50
factor goto 35
call goto 36
input_stmt goto 137
output_stmt goto 138
id goto 37
state 166
sele_stmt : IF LP exp RP stmt ELSE stmt . (43)
. reduce 43
state 167
iter_stmt : FOR LP exp_stmt exp_stmt exp RP stmt . (45)
. reduce 45
##############################################################################
# Summary
##############################################################################
48 token(s), 31 nonterminal(s)
90 grammar rule(s), 168 state(s)
##############################################################################
# End of File
##############################################################################
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?