📄 dagcheck.c
字号:
#include "c.h"
typedef Node NODEPTR_TYPE;
#define OP_LABEL(p) (specific((p)->op))
#define LEFT_CHILD(p) ((p)->kids[0])
#define RIGHT_CHILD(p) ((p)->kids[1])
#define STATE_LABEL(p) ((p)->x.state)
#define PANIC error
/*
generated at Fri Aug 19 09:46:22 2005
by $Id: lburg.c,v 2.10 2002/03/08 18:45:21 drh Exp $
*/
static void _kids(NODEPTR_TYPE, int, NODEPTR_TYPE[]);
static void _label(NODEPTR_TYPE);
static int _rule(void*, int);
#define _stmt_NT 1
#define _P_NT 2
#define _V_NT 3
#define _bogus_NT 4
#define _I_NT 5
#define _U_NT 6
#define _F_NT 7
#define _B_NT 8
static char *_ntname[] = {
0,
"stmt",
"P",
"V",
"bogus",
"I",
"U",
"F",
"B",
0
};
struct _state {
short cost[9];
struct {
unsigned int _stmt:4;
unsigned int _P:4;
unsigned int _V:6;
unsigned int _bogus:3;
unsigned int _I:5;
unsigned int _U:5;
unsigned int _F:4;
unsigned int _B:2;
} rule;
};
static short _nts_0[] = { _P_NT, 0 };
static short _nts_1[] = { _V_NT, 0 };
static short _nts_2[] = { _I_NT, 0 };
static short _nts_3[] = { _U_NT, 0 };
static short _nts_4[] = { _F_NT, 0 };
static short _nts_5[] = { _B_NT, 0 };
static short _nts_6[] = { _bogus_NT, 0 };
static short _nts_7[] = { 0 };
static short _nts_8[] = { _P_NT, _B_NT, 0 };
static short _nts_9[] = { _P_NT, _F_NT, 0 };
static short _nts_10[] = { _P_NT, _I_NT, 0 };
static short _nts_11[] = { _P_NT, _U_NT, 0 };
static short _nts_12[] = { _P_NT, _P_NT, 0 };
static short _nts_13[] = { _F_NT, _F_NT, 0 };
static short _nts_14[] = { _I_NT, _I_NT, 0 };
static short _nts_15[] = { _I_NT, _P_NT, 0 };
static short _nts_16[] = { _U_NT, _P_NT, 0 };
static short _nts_17[] = { _U_NT, _U_NT, 0 };
static short _nts_18[] = { _U_NT, _I_NT, 0 };
static short *_nts[] = {
0, /* 0 */
_nts_0, /* 1 */
_nts_0, /* 2 */
_nts_0, /* 3 */
_nts_0, /* 4 */
_nts_0, /* 5 */
_nts_0, /* 6 */
_nts_0, /* 7 */
_nts_0, /* 8 */
_nts_0, /* 9 */
_nts_1, /* 10 */
_nts_2, /* 11 */
_nts_3, /* 12 */
_nts_0, /* 13 */
_nts_4, /* 14 */
_nts_5, /* 15 */
_nts_1, /* 16 */
_nts_6, /* 17 */
_nts_6, /* 18 */
_nts_6, /* 19 */
_nts_6, /* 20 */
_nts_6, /* 21 */
_nts_6, /* 22 */
_nts_7, /* 23 */
_nts_7, /* 24 */
_nts_7, /* 25 */
_nts_7, /* 26 */
_nts_5, /* 27 */
_nts_4, /* 28 */
_nts_2, /* 29 */
_nts_3, /* 30 */
_nts_0, /* 31 */
_nts_8, /* 32 */
_nts_9, /* 33 */
_nts_10, /* 34 */
_nts_11, /* 35 */
_nts_12, /* 36 */
_nts_0, /* 37 */
_nts_0, /* 38 */
_nts_0, /* 39 */
_nts_0, /* 40 */
_nts_0, /* 41 */
_nts_2, /* 42 */
_nts_3, /* 43 */
_nts_4, /* 44 */
_nts_2, /* 45 */
_nts_3, /* 46 */
_nts_0, /* 47 */
_nts_2, /* 48 */
_nts_4, /* 49 */
_nts_3, /* 50 */
_nts_0, /* 51 */
_nts_4, /* 52 */
_nts_2, /* 53 */
_nts_12, /* 54 */
_nts_0, /* 55 */
_nts_0, /* 56 */
_nts_0, /* 57 */
_nts_0, /* 58 */
_nts_0, /* 59 */
_nts_4, /* 60 */
_nts_2, /* 61 */
_nts_3, /* 62 */
_nts_0, /* 63 */
_nts_7, /* 64 */
_nts_7, /* 65 */
_nts_7, /* 66 */
_nts_7, /* 67 */
_nts_13, /* 68 */
_nts_14, /* 69 */
_nts_10, /* 70 */
_nts_15, /* 71 */
_nts_16, /* 72 */
_nts_11, /* 73 */
_nts_17, /* 74 */
_nts_13, /* 75 */
_nts_14, /* 76 */
_nts_10, /* 77 */
_nts_11, /* 78 */
_nts_17, /* 79 */
_nts_14, /* 80 */
_nts_18, /* 81 */
_nts_14, /* 82 */
_nts_17, /* 83 */
_nts_14, /* 84 */
_nts_18, /* 85 */
_nts_17, /* 86 */
_nts_14, /* 87 */
_nts_3, /* 88 */
_nts_2, /* 89 */
_nts_14, /* 90 */
_nts_17, /* 91 */
_nts_17, /* 92 */
_nts_14, /* 93 */
_nts_13, /* 94 */
_nts_14, /* 95 */
_nts_17, /* 96 */
_nts_13, /* 97 */
_nts_14, /* 98 */
_nts_17, /* 99 */
_nts_13, /* 100 */
_nts_14, /* 101 */
_nts_17, /* 102 */
_nts_13, /* 103 */
_nts_14, /* 104 */
_nts_17, /* 105 */
_nts_13, /* 106 */
_nts_14, /* 107 */
_nts_17, /* 108 */
_nts_13, /* 109 */
_nts_14, /* 110 */
_nts_17, /* 111 */
_nts_13, /* 112 */
_nts_14, /* 113 */
_nts_17, /* 114 */
_nts_13, /* 115 */
_nts_14, /* 116 */
_nts_17, /* 117 */
_nts_0, /* 118 */
_nts_7, /* 119 */
};
static char *_templates[] = {
/* 0 */ 0,
/* 1 */ "", /* stmt: INDIRB(P) */
/* 2 */ "", /* stmt: INDIRF(P) */
/* 3 */ "", /* stmt: INDIRI(P) */
/* 4 */ "", /* stmt: INDIRU(P) */
/* 5 */ "", /* stmt: INDIRP(P) */
/* 6 */ "", /* stmt: CALLF(P) */
/* 7 */ "", /* stmt: CALLI(P) */
/* 8 */ "", /* stmt: CALLU(P) */
/* 9 */ "", /* stmt: CALLP(P) */
/* 10 */ "", /* stmt: V */
/* 11 */ "", /* bogus: I */
/* 12 */ "", /* bogus: U */
/* 13 */ "", /* bogus: P */
/* 14 */ "", /* bogus: F */
/* 15 */ "", /* bogus: B */
/* 16 */ "", /* bogus: V */
/* 17 */ "", /* I: bogus */
/* 18 */ "", /* U: bogus */
/* 19 */ "", /* P: bogus */
/* 20 */ "", /* F: bogus */
/* 21 */ "", /* B: bogus */
/* 22 */ "", /* V: bogus */
/* 23 */ "", /* F: CNSTF */
/* 24 */ "", /* I: CNSTI */
/* 25 */ "", /* P: CNSTP */
/* 26 */ "", /* U: CNSTU */
/* 27 */ "", /* V: ARGB(B) */
/* 28 */ "", /* V: ARGF(F) */
/* 29 */ "", /* V: ARGI(I) */
/* 30 */ "", /* V: ARGU(U) */
/* 31 */ "", /* V: ARGP(P) */
/* 32 */ "", /* V: ASGNB(P,B) */
/* 33 */ "", /* V: ASGNF(P,F) */
/* 34 */ "", /* V: ASGNI(P,I) */
/* 35 */ "", /* V: ASGNU(P,U) */
/* 36 */ "", /* V: ASGNP(P,P) */
/* 37 */ "", /* B: INDIRB(P) */
/* 38 */ "", /* F: INDIRF(P) */
/* 39 */ "", /* I: INDIRI(P) */
/* 40 */ "", /* U: INDIRU(P) */
/* 41 */ "", /* P: INDIRP(P) */
/* 42 */ "", /* I: CVII(I) */
/* 43 */ "", /* I: CVUI(U) */
/* 44 */ "", /* I: CVFI(F) */
/* 45 */ "", /* U: CVIU(I) */
/* 46 */ "", /* U: CVUU(U) */
/* 47 */ "", /* U: CVPU(P) */
/* 48 */ "", /* F: CVIF(I) */
/* 49 */ "", /* F: CVFF(F) */
/* 50 */ "", /* P: CVUP(U) */
/* 51 */ "", /* P: CVPP(P) */
/* 52 */ "", /* F: NEGF(F) */
/* 53 */ "", /* I: NEGI(I) */
/* 54 */ "", /* V: CALLB(P,P) */
/* 55 */ "", /* F: CALLF(P) */
/* 56 */ "", /* I: CALLI(P) */
/* 57 */ "", /* U: CALLU(P) */
/* 58 */ "", /* P: CALLP(P) */
/* 59 */ "", /* V: CALLV(P) */
/* 60 */ "", /* V: RETF(F) */
/* 61 */ "", /* V: RETI(I) */
/* 62 */ "", /* V: RETU(U) */
/* 63 */ "", /* V: RETP(P) */
/* 64 */ "", /* V: RETV */
/* 65 */ "", /* P: ADDRGP */
/* 66 */ "", /* P: ADDRFP */
/* 67 */ "", /* P: ADDRLP */
/* 68 */ "", /* F: ADDF(F,F) */
/* 69 */ "", /* I: ADDI(I,I) */
/* 70 */ "", /* P: ADDP(P,I) */
/* 71 */ "", /* P: ADDP(I,P) */
/* 72 */ "", /* P: ADDP(U,P) */
/* 73 */ "", /* P: ADDP(P,U) */
/* 74 */ "", /* U: ADDU(U,U) */
/* 75 */ "", /* F: SUBF(F,F) */
/* 76 */ "", /* I: SUBI(I,I) */
/* 77 */ "", /* P: SUBP(P,I) */
/* 78 */ "", /* P: SUBP(P,U) */
/* 79 */ "", /* U: SUBU(U,U) */
/* 80 */ "", /* I: LSHI(I,I) */
/* 81 */ "", /* U: LSHU(U,I) */
/* 82 */ "", /* I: MODI(I,I) */
/* 83 */ "", /* U: MODU(U,U) */
/* 84 */ "", /* I: RSHI(I,I) */
/* 85 */ "", /* U: RSHU(U,I) */
/* 86 */ "", /* U: BANDU(U,U) */
/* 87 */ "", /* I: BANDI(I,I) */
/* 88 */ "", /* U: BCOMU(U) */
/* 89 */ "", /* I: BCOMI(I) */
/* 90 */ "", /* I: BORI(I,I) */
/* 91 */ "", /* U: BORU(U,U) */
/* 92 */ "", /* U: BXORU(U,U) */
/* 93 */ "", /* I: BXORI(I,I) */
/* 94 */ "", /* F: DIVF(F,F) */
/* 95 */ "", /* I: DIVI(I,I) */
/* 96 */ "", /* U: DIVU(U,U) */
/* 97 */ "", /* F: MULF(F,F) */
/* 98 */ "", /* I: MULI(I,I) */
/* 99 */ "", /* U: MULU(U,U) */
/* 100 */ "", /* V: EQF(F,F) */
/* 101 */ "", /* V: EQI(I,I) */
/* 102 */ "", /* V: EQU(U,U) */
/* 103 */ "", /* V: GEF(F,F) */
/* 104 */ "", /* V: GEI(I,I) */
/* 105 */ "", /* V: GEU(U,U) */
/* 106 */ "", /* V: GTF(F,F) */
/* 107 */ "", /* V: GTI(I,I) */
/* 108 */ "", /* V: GTU(U,U) */
/* 109 */ "", /* V: LEF(F,F) */
/* 110 */ "", /* V: LEI(I,I) */
/* 111 */ "", /* V: LEU(U,U) */
/* 112 */ "", /* V: LTF(F,F) */
/* 113 */ "", /* V: LTI(I,I) */
/* 114 */ "", /* V: LTU(U,U) */
/* 115 */ "", /* V: NEF(F,F) */
/* 116 */ "", /* V: NEI(I,I) */
/* 117 */ "", /* V: NEU(U,U) */
/* 118 */ "", /* V: JUMPV(P) */
/* 119 */ "", /* V: LABELV */
};
static char _isinstruction[] = {
/* 0 */ 0,
/* 1 */ 0, /* */
/* 2 */ 0, /* */
/* 3 */ 0, /* */
/* 4 */ 0, /* */
/* 5 */ 0, /* */
/* 6 */ 0, /* */
/* 7 */ 0, /* */
/* 8 */ 0, /* */
/* 9 */ 0, /* */
/* 10 */ 0, /* */
/* 11 */ 0, /* */
/* 12 */ 0, /* */
/* 13 */ 0, /* */
/* 14 */ 0, /* */
/* 15 */ 0, /* */
/* 16 */ 0, /* */
/* 17 */ 0, /* */
/* 18 */ 0, /* */
/* 19 */ 0, /* */
/* 20 */ 0, /* */
/* 21 */ 0, /* */
/* 22 */ 0, /* */
/* 23 */ 0, /* */
/* 24 */ 0, /* */
/* 25 */ 0, /* */
/* 26 */ 0, /* */
/* 27 */ 0, /* */
/* 28 */ 0, /* */
/* 29 */ 0, /* */
/* 30 */ 0, /* */
/* 31 */ 0, /* */
/* 32 */ 0, /* */
/* 33 */ 0, /* */
/* 34 */ 0, /* */
/* 35 */ 0, /* */
/* 36 */ 0, /* */
/* 37 */ 0, /* */
/* 38 */ 0, /* */
/* 39 */ 0, /* */
/* 40 */ 0, /* */
/* 41 */ 0, /* */
/* 42 */ 0, /* */
/* 43 */ 0, /* */
/* 44 */ 0, /* */
/* 45 */ 0, /* */
/* 46 */ 0, /* */
/* 47 */ 0, /* */
/* 48 */ 0, /* */
/* 49 */ 0, /* */
/* 50 */ 0, /* */
/* 51 */ 0, /* */
/* 52 */ 0, /* */
/* 53 */ 0, /* */
/* 54 */ 0, /* */
/* 55 */ 0, /* */
/* 56 */ 0, /* */
/* 57 */ 0, /* */
/* 58 */ 0, /* */
/* 59 */ 0, /* */
/* 60 */ 0, /* */
/* 61 */ 0, /* */
/* 62 */ 0, /* */
/* 63 */ 0, /* */
/* 64 */ 0, /* */
/* 65 */ 0, /* */
/* 66 */ 0, /* */
/* 67 */ 0, /* */
/* 68 */ 0, /* */
/* 69 */ 0, /* */
/* 70 */ 0, /* */
/* 71 */ 0, /* */
/* 72 */ 0, /* */
/* 73 */ 0, /* */
/* 74 */ 0, /* */
/* 75 */ 0, /* */
/* 76 */ 0, /* */
/* 77 */ 0, /* */
/* 78 */ 0, /* */
/* 79 */ 0, /* */
/* 80 */ 0, /* */
/* 81 */ 0, /* */
/* 82 */ 0, /* */
/* 83 */ 0, /* */
/* 84 */ 0, /* */
/* 85 */ 0, /* */
/* 86 */ 0, /* */
/* 87 */ 0, /* */
/* 88 */ 0, /* */
/* 89 */ 0, /* */
/* 90 */ 0, /* */
/* 91 */ 0, /* */
/* 92 */ 0, /* */
/* 93 */ 0, /* */
/* 94 */ 0, /* */
/* 95 */ 0, /* */
/* 96 */ 0, /* */
/* 97 */ 0, /* */
/* 98 */ 0, /* */
/* 99 */ 0, /* */
/* 100 */ 0, /* */
/* 101 */ 0, /* */
/* 102 */ 0, /* */
/* 103 */ 0, /* */
/* 104 */ 0, /* */
/* 105 */ 0, /* */
/* 106 */ 0, /* */
/* 107 */ 0, /* */
/* 108 */ 0, /* */
/* 109 */ 0, /* */
/* 110 */ 0, /* */
/* 111 */ 0, /* */
/* 112 */ 0, /* */
/* 113 */ 0, /* */
/* 114 */ 0, /* */
/* 115 */ 0, /* */
/* 116 */ 0, /* */
/* 117 */ 0, /* */
/* 118 */ 0, /* */
/* 119 */ 0, /* */
};
static char *_string[] = {
/* 0 */ 0,
/* 1 */ "stmt: INDIRB(P)",
/* 2 */ "stmt: INDIRF(P)",
/* 3 */ "stmt: INDIRI(P)",
/* 4 */ "stmt: INDIRU(P)",
/* 5 */ "stmt: INDIRP(P)",
/* 6 */ "stmt: CALLF(P)",
/* 7 */ "stmt: CALLI(P)",
/* 8 */ "stmt: CALLU(P)",
/* 9 */ "stmt: CALLP(P)",
/* 10 */ "stmt: V",
/* 11 */ "bogus: I",
/* 12 */ "bogus: U",
/* 13 */ "bogus: P",
/* 14 */ "bogus: F",
/* 15 */ "bogus: B",
/* 16 */ "bogus: V",
/* 17 */ "I: bogus",
/* 18 */ "U: bogus",
/* 19 */ "P: bogus",
/* 20 */ "F: bogus",
/* 21 */ "B: bogus",
/* 22 */ "V: bogus",
/* 23 */ "F: CNSTF",
/* 24 */ "I: CNSTI",
/* 25 */ "P: CNSTP",
/* 26 */ "U: CNSTU",
/* 27 */ "V: ARGB(B)",
/* 28 */ "V: ARGF(F)",
/* 29 */ "V: ARGI(I)",
/* 30 */ "V: ARGU(U)",
/* 31 */ "V: ARGP(P)",
/* 32 */ "V: ASGNB(P,B)",
/* 33 */ "V: ASGNF(P,F)",
/* 34 */ "V: ASGNI(P,I)",
/* 35 */ "V: ASGNU(P,U)",
/* 36 */ "V: ASGNP(P,P)",
/* 37 */ "B: INDIRB(P)",
/* 38 */ "F: INDIRF(P)",
/* 39 */ "I: INDIRI(P)",
/* 40 */ "U: INDIRU(P)",
/* 41 */ "P: INDIRP(P)",
/* 42 */ "I: CVII(I)",
/* 43 */ "I: CVUI(U)",
/* 44 */ "I: CVFI(F)",
/* 45 */ "U: CVIU(I)",
/* 46 */ "U: CVUU(U)",
/* 47 */ "U: CVPU(P)",
/* 48 */ "F: CVIF(I)",
/* 49 */ "F: CVFF(F)",
/* 50 */ "P: CVUP(U)",
/* 51 */ "P: CVPP(P)",
/* 52 */ "F: NEGF(F)",
/* 53 */ "I: NEGI(I)",
/* 54 */ "V: CALLB(P,P)",
/* 55 */ "F: CALLF(P)",
/* 56 */ "I: CALLI(P)",
/* 57 */ "U: CALLU(P)",
/* 58 */ "P: CALLP(P)",
/* 59 */ "V: CALLV(P)",
/* 60 */ "V: RETF(F)",
/* 61 */ "V: RETI(I)",
/* 62 */ "V: RETU(U)",
/* 63 */ "V: RETP(P)",
/* 64 */ "V: RETV",
/* 65 */ "P: ADDRGP",
/* 66 */ "P: ADDRFP",
/* 67 */ "P: ADDRLP",
/* 68 */ "F: ADDF(F,F)",
/* 69 */ "I: ADDI(I,I)",
/* 70 */ "P: ADDP(P,I)",
/* 71 */ "P: ADDP(I,P)",
/* 72 */ "P: ADDP(U,P)",
/* 73 */ "P: ADDP(P,U)",
/* 74 */ "U: ADDU(U,U)",
/* 75 */ "F: SUBF(F,F)",
/* 76 */ "I: SUBI(I,I)",
/* 77 */ "P: SUBP(P,I)",
/* 78 */ "P: SUBP(P,U)",
/* 79 */ "U: SUBU(U,U)",
/* 80 */ "I: LSHI(I,I)",
/* 81 */ "U: LSHU(U,I)",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -