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

📄 y.output

📁 使用yacc和lex编写的cmm语言的词法分析和语法分析程序.
💻 OUTPUT
📖 第 1 页 / 共 4 页
字号:
state 29    4 fndef: typed_declspecs declarator . compstmt    '{'  shift, and go to state 30    compstmt  go to state 31state 30   68 compstmt: '{' . decls xstmts '}'   69         | '{' . xstmts '}'    INT   shift, and go to state 1    REAL  shift, and go to state 2    '}'       reduce using rule 66 (xstmts)    $default  reduce using rule 72 (save_filename)    lineno_decl           go to state 4    decls                 go to state 59    decl                  go to state 6    typed_declspecs       go to state 7    typespec              go to state 8    stmts                 go to state 60    lineno_stmt_or_label  go to state 61    xstmts                go to state 62    save_filename         go to state 63state 31    4 fndef: typed_declspecs declarator compstmt .    $default  reduce using rule 4 (fndef)state 32   59 notype_declarator: '(' notype_declarator ')' .    $default  reduce using rule 59 (notype_declarator)state 33   45 initdecls: initdecls ',' initdcl .    $default  reduce using rule 45 (initdecls)state 34   32 primary: IDENTIFIER .    $default  reduce using rule 32 (primary)state 35   33 primary: CONSTANT .    $default  reduce using rule 33 (primary)state 36    6 unop: '+' .    $default  reduce using rule 6 (unop)state 37    5 unop: '-' .    $default  reduce using rule 5 (unop)state 38   34 primary: '(' . expr ')'    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop              go to state 42    expr              go to state 64    nonnull_exprlist  go to state 57    unary_expr        go to state 43    cast_expr         go to state 44    expr_no_commas    go to state 58    primary           go to state 46state 39    7 unop: '~' .    $default  reduce using rule 7 (unop)state 40    8 unop: '!' .    $default  reduce using rule 8 (unop)state 41   49 init: '{' . '}'   50     | '{' . initlist '}'   51     | '{' . initlist ',' '}'    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    '{'         shift, and go to state 41    '}'         shift, and go to state 65    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 45    primary         go to state 46    init            go to state 66    initlist        go to state 67state 42   15 unary_expr: unop . cast_expr    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop        go to state 42    unary_expr  go to state 43    cast_expr   go to state 68    primary     go to state 46state 43   16 cast_expr: unary_expr .    $default  reduce using rule 16 (cast_expr)state 44   17 expr_no_commas: cast_expr .    $default  reduce using rule 17 (expr_no_commas)state 45   18 expr_no_commas: expr_no_commas . '+' expr_no_commas   19               | expr_no_commas . '-' expr_no_commas   20               | expr_no_commas . '*' expr_no_commas   21               | expr_no_commas . '/' expr_no_commas   22               | expr_no_commas . '%' expr_no_commas   23               | expr_no_commas . '=' expr_no_commas   24               | expr_no_commas . '<' expr_no_commas   25               | expr_no_commas . '>' expr_no_commas   26               | expr_no_commas . EQ_OP expr_no_commas   27               | expr_no_commas . NE_OP expr_no_commas   28               | expr_no_commas . LE_OP expr_no_commas   29               | expr_no_commas . GE_OP expr_no_commas   30               | expr_no_commas . AND_OP expr_no_commas   31               | expr_no_commas . OR_OP expr_no_commas   48 init: expr_no_commas .    GE_OP   shift, and go to state 69    LE_OP   shift, and go to state 70    EQ_OP   shift, and go to state 71    NE_OP   shift, and go to state 72    AND_OP  shift, and go to state 73    OR_OP   shift, and go to state 74    '='     shift, and go to state 75    '>'     shift, and go to state 76    '<'     shift, and go to state 77    '+'     shift, and go to state 78    '-'     shift, and go to state 79    '*'     shift, and go to state 80    '/'     shift, and go to state 81    '%'     shift, and go to state 82    $default  reduce using rule 48 (init)state 46   14 unary_expr: primary .   35 primary: primary . '[' expr ']'   36        | primary . '(' exprlist ')'    '('  shift, and go to state 83    '['  shift, and go to state 84    $default  reduce using rule 14 (unary_expr)state 47   46 initdcl: declarator '=' init .    $default  reduce using rule 46 (initdcl)state 48   88 identifiers: IDENTIFIER .    $default  reduce using rule 88 (identifiers)state 49   84 parmlist_or_identifiers: ')' .    $default  reduce using rule 84 (parmlist_or_identifiers)state 50   87 parm: typed_declspecs . notype_declarator    IDENTIFIER  shift, and go to state 14    '('         shift, and go to state 15    notype_declarator  go to state 85state 51   58 notype_declarator: notype_declarator '(' parmlist_or_identifiers .    $default  reduce using rule 58 (notype_declarator)state 52   82 parmlist_or_identifiers: parms . ')'   86 parms: parms . ',' parm    ','  shift, and go to state 86    ')'  shift, and go to state 87state 53   85 parms: parm .    $default  reduce using rule 85 (parms)state 54   83 parmlist_or_identifiers: identifiers . ')'   89 identifiers: identifiers . ',' IDENTIFIER    ','  shift, and go to state 88    ')'  shift, and go to state 89state 55   57 notype_declarator: notype_declarator '[' ']' .    $default  reduce using rule 57 (notype_declarator)state 56   56 notype_declarator: notype_declarator '[' expr . ']'    ']'  shift, and go to state 90state 57    9 expr: nonnull_exprlist .   13 nonnull_exprlist: nonnull_exprlist . ',' expr_no_commas    ','  shift, and go to state 91    $default  reduce using rule 9 (expr)state 58   12 nonnull_exprlist: expr_no_commas .   18 expr_no_commas: expr_no_commas . '+' expr_no_commas   19               | expr_no_commas . '-' expr_no_commas   20               | expr_no_commas . '*' expr_no_commas   21               | expr_no_commas . '/' expr_no_commas   22               | expr_no_commas . '%' expr_no_commas   23               | expr_no_commas . '=' expr_no_commas   24               | expr_no_commas . '<' expr_no_commas   25               | expr_no_commas . '>' expr_no_commas   26               | expr_no_commas . EQ_OP expr_no_commas   27               | expr_no_commas . NE_OP expr_no_commas   28               | expr_no_commas . LE_OP expr_no_commas   29               | expr_no_commas . GE_OP expr_no_commas   30               | expr_no_commas . AND_OP expr_no_commas   31               | expr_no_commas . OR_OP expr_no_commas    GE_OP   shift, and go to state 69    LE_OP   shift, and go to state 70    EQ_OP   shift, and go to state 71    NE_OP   shift, and go to state 72    AND_OP  shift, and go to state 73    OR_OP   shift, and go to state 74    '='     shift, and go to state 75    '>'     shift, and go to state 76    '<'     shift, and go to state 77    '+'     shift, and go to state 78    '-'     shift, and go to state 79    '*'     shift, and go to state 80    '/'     shift, and go to state 81    '%'     shift, and go to state 82    $default  reduce using rule 12 (nonnull_exprlist)state 59   39 decls: decls . lineno_decl   68 compstmt: '{' decls . xstmts '}'    INT   shift, and go to state 1    REAL  shift, and go to state 2    '}'       reduce using rule 66 (xstmts)    $default  reduce using rule 72 (save_filename)    lineno_decl           go to state 12    decl                  go to state 6    typed_declspecs       go to state 7    typespec              go to state 8    stmts                 go to state 60    lineno_stmt_or_label  go to state 61    xstmts                go to state 92    save_filename         go to state 63state 60   61 stmts: stmts . lineno_stmt_or_label   67 xstmts: stmts .    '}'       reduce using rule 67 (xstmts)    $default  reduce using rule 72 (save_filename)    lineno_stmt_or_label  go to state 93    save_filename         go to state 63state 61   60 stmts: lineno_stmt_or_label .    $default  reduce using rule 60 (stmts)state 62   69 compstmt: '{' xstmts . '}'    '}'  shift, and go to state 94state 63   62 lineno_stmt_or_label: save_filename . save_lineno stmt_or_label    $default  reduce using rule 73 (save_lineno)    save_lineno  go to state 95state 64   34 primary: '(' expr . ')'    ')'  shift, and go to state 96state 65   49 init: '{' '}' .    $default  reduce using rule 49 (init)state 66   52 initlist: init .    $default  reduce using rule 52 (initlist)state 67   50 init: '{' initlist . '}'   51     | '{' initlist . ',' '}'   53 initlist: initlist . ',' init    ','  shift, and go to state 97    '}'  shift, and go to state 98state 68   15 unary_expr: unop cast_expr .    $default  reduce using rule 15 (unary_expr)state 69   29 expr_no_commas: expr_no_commas GE_OP . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 99    primary         go to state 46state 70   28 expr_no_commas: expr_no_commas LE_OP . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 100    primary         go to state 46state 71   26 expr_no_commas: expr_no_commas EQ_OP . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 101    primary         go to state 46state 72   27 expr_no_commas: expr_no_commas NE_OP . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 102    primary         go to state 46state 73   30 expr_no_commas: expr_no_commas AND_OP . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 103    primary         go to state 46state 74   31 expr_no_commas: expr_no_commas OR_OP . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 104    primary         go to state 46state 75   23 expr_no_commas: expr_no_commas '=' . expr_no_commas    IDENTIFIER  shift, and go to state 34    CONSTANT    shift, and go to state 35    '+'         shift, and go to state 36    '-'         shift, and go to state 37    '('         shift, and go to state 38    '~'         shift, and go to state 39    '!'         shift, and go to state 40    unop            go to state 42    unary_expr      go to state 43    cast_expr       go to state 44    expr_no_commas  go to state 105    primary         go to state 46state 76   25 expr_no_commas: expr_no_commas '>' . expr_no_commas

⌨️ 快捷键说明

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