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

📄 parser.output

📁 Lexx Bison programm Lexx Bison Lexx Bison
💻 OUTPUT
字号:
Terminals which are not used   "=="State 9 conflicts: 1 shift/reduceState 28 conflicts: 5 shift/reduceState 29 conflicts: 1 shift/reduceState 30 conflicts: 1 shift/reduceState 31 conflicts: 1 shift/reduceState 32 conflicts: 1 shift/reduceGrammar    0 $accept: program $end    1 program: program block    2        | /* empty */    3 block: instructions    4      | if_block    5      | while_block    6 if_block: IF '(' expr ')' block else_block ENDIF    7 else_block: /* empty */    8           | ELSE block    9           | ELSEIF '(' expr ')' block   10 while_block: WHILE '(' expr ')' block ENDWHILE   11 expr: ID   12     | NUMBER   13     | expr '+' expr   14     | expr '-' expr   15     | expr '*' expr   16     | expr '/' expr   17     | expr opEqual expr   18 instructions: instruction   19             | instructions instruction   20 instruction: ID opSet expr ';'Terminals, with rules where they appear$end (0) 0'(' (40) 6 9 10')' (41) 6 9 10'*' (42) 15'+' (43) 13'-' (45) 14'/' (47) 16';' (59) 20error (256)IF (258) 6ELSE (259) 8ELSEIF (260) 9ENDIF (261) 6opSet (262) 20opEqual (263) 17WHILE (264) 10ENDWHILE (265) 10ID (266) 11 20NUMBER (267) 12"==" (268)Nonterminals, with rules where they appear$accept (21)    on left: 0program (22)    on left: 1 2, on right: 0 1block (23)    on left: 3 4 5, on right: 1 6 8 9 10if_block (24)    on left: 6, on right: 4else_block (25)    on left: 7 8 9, on right: 6while_block (26)    on left: 10, on right: 5expr (27)    on left: 11 12 13 14 15 16 17, on right: 6 9 10 13 14 15 16 17    20instructions (28)    on left: 18 19, on right: 3 19instruction (29)    on left: 20, on right: 18 19state 0    0 $accept: . program $end    $default  reduce using rule 2 (program)    program  go to state 1state 1    0 $accept: program . $end    1 program: program . block    $end   shift, and go to state 2    IF     shift, and go to state 3    WHILE  shift, and go to state 4    ID     shift, and go to state 5    block         go to state 6    if_block      go to state 7    while_block   go to state 8    instructions  go to state 9    instruction   go to state 10state 2    0 $accept: program $end .    $default  acceptstate 3    6 if_block: IF . '(' expr ')' block else_block ENDIF    '('  shift, and go to state 11state 4   10 while_block: WHILE . '(' expr ')' block ENDWHILE    '('  shift, and go to state 12state 5   20 instruction: ID . opSet expr ';'    opSet  shift, and go to state 13state 6    1 program: program block .    $default  reduce using rule 1 (program)state 7    4 block: if_block .    $default  reduce using rule 4 (block)state 8    5 block: while_block .    $default  reduce using rule 5 (block)state 9    3 block: instructions .   19 instructions: instructions . instruction    ID  shift, and go to state 5    ID        [reduce using rule 3 (block)]    $default  reduce using rule 3 (block)    instruction  go to state 14state 10   18 instructions: instruction .    $default  reduce using rule 18 (instructions)state 11    6 if_block: IF '(' . expr ')' block else_block ENDIF    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 17state 12   10 while_block: WHILE '(' . expr ')' block ENDWHILE    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 18state 13   20 instruction: ID opSet . expr ';'    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 19state 14   19 instructions: instructions instruction .    $default  reduce using rule 19 (instructions)state 15   11 expr: ID .    $default  reduce using rule 11 (expr)state 16   12 expr: NUMBER .    $default  reduce using rule 12 (expr)state 17    6 if_block: IF '(' expr . ')' block else_block ENDIF   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr    opEqual  shift, and go to state 20    '+'      shift, and go to state 21    '-'      shift, and go to state 22    '*'      shift, and go to state 23    '/'      shift, and go to state 24    ')'      shift, and go to state 25state 18   10 while_block: WHILE '(' expr . ')' block ENDWHILE   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr    opEqual  shift, and go to state 20    '+'      shift, and go to state 21    '-'      shift, and go to state 22    '*'      shift, and go to state 23    '/'      shift, and go to state 24    ')'      shift, and go to state 26state 19   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr   20 instruction: ID opSet expr . ';'    opEqual  shift, and go to state 20    '+'      shift, and go to state 21    '-'      shift, and go to state 22    '*'      shift, and go to state 23    '/'      shift, and go to state 24    ';'      shift, and go to state 27state 20   17 expr: expr opEqual . expr    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 28state 21   13 expr: expr '+' . expr    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 29state 22   14 expr: expr '-' . expr    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 30state 23   15 expr: expr '*' . expr    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 31state 24   16 expr: expr '/' . expr    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 32state 25    6 if_block: IF '(' expr ')' . block else_block ENDIF    IF     shift, and go to state 3    WHILE  shift, and go to state 4    ID     shift, and go to state 5    block         go to state 33    if_block      go to state 7    while_block   go to state 8    instructions  go to state 9    instruction   go to state 10state 26   10 while_block: WHILE '(' expr ')' . block ENDWHILE    IF     shift, and go to state 3    WHILE  shift, and go to state 4    ID     shift, and go to state 5    block         go to state 34    if_block      go to state 7    while_block   go to state 8    instructions  go to state 9    instruction   go to state 10state 27   20 instruction: ID opSet expr ';' .    $default  reduce using rule 20 (instruction)state 28   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr   17     | expr opEqual expr .    opEqual  shift, and go to state 20    '+'      shift, and go to state 21    '-'      shift, and go to state 22    '*'      shift, and go to state 23    '/'      shift, and go to state 24    opEqual   [reduce using rule 17 (expr)]    '+'       [reduce using rule 17 (expr)]    '-'       [reduce using rule 17 (expr)]    '*'       [reduce using rule 17 (expr)]    '/'       [reduce using rule 17 (expr)]    $default  reduce using rule 17 (expr)state 29   13 expr: expr . '+' expr   13     | expr '+' expr .   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr    opEqual  shift, and go to state 20    '*'      shift, and go to state 23    '/'      shift, and go to state 24    opEqual   [reduce using rule 13 (expr)]    $default  reduce using rule 13 (expr)state 30   13 expr: expr . '+' expr   14     | expr . '-' expr   14     | expr '-' expr .   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr    opEqual  shift, and go to state 20    '*'      shift, and go to state 23    '/'      shift, and go to state 24    opEqual   [reduce using rule 14 (expr)]    $default  reduce using rule 14 (expr)state 31   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   15     | expr '*' expr .   16     | expr . '/' expr   17     | expr . opEqual expr    opEqual  shift, and go to state 20    opEqual   [reduce using rule 15 (expr)]    $default  reduce using rule 15 (expr)state 32   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   16     | expr '/' expr .   17     | expr . opEqual expr    opEqual  shift, and go to state 20    opEqual   [reduce using rule 16 (expr)]    $default  reduce using rule 16 (expr)state 33    6 if_block: IF '(' expr ')' block . else_block ENDIF    ELSE    shift, and go to state 35    ELSEIF  shift, and go to state 36    $default  reduce using rule 7 (else_block)    else_block  go to state 37state 34   10 while_block: WHILE '(' expr ')' block . ENDWHILE    ENDWHILE  shift, and go to state 38state 35    8 else_block: ELSE . block    IF     shift, and go to state 3    WHILE  shift, and go to state 4    ID     shift, and go to state 5    block         go to state 39    if_block      go to state 7    while_block   go to state 8    instructions  go to state 9    instruction   go to state 10state 36    9 else_block: ELSEIF . '(' expr ')' block    '('  shift, and go to state 40state 37    6 if_block: IF '(' expr ')' block else_block . ENDIF    ENDIF  shift, and go to state 41state 38   10 while_block: WHILE '(' expr ')' block ENDWHILE .    $default  reduce using rule 10 (while_block)state 39    8 else_block: ELSE block .    $default  reduce using rule 8 (else_block)state 40    9 else_block: ELSEIF '(' . expr ')' block    ID      shift, and go to state 15    NUMBER  shift, and go to state 16    expr  go to state 42state 41    6 if_block: IF '(' expr ')' block else_block ENDIF .    $default  reduce using rule 6 (if_block)state 42    9 else_block: ELSEIF '(' expr . ')' block   13 expr: expr . '+' expr   14     | expr . '-' expr   15     | expr . '*' expr   16     | expr . '/' expr   17     | expr . opEqual expr    opEqual  shift, and go to state 20    '+'      shift, and go to state 21    '-'      shift, and go to state 22    '*'      shift, and go to state 23    '/'      shift, and go to state 24    ')'      shift, and go to state 43state 43    9 else_block: ELSEIF '(' expr ')' . block    IF     shift, and go to state 3    WHILE  shift, and go to state 4    ID     shift, and go to state 5    block         go to state 44    if_block      go to state 7    while_block   go to state 8    instructions  go to state 9    instruction   go to state 10state 44    9 else_block: ELSEIF '(' expr ')' block .    $default  reduce using rule 9 (else_block)

⌨️ 快捷键说明

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