IMM2_SIZE = 2
LINK_SIZE = 2

OP_END = 0
OP_SOD = 1
OP_SOM = 2
OP_SET_SOM = 3
OP_NOT_WORD_BOUNDARY = 4
OP_WORD_BOUNDARY = 5
OP_NOT_DIGIT = 6
OP_DIGIT = 7
OP_NOT_WHITESPACE = 8
OP_WHITESPACE = 9
OP_NOT_WORDCHAR = 10
OP_WORDCHAR = 11
OP_ANY = 12
OP_ALLANY = 13
OP_ANYBYTE = 14
OP_NOTPROP = 15
OP_PROP = 16
OP_ANYNL = 17
OP_NOT_HSPACE = 18
OP_HSPACE = 19
OP_NOT_VSPACE = 20
OP_VSPACE = 21
OP_EXTUNI = 22
OP_EODN = 23
OP_EOD = 24
OP_DOLL = 25
OP_DOLLM = 26
OP_CIRC = 27
OP_CIRCM = 28
OP_CHAR = 29
OP_CHARI = 30
OP_NOT = 31
OP_NOTI = 32
OP_STAR = 33
OP_MINSTAR = 34
OP_PLUS = 35
OP_MINPLUS = 36
OP_QUERY = 37
OP_MINQUERY = 38
OP_UPTO = 39
OP_MINUPTO = 40
OP_EXACT = 41
OP_POSSTAR = 42
OP_POSPLUS = 43
OP_POSQUERY = 44
OP_POSUPTO = 45
OP_STARI = 46
OP_MINSTARI = 47
OP_PLUSI = 48
OP_MINPLUSI = 49
OP_QUERYI = 50
OP_MINQUERYI = 51
OP_UPTOI = 52
OP_MINUPTOI = 53
OP_EXACTI = 54
OP_POSSTARI = 55
OP_POSPLUSI = 56
OP_POSQUERYI = 57
OP_POSUPTOI = 58
OP_NOTSTAR = 59
OP_NOTMINSTAR = 60
OP_NOTPLUS = 61
OP_NOTMINPLUS = 62
OP_NOTQUERY = 63
OP_NOTMINQUERY = 64
OP_NOTUPTO = 65
OP_NOTMINUPTO = 66
OP_NOTEXACT = 67
OP_NOTPOSSTAR = 68
OP_NOTPOSPLUS = 69
OP_NOTPOSQUERY = 70
OP_NOTPOSUPTO = 71
OP_NOTSTARI = 72
OP_NOTMINSTARI = 73
OP_NOTPLUSI = 74
OP_NOTMINPLUSI = 75
OP_NOTQUERYI = 76
OP_NOTMINQUERYI = 77
OP_NOTUPTOI = 78
OP_NOTMINUPTOI = 79
OP_NOTEXACTI = 80
OP_NOTPOSSTARI = 81
OP_NOTPOSPLUSI = 82
OP_NOTPOSQUERYI = 83
OP_NOTPOSUPTOI = 84
OP_TYPESTAR = 85
OP_TYPEMINSTAR = 86
OP_TYPEPLUS = 87
OP_TYPEMINPLUS = 88
OP_TYPEQUERY = 89
OP_TYPEMINQUERY = 90
OP_TYPEUPTO = 91
OP_TYPEMINUPTO = 92
OP_TYPEEXACT = 93
OP_TYPEPOSSTAR = 94
OP_TYPEPOSPLUS = 95
OP_TYPEPOSQUERY = 96
OP_TYPEPOSUPTO = 97
OP_CRSTAR = 98
OP_CRMINSTAR = 99
OP_CRPLUS = 100
OP_CRMINPLUS = 101
OP_CRQUERY = 102
OP_CRMINQUERY = 103
OP_CRRANGE = 104
OP_CRMINRANGE = 105
OP_CRPOSSTAR = 106
OP_CRPOSPLUS = 107
OP_CRPOSQUERY = 108
OP_CRPOSRANGE = 109
OP_CLASS = 110
OP_NCLASS = 111
OP_XCLASS = 112
OP_REF = 113
OP_REFI = 114
OP_DNREF = 115
OP_DNREFI = 116
OP_RECURSE = 117
OP_CALLOUT = 118
OP_ALT = 119
OP_KET = 120
OP_KETRMAX = 121
OP_KETRMIN = 122
OP_KETRPOS = 123
OP_REVERSE = 124
OP_ASSERT = 125
OP_ASSERT_NOT = 126
OP_ASSERTBACK = 127
OP_ASSERTBACK_NOT = 128
OP_ONCE = 129
OP_ONCE_NC = 130
OP_BRA = 131
OP_BRAPOS = 132
OP_CBRA = 133
OP_CBRAPOS = 134
OP_COND = 135
OP_SBRA = 136
OP_SBRAPOS = 137
OP_SCBRA = 138
OP_SCBRAPOS = 139
OP_SCOND = 140
OP_CREF = 141
OP_DNCREF = 142
OP_RREF = 143
OP_DNRREF = 144
OP_DEF = 145
OP_BRAZERO = 146
OP_BRAMINZERO = 147
OP_BRAPOSZERO = 148
OP_MARK = 149
OP_PRUNE = 150
OP_PRUNE_ARG = 151
OP_SKIP = 152
OP_SKIP_ARG = 153
OP_THEN = 154
OP_THEN_ARG = 155
OP_COMMIT = 156
OP_FAIL = 157
OP_ACCEPT = 158
OP_ASSERT_ACCEPT = 159
OP_CLOSE = 160
OP_SKIPZERO = 161

OPLEN = [
    1,
    1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1,
    1, 1, 1,
    3, 3,
    1, 1, 1, 1, 1,
    1,
    1, 1, 1, 1, 1, 1,
    2,
    2,
    2,
    2,
    2, 2, 2, 2, 2, 2,
    2 + IMM2_SIZE, 2 + IMM2_SIZE,
    2 + IMM2_SIZE,
    2, 2, 2, 2 + IMM2_SIZE,
    2, 2, 2, 2, 2, 2,
    2 + IMM2_SIZE, 2 + IMM2_SIZE,
    2 + IMM2_SIZE,
    2, 2, 2, 2 + IMM2_SIZE,
    2, 2, 2, 2, 2, 2,
    2 + IMM2_SIZE, 2 + IMM2_SIZE,
    2 + IMM2_SIZE,
    2, 2, 2, 2 + IMM2_SIZE,
    2, 2, 2, 2, 2, 2,
    2 + IMM2_SIZE, 2 + IMM2_SIZE,
    2 + IMM2_SIZE,
    2, 2, 2, 2 + IMM2_SIZE,
    2, 2, 2, 2, 2, 2,
    2 + IMM2_SIZE, 2 + IMM2_SIZE,
    2 + IMM2_SIZE,
    2, 2, 2, 2 + IMM2_SIZE,
    1, 1, 1, 1, 1, 1,
    1 + 2 * IMM2_SIZE, 1 + 2 * IMM2_SIZE,
    1, 1, 1, 1 + 2 * IMM2_SIZE,
    1 + (32 / 1),
    1 + (32 / 1),
    0,
    1 + IMM2_SIZE,
    1 + IMM2_SIZE,
    1 + 2 * IMM2_SIZE,
    1 + 2 * IMM2_SIZE,
    1 + LINK_SIZE,
    2 + 2 * LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE + IMM2_SIZE,
    1 + LINK_SIZE + IMM2_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE,
    1 + LINK_SIZE + IMM2_SIZE,
    1 + LINK_SIZE + IMM2_SIZE,
    1 + LINK_SIZE,
    1 + IMM2_SIZE, 1 + 2 * IMM2_SIZE,
    1 + IMM2_SIZE, 1 + 2 * IMM2_SIZE,
    1,
    1, 1, 1,
    3, 1, 3,
    1, 3,
    1, 3,
    1, 1, 1, 1,
    1 + IMM2_SIZE, 1
]
