Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | //--------------------------------------------------------------------------------- |
michael@0 | 2 | // |
michael@0 | 3 | // Generated Header File. Do not edit by hand. |
michael@0 | 4 | // This file contains the state table for the ICU Rule Based Break Iterator |
michael@0 | 5 | // rule parser. |
michael@0 | 6 | // It is generated by the Perl script "rbbicst.pl" from |
michael@0 | 7 | // the rule parser state definitions file "rbbirpt.txt". |
michael@0 | 8 | // |
michael@0 | 9 | // Copyright (C) 2002-2005 International Business Machines Corporation |
michael@0 | 10 | // and others. All rights reserved. |
michael@0 | 11 | // |
michael@0 | 12 | //--------------------------------------------------------------------------------- |
michael@0 | 13 | #ifndef RBBIRPT_H |
michael@0 | 14 | #define RBBIRPT_H |
michael@0 | 15 | |
michael@0 | 16 | U_NAMESPACE_BEGIN |
michael@0 | 17 | // |
michael@0 | 18 | // Character classes for RBBI rule scanning. |
michael@0 | 19 | // |
michael@0 | 20 | static const uint8_t kRuleSet_digit_char = 128; |
michael@0 | 21 | static const uint8_t kRuleSet_name_char = 129; |
michael@0 | 22 | static const uint8_t kRuleSet_name_start_char = 130; |
michael@0 | 23 | static const uint8_t kRuleSet_rule_char = 131; |
michael@0 | 24 | static const uint8_t kRuleSet_white_space = 132; |
michael@0 | 25 | |
michael@0 | 26 | |
michael@0 | 27 | enum RBBI_RuleParseAction { |
michael@0 | 28 | doCheckVarDef, |
michael@0 | 29 | doDotAny, |
michael@0 | 30 | doEndAssign, |
michael@0 | 31 | doEndOfRule, |
michael@0 | 32 | doEndVariableName, |
michael@0 | 33 | doExit, |
michael@0 | 34 | doExprCatOperator, |
michael@0 | 35 | doExprFinished, |
michael@0 | 36 | doExprOrOperator, |
michael@0 | 37 | doExprRParen, |
michael@0 | 38 | doExprStart, |
michael@0 | 39 | doLParen, |
michael@0 | 40 | doNOP, |
michael@0 | 41 | doOptionEnd, |
michael@0 | 42 | doOptionStart, |
michael@0 | 43 | doReverseDir, |
michael@0 | 44 | doRuleChar, |
michael@0 | 45 | doRuleError, |
michael@0 | 46 | doRuleErrorAssignExpr, |
michael@0 | 47 | doScanUnicodeSet, |
michael@0 | 48 | doSlash, |
michael@0 | 49 | doStartAssign, |
michael@0 | 50 | doStartTagValue, |
michael@0 | 51 | doStartVariableName, |
michael@0 | 52 | doTagDigit, |
michael@0 | 53 | doTagExpectedError, |
michael@0 | 54 | doTagValue, |
michael@0 | 55 | doUnaryOpPlus, |
michael@0 | 56 | doUnaryOpQuestion, |
michael@0 | 57 | doUnaryOpStar, |
michael@0 | 58 | doVariableNameExpectedErr, |
michael@0 | 59 | rbbiLastAction}; |
michael@0 | 60 | |
michael@0 | 61 | //------------------------------------------------------------------------------- |
michael@0 | 62 | // |
michael@0 | 63 | // RBBIRuleTableEl represents the structure of a row in the transition table |
michael@0 | 64 | // for the rule parser state machine. |
michael@0 | 65 | //------------------------------------------------------------------------------- |
michael@0 | 66 | struct RBBIRuleTableEl { |
michael@0 | 67 | RBBI_RuleParseAction fAction; |
michael@0 | 68 | uint8_t fCharClass; // 0-127: an individual ASCII character |
michael@0 | 69 | // 128-255: character class index |
michael@0 | 70 | uint8_t fNextState; // 0-250: normal next-stat numbers |
michael@0 | 71 | // 255: pop next-state from stack. |
michael@0 | 72 | uint8_t fPushState; |
michael@0 | 73 | UBool fNextChar; |
michael@0 | 74 | }; |
michael@0 | 75 | |
michael@0 | 76 | static const struct RBBIRuleTableEl gRuleParseStateTable[] = { |
michael@0 | 77 | {doNOP, 0, 0, 0, TRUE} |
michael@0 | 78 | , {doExprStart, 254, 21, 8, FALSE} // 1 start |
michael@0 | 79 | , {doNOP, 132, 1,0, TRUE} // 2 |
michael@0 | 80 | , {doExprStart, 36 /* $ */, 80, 90, FALSE} // 3 |
michael@0 | 81 | , {doNOP, 33 /* ! */, 11,0, TRUE} // 4 |
michael@0 | 82 | , {doNOP, 59 /* ; */, 1,0, TRUE} // 5 |
michael@0 | 83 | , {doNOP, 252, 0,0, FALSE} // 6 |
michael@0 | 84 | , {doExprStart, 255, 21, 8, FALSE} // 7 |
michael@0 | 85 | , {doEndOfRule, 59 /* ; */, 1,0, TRUE} // 8 break-rule-end |
michael@0 | 86 | , {doNOP, 132, 8,0, TRUE} // 9 |
michael@0 | 87 | , {doRuleError, 255, 95,0, FALSE} // 10 |
michael@0 | 88 | , {doNOP, 33 /* ! */, 13,0, TRUE} // 11 rev-option |
michael@0 | 89 | , {doReverseDir, 255, 20, 8, FALSE} // 12 |
michael@0 | 90 | , {doOptionStart, 130, 15,0, TRUE} // 13 option-scan1 |
michael@0 | 91 | , {doRuleError, 255, 95,0, FALSE} // 14 |
michael@0 | 92 | , {doNOP, 129, 15,0, TRUE} // 15 option-scan2 |
michael@0 | 93 | , {doOptionEnd, 255, 17,0, FALSE} // 16 |
michael@0 | 94 | , {doNOP, 59 /* ; */, 1,0, TRUE} // 17 option-scan3 |
michael@0 | 95 | , {doNOP, 132, 17,0, TRUE} // 18 |
michael@0 | 96 | , {doRuleError, 255, 95,0, FALSE} // 19 |
michael@0 | 97 | , {doExprStart, 255, 21, 8, FALSE} // 20 reverse-rule |
michael@0 | 98 | , {doRuleChar, 254, 30,0, TRUE} // 21 term |
michael@0 | 99 | , {doNOP, 132, 21,0, TRUE} // 22 |
michael@0 | 100 | , {doRuleChar, 131, 30,0, TRUE} // 23 |
michael@0 | 101 | , {doNOP, 91 /* [ */, 86, 30, FALSE} // 24 |
michael@0 | 102 | , {doLParen, 40 /* ( */, 21, 30, TRUE} // 25 |
michael@0 | 103 | , {doNOP, 36 /* $ */, 80, 29, FALSE} // 26 |
michael@0 | 104 | , {doDotAny, 46 /* . */, 30,0, TRUE} // 27 |
michael@0 | 105 | , {doRuleError, 255, 95,0, FALSE} // 28 |
michael@0 | 106 | , {doCheckVarDef, 255, 30,0, FALSE} // 29 term-var-ref |
michael@0 | 107 | , {doNOP, 132, 30,0, TRUE} // 30 expr-mod |
michael@0 | 108 | , {doUnaryOpStar, 42 /* * */, 35,0, TRUE} // 31 |
michael@0 | 109 | , {doUnaryOpPlus, 43 /* + */, 35,0, TRUE} // 32 |
michael@0 | 110 | , {doUnaryOpQuestion, 63 /* ? */, 35,0, TRUE} // 33 |
michael@0 | 111 | , {doNOP, 255, 35,0, FALSE} // 34 |
michael@0 | 112 | , {doExprCatOperator, 254, 21,0, FALSE} // 35 expr-cont |
michael@0 | 113 | , {doNOP, 132, 35,0, TRUE} // 36 |
michael@0 | 114 | , {doExprCatOperator, 131, 21,0, FALSE} // 37 |
michael@0 | 115 | , {doExprCatOperator, 91 /* [ */, 21,0, FALSE} // 38 |
michael@0 | 116 | , {doExprCatOperator, 40 /* ( */, 21,0, FALSE} // 39 |
michael@0 | 117 | , {doExprCatOperator, 36 /* $ */, 21,0, FALSE} // 40 |
michael@0 | 118 | , {doExprCatOperator, 46 /* . */, 21,0, FALSE} // 41 |
michael@0 | 119 | , {doExprCatOperator, 47 /* / */, 47,0, FALSE} // 42 |
michael@0 | 120 | , {doExprCatOperator, 123 /* { */, 59,0, TRUE} // 43 |
michael@0 | 121 | , {doExprOrOperator, 124 /* | */, 21,0, TRUE} // 44 |
michael@0 | 122 | , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 45 |
michael@0 | 123 | , {doExprFinished, 255, 255,0, FALSE} // 46 |
michael@0 | 124 | , {doSlash, 47 /* / */, 49,0, TRUE} // 47 look-ahead |
michael@0 | 125 | , {doNOP, 255, 95,0, FALSE} // 48 |
michael@0 | 126 | , {doExprCatOperator, 254, 21,0, FALSE} // 49 expr-cont-no-slash |
michael@0 | 127 | , {doNOP, 132, 35,0, TRUE} // 50 |
michael@0 | 128 | , {doExprCatOperator, 131, 21,0, FALSE} // 51 |
michael@0 | 129 | , {doExprCatOperator, 91 /* [ */, 21,0, FALSE} // 52 |
michael@0 | 130 | , {doExprCatOperator, 40 /* ( */, 21,0, FALSE} // 53 |
michael@0 | 131 | , {doExprCatOperator, 36 /* $ */, 21,0, FALSE} // 54 |
michael@0 | 132 | , {doExprCatOperator, 46 /* . */, 21,0, FALSE} // 55 |
michael@0 | 133 | , {doExprOrOperator, 124 /* | */, 21,0, TRUE} // 56 |
michael@0 | 134 | , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 57 |
michael@0 | 135 | , {doExprFinished, 255, 255,0, FALSE} // 58 |
michael@0 | 136 | , {doNOP, 132, 59,0, TRUE} // 59 tag-open |
michael@0 | 137 | , {doStartTagValue, 128, 62,0, FALSE} // 60 |
michael@0 | 138 | , {doTagExpectedError, 255, 95,0, FALSE} // 61 |
michael@0 | 139 | , {doNOP, 132, 66,0, TRUE} // 62 tag-value |
michael@0 | 140 | , {doNOP, 125 /* } */, 66,0, FALSE} // 63 |
michael@0 | 141 | , {doTagDigit, 128, 62,0, TRUE} // 64 |
michael@0 | 142 | , {doTagExpectedError, 255, 95,0, FALSE} // 65 |
michael@0 | 143 | , {doNOP, 132, 66,0, TRUE} // 66 tag-close |
michael@0 | 144 | , {doTagValue, 125 /* } */, 69,0, TRUE} // 67 |
michael@0 | 145 | , {doTagExpectedError, 255, 95,0, FALSE} // 68 |
michael@0 | 146 | , {doExprCatOperator, 254, 21,0, FALSE} // 69 expr-cont-no-tag |
michael@0 | 147 | , {doNOP, 132, 69,0, TRUE} // 70 |
michael@0 | 148 | , {doExprCatOperator, 131, 21,0, FALSE} // 71 |
michael@0 | 149 | , {doExprCatOperator, 91 /* [ */, 21,0, FALSE} // 72 |
michael@0 | 150 | , {doExprCatOperator, 40 /* ( */, 21,0, FALSE} // 73 |
michael@0 | 151 | , {doExprCatOperator, 36 /* $ */, 21,0, FALSE} // 74 |
michael@0 | 152 | , {doExprCatOperator, 46 /* . */, 21,0, FALSE} // 75 |
michael@0 | 153 | , {doExprCatOperator, 47 /* / */, 47,0, FALSE} // 76 |
michael@0 | 154 | , {doExprOrOperator, 124 /* | */, 21,0, TRUE} // 77 |
michael@0 | 155 | , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 78 |
michael@0 | 156 | , {doExprFinished, 255, 255,0, FALSE} // 79 |
michael@0 | 157 | , {doStartVariableName, 36 /* $ */, 82,0, TRUE} // 80 scan-var-name |
michael@0 | 158 | , {doNOP, 255, 95,0, FALSE} // 81 |
michael@0 | 159 | , {doNOP, 130, 84,0, TRUE} // 82 scan-var-start |
michael@0 | 160 | , {doVariableNameExpectedErr, 255, 95,0, FALSE} // 83 |
michael@0 | 161 | , {doNOP, 129, 84,0, TRUE} // 84 scan-var-body |
michael@0 | 162 | , {doEndVariableName, 255, 255,0, FALSE} // 85 |
michael@0 | 163 | , {doScanUnicodeSet, 91 /* [ */, 255,0, TRUE} // 86 scan-unicode-set |
michael@0 | 164 | , {doScanUnicodeSet, 112 /* p */, 255,0, TRUE} // 87 |
michael@0 | 165 | , {doScanUnicodeSet, 80 /* P */, 255,0, TRUE} // 88 |
michael@0 | 166 | , {doNOP, 255, 95,0, FALSE} // 89 |
michael@0 | 167 | , {doNOP, 132, 90,0, TRUE} // 90 assign-or-rule |
michael@0 | 168 | , {doStartAssign, 61 /* = */, 21, 93, TRUE} // 91 |
michael@0 | 169 | , {doNOP, 255, 29, 8, FALSE} // 92 |
michael@0 | 170 | , {doEndAssign, 59 /* ; */, 1,0, TRUE} // 93 assign-end |
michael@0 | 171 | , {doRuleErrorAssignExpr, 255, 95,0, FALSE} // 94 |
michael@0 | 172 | , {doExit, 255, 95,0, TRUE} // 95 errorDeath |
michael@0 | 173 | }; |
michael@0 | 174 | #ifdef RBBI_DEBUG |
michael@0 | 175 | static const char * const RBBIRuleStateNames[] = { 0, |
michael@0 | 176 | "start", |
michael@0 | 177 | 0, |
michael@0 | 178 | 0, |
michael@0 | 179 | 0, |
michael@0 | 180 | 0, |
michael@0 | 181 | 0, |
michael@0 | 182 | 0, |
michael@0 | 183 | "break-rule-end", |
michael@0 | 184 | 0, |
michael@0 | 185 | 0, |
michael@0 | 186 | "rev-option", |
michael@0 | 187 | 0, |
michael@0 | 188 | "option-scan1", |
michael@0 | 189 | 0, |
michael@0 | 190 | "option-scan2", |
michael@0 | 191 | 0, |
michael@0 | 192 | "option-scan3", |
michael@0 | 193 | 0, |
michael@0 | 194 | 0, |
michael@0 | 195 | "reverse-rule", |
michael@0 | 196 | "term", |
michael@0 | 197 | 0, |
michael@0 | 198 | 0, |
michael@0 | 199 | 0, |
michael@0 | 200 | 0, |
michael@0 | 201 | 0, |
michael@0 | 202 | 0, |
michael@0 | 203 | 0, |
michael@0 | 204 | "term-var-ref", |
michael@0 | 205 | "expr-mod", |
michael@0 | 206 | 0, |
michael@0 | 207 | 0, |
michael@0 | 208 | 0, |
michael@0 | 209 | 0, |
michael@0 | 210 | "expr-cont", |
michael@0 | 211 | 0, |
michael@0 | 212 | 0, |
michael@0 | 213 | 0, |
michael@0 | 214 | 0, |
michael@0 | 215 | 0, |
michael@0 | 216 | 0, |
michael@0 | 217 | 0, |
michael@0 | 218 | 0, |
michael@0 | 219 | 0, |
michael@0 | 220 | 0, |
michael@0 | 221 | 0, |
michael@0 | 222 | "look-ahead", |
michael@0 | 223 | 0, |
michael@0 | 224 | "expr-cont-no-slash", |
michael@0 | 225 | 0, |
michael@0 | 226 | 0, |
michael@0 | 227 | 0, |
michael@0 | 228 | 0, |
michael@0 | 229 | 0, |
michael@0 | 230 | 0, |
michael@0 | 231 | 0, |
michael@0 | 232 | 0, |
michael@0 | 233 | 0, |
michael@0 | 234 | "tag-open", |
michael@0 | 235 | 0, |
michael@0 | 236 | 0, |
michael@0 | 237 | "tag-value", |
michael@0 | 238 | 0, |
michael@0 | 239 | 0, |
michael@0 | 240 | 0, |
michael@0 | 241 | "tag-close", |
michael@0 | 242 | 0, |
michael@0 | 243 | 0, |
michael@0 | 244 | "expr-cont-no-tag", |
michael@0 | 245 | 0, |
michael@0 | 246 | 0, |
michael@0 | 247 | 0, |
michael@0 | 248 | 0, |
michael@0 | 249 | 0, |
michael@0 | 250 | 0, |
michael@0 | 251 | 0, |
michael@0 | 252 | 0, |
michael@0 | 253 | 0, |
michael@0 | 254 | 0, |
michael@0 | 255 | "scan-var-name", |
michael@0 | 256 | 0, |
michael@0 | 257 | "scan-var-start", |
michael@0 | 258 | 0, |
michael@0 | 259 | "scan-var-body", |
michael@0 | 260 | 0, |
michael@0 | 261 | "scan-unicode-set", |
michael@0 | 262 | 0, |
michael@0 | 263 | 0, |
michael@0 | 264 | 0, |
michael@0 | 265 | "assign-or-rule", |
michael@0 | 266 | 0, |
michael@0 | 267 | 0, |
michael@0 | 268 | "assign-end", |
michael@0 | 269 | 0, |
michael@0 | 270 | "errorDeath", |
michael@0 | 271 | 0}; |
michael@0 | 272 | #endif |
michael@0 | 273 | |
michael@0 | 274 | U_NAMESPACE_END |
michael@0 | 275 | #endif |