这是 y.ouput 文件的一部分
状态 65
15 表达式:表达式。“&&“ 表达
16 | 表达 。“<”表达式
17 | 表达 。“+”表达式
18 | 表达 。“-“ 表达
19 | 表达 。“*“ 表达
20 | 表达 。“[“ 表达 ”]”
21 | 表达 。“。” “长度”
22 | 表达 。“。” 标识符“(”表达式“,”表达式“)”
25 | “!” 表达 。
"[" shift, and go to state 67
"<" shift, and go to state 69
"+" shift, and go to state 70
"-" shift, and go to state 71
"*" shift, and go to state 72
"." shift, and go to state 73
"[" [reduce using rule 25 (Expression)]
"<" [reduce using rule 25 (Expression)]
"+" [reduce using rule 25 (Expression)]
"-" [reduce using rule 25 (Expression)]
"*" [reduce using rule 25 (Expression)]
"." [reduce using rule 25 (Expression)]
$default reduce using rule 25 (Expression)
这就是设置运算符优先级的方式
%left "&&"
%left '<'
%left '-' '+'
%left '*'
%right '!'
%left '.'
%left '(' ')'
%left '[' ']'