intl/icu/source/common/rbbirpt.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/common/rbbirpt.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,275 @@
     1.4 +//---------------------------------------------------------------------------------
     1.5 +//
     1.6 +// Generated Header File.  Do not edit by hand.
     1.7 +//    This file contains the state table for the ICU Rule Based Break Iterator
     1.8 +//    rule parser.
     1.9 +//    It is generated by the Perl script "rbbicst.pl" from
    1.10 +//    the rule parser state definitions file "rbbirpt.txt".
    1.11 +//
    1.12 +//   Copyright (C) 2002-2005 International Business Machines Corporation 
    1.13 +//   and others. All rights reserved.  
    1.14 +//
    1.15 +//---------------------------------------------------------------------------------
    1.16 +#ifndef RBBIRPT_H
    1.17 +#define RBBIRPT_H
    1.18 +
    1.19 +U_NAMESPACE_BEGIN
    1.20 +//
    1.21 +// Character classes for RBBI rule scanning.
    1.22 +//
    1.23 +    static const uint8_t kRuleSet_digit_char = 128;
    1.24 +    static const uint8_t kRuleSet_name_char = 129;
    1.25 +    static const uint8_t kRuleSet_name_start_char = 130;
    1.26 +    static const uint8_t kRuleSet_rule_char = 131;
    1.27 +    static const uint8_t kRuleSet_white_space = 132;
    1.28 +
    1.29 +
    1.30 +enum RBBI_RuleParseAction {
    1.31 +    doCheckVarDef,
    1.32 +    doDotAny,
    1.33 +    doEndAssign,
    1.34 +    doEndOfRule,
    1.35 +    doEndVariableName,
    1.36 +    doExit,
    1.37 +    doExprCatOperator,
    1.38 +    doExprFinished,
    1.39 +    doExprOrOperator,
    1.40 +    doExprRParen,
    1.41 +    doExprStart,
    1.42 +    doLParen,
    1.43 +    doNOP,
    1.44 +    doOptionEnd,
    1.45 +    doOptionStart,
    1.46 +    doReverseDir,
    1.47 +    doRuleChar,
    1.48 +    doRuleError,
    1.49 +    doRuleErrorAssignExpr,
    1.50 +    doScanUnicodeSet,
    1.51 +    doSlash,
    1.52 +    doStartAssign,
    1.53 +    doStartTagValue,
    1.54 +    doStartVariableName,
    1.55 +    doTagDigit,
    1.56 +    doTagExpectedError,
    1.57 +    doTagValue,
    1.58 +    doUnaryOpPlus,
    1.59 +    doUnaryOpQuestion,
    1.60 +    doUnaryOpStar,
    1.61 +    doVariableNameExpectedErr,
    1.62 +    rbbiLastAction};
    1.63 +
    1.64 +//-------------------------------------------------------------------------------
    1.65 +//
    1.66 +//  RBBIRuleTableEl    represents the structure of a row in the transition table
    1.67 +//                     for the rule parser state machine.
    1.68 +//-------------------------------------------------------------------------------
    1.69 +struct RBBIRuleTableEl {
    1.70 +    RBBI_RuleParseAction          fAction;
    1.71 +    uint8_t                       fCharClass;       // 0-127:    an individual ASCII character
    1.72 +                                                    // 128-255:  character class index
    1.73 +    uint8_t                       fNextState;       // 0-250:    normal next-stat numbers
    1.74 +                                                    // 255:      pop next-state from stack.
    1.75 +    uint8_t                       fPushState;
    1.76 +    UBool                         fNextChar;
    1.77 +};
    1.78 +
    1.79 +static const struct RBBIRuleTableEl gRuleParseStateTable[] = {
    1.80 +    {doNOP, 0, 0, 0, TRUE}
    1.81 +    , {doExprStart, 254, 21, 8, FALSE}     //  1      start
    1.82 +    , {doNOP, 132, 1,0,  TRUE}     //  2 
    1.83 +    , {doExprStart, 36 /* $ */, 80, 90, FALSE}     //  3 
    1.84 +    , {doNOP, 33 /* ! */, 11,0,  TRUE}     //  4 
    1.85 +    , {doNOP, 59 /* ; */, 1,0,  TRUE}     //  5 
    1.86 +    , {doNOP, 252, 0,0,  FALSE}     //  6 
    1.87 +    , {doExprStart, 255, 21, 8, FALSE}     //  7 
    1.88 +    , {doEndOfRule, 59 /* ; */, 1,0,  TRUE}     //  8      break-rule-end
    1.89 +    , {doNOP, 132, 8,0,  TRUE}     //  9 
    1.90 +    , {doRuleError, 255, 95,0,  FALSE}     //  10 
    1.91 +    , {doNOP, 33 /* ! */, 13,0,  TRUE}     //  11      rev-option
    1.92 +    , {doReverseDir, 255, 20, 8, FALSE}     //  12 
    1.93 +    , {doOptionStart, 130, 15,0,  TRUE}     //  13      option-scan1
    1.94 +    , {doRuleError, 255, 95,0,  FALSE}     //  14 
    1.95 +    , {doNOP, 129, 15,0,  TRUE}     //  15      option-scan2
    1.96 +    , {doOptionEnd, 255, 17,0,  FALSE}     //  16 
    1.97 +    , {doNOP, 59 /* ; */, 1,0,  TRUE}     //  17      option-scan3
    1.98 +    , {doNOP, 132, 17,0,  TRUE}     //  18 
    1.99 +    , {doRuleError, 255, 95,0,  FALSE}     //  19 
   1.100 +    , {doExprStart, 255, 21, 8, FALSE}     //  20      reverse-rule
   1.101 +    , {doRuleChar, 254, 30,0,  TRUE}     //  21      term
   1.102 +    , {doNOP, 132, 21,0,  TRUE}     //  22 
   1.103 +    , {doRuleChar, 131, 30,0,  TRUE}     //  23 
   1.104 +    , {doNOP, 91 /* [ */, 86, 30, FALSE}     //  24 
   1.105 +    , {doLParen, 40 /* ( */, 21, 30, TRUE}     //  25 
   1.106 +    , {doNOP, 36 /* $ */, 80, 29, FALSE}     //  26 
   1.107 +    , {doDotAny, 46 /* . */, 30,0,  TRUE}     //  27 
   1.108 +    , {doRuleError, 255, 95,0,  FALSE}     //  28 
   1.109 +    , {doCheckVarDef, 255, 30,0,  FALSE}     //  29      term-var-ref
   1.110 +    , {doNOP, 132, 30,0,  TRUE}     //  30      expr-mod
   1.111 +    , {doUnaryOpStar, 42 /* * */, 35,0,  TRUE}     //  31 
   1.112 +    , {doUnaryOpPlus, 43 /* + */, 35,0,  TRUE}     //  32 
   1.113 +    , {doUnaryOpQuestion, 63 /* ? */, 35,0,  TRUE}     //  33 
   1.114 +    , {doNOP, 255, 35,0,  FALSE}     //  34 
   1.115 +    , {doExprCatOperator, 254, 21,0,  FALSE}     //  35      expr-cont
   1.116 +    , {doNOP, 132, 35,0,  TRUE}     //  36 
   1.117 +    , {doExprCatOperator, 131, 21,0,  FALSE}     //  37 
   1.118 +    , {doExprCatOperator, 91 /* [ */, 21,0,  FALSE}     //  38 
   1.119 +    , {doExprCatOperator, 40 /* ( */, 21,0,  FALSE}     //  39 
   1.120 +    , {doExprCatOperator, 36 /* $ */, 21,0,  FALSE}     //  40 
   1.121 +    , {doExprCatOperator, 46 /* . */, 21,0,  FALSE}     //  41 
   1.122 +    , {doExprCatOperator, 47 /* / */, 47,0,  FALSE}     //  42 
   1.123 +    , {doExprCatOperator, 123 /* { */, 59,0,  TRUE}     //  43 
   1.124 +    , {doExprOrOperator, 124 /* | */, 21,0,  TRUE}     //  44 
   1.125 +    , {doExprRParen, 41 /* ) */, 255,0,  TRUE}     //  45 
   1.126 +    , {doExprFinished, 255, 255,0,  FALSE}     //  46 
   1.127 +    , {doSlash, 47 /* / */, 49,0,  TRUE}     //  47      look-ahead
   1.128 +    , {doNOP, 255, 95,0,  FALSE}     //  48 
   1.129 +    , {doExprCatOperator, 254, 21,0,  FALSE}     //  49      expr-cont-no-slash
   1.130 +    , {doNOP, 132, 35,0,  TRUE}     //  50 
   1.131 +    , {doExprCatOperator, 131, 21,0,  FALSE}     //  51 
   1.132 +    , {doExprCatOperator, 91 /* [ */, 21,0,  FALSE}     //  52 
   1.133 +    , {doExprCatOperator, 40 /* ( */, 21,0,  FALSE}     //  53 
   1.134 +    , {doExprCatOperator, 36 /* $ */, 21,0,  FALSE}     //  54 
   1.135 +    , {doExprCatOperator, 46 /* . */, 21,0,  FALSE}     //  55 
   1.136 +    , {doExprOrOperator, 124 /* | */, 21,0,  TRUE}     //  56 
   1.137 +    , {doExprRParen, 41 /* ) */, 255,0,  TRUE}     //  57 
   1.138 +    , {doExprFinished, 255, 255,0,  FALSE}     //  58 
   1.139 +    , {doNOP, 132, 59,0,  TRUE}     //  59      tag-open
   1.140 +    , {doStartTagValue, 128, 62,0,  FALSE}     //  60 
   1.141 +    , {doTagExpectedError, 255, 95,0,  FALSE}     //  61 
   1.142 +    , {doNOP, 132, 66,0,  TRUE}     //  62      tag-value
   1.143 +    , {doNOP, 125 /* } */, 66,0,  FALSE}     //  63 
   1.144 +    , {doTagDigit, 128, 62,0,  TRUE}     //  64 
   1.145 +    , {doTagExpectedError, 255, 95,0,  FALSE}     //  65 
   1.146 +    , {doNOP, 132, 66,0,  TRUE}     //  66      tag-close
   1.147 +    , {doTagValue, 125 /* } */, 69,0,  TRUE}     //  67 
   1.148 +    , {doTagExpectedError, 255, 95,0,  FALSE}     //  68 
   1.149 +    , {doExprCatOperator, 254, 21,0,  FALSE}     //  69      expr-cont-no-tag
   1.150 +    , {doNOP, 132, 69,0,  TRUE}     //  70 
   1.151 +    , {doExprCatOperator, 131, 21,0,  FALSE}     //  71 
   1.152 +    , {doExprCatOperator, 91 /* [ */, 21,0,  FALSE}     //  72 
   1.153 +    , {doExprCatOperator, 40 /* ( */, 21,0,  FALSE}     //  73 
   1.154 +    , {doExprCatOperator, 36 /* $ */, 21,0,  FALSE}     //  74 
   1.155 +    , {doExprCatOperator, 46 /* . */, 21,0,  FALSE}     //  75 
   1.156 +    , {doExprCatOperator, 47 /* / */, 47,0,  FALSE}     //  76 
   1.157 +    , {doExprOrOperator, 124 /* | */, 21,0,  TRUE}     //  77 
   1.158 +    , {doExprRParen, 41 /* ) */, 255,0,  TRUE}     //  78 
   1.159 +    , {doExprFinished, 255, 255,0,  FALSE}     //  79 
   1.160 +    , {doStartVariableName, 36 /* $ */, 82,0,  TRUE}     //  80      scan-var-name
   1.161 +    , {doNOP, 255, 95,0,  FALSE}     //  81 
   1.162 +    , {doNOP, 130, 84,0,  TRUE}     //  82      scan-var-start
   1.163 +    , {doVariableNameExpectedErr, 255, 95,0,  FALSE}     //  83 
   1.164 +    , {doNOP, 129, 84,0,  TRUE}     //  84      scan-var-body
   1.165 +    , {doEndVariableName, 255, 255,0,  FALSE}     //  85 
   1.166 +    , {doScanUnicodeSet, 91 /* [ */, 255,0,  TRUE}     //  86      scan-unicode-set
   1.167 +    , {doScanUnicodeSet, 112 /* p */, 255,0,  TRUE}     //  87 
   1.168 +    , {doScanUnicodeSet, 80 /* P */, 255,0,  TRUE}     //  88 
   1.169 +    , {doNOP, 255, 95,0,  FALSE}     //  89 
   1.170 +    , {doNOP, 132, 90,0,  TRUE}     //  90      assign-or-rule
   1.171 +    , {doStartAssign, 61 /* = */, 21, 93, TRUE}     //  91 
   1.172 +    , {doNOP, 255, 29, 8, FALSE}     //  92 
   1.173 +    , {doEndAssign, 59 /* ; */, 1,0,  TRUE}     //  93      assign-end
   1.174 +    , {doRuleErrorAssignExpr, 255, 95,0,  FALSE}     //  94 
   1.175 +    , {doExit, 255, 95,0,  TRUE}     //  95      errorDeath
   1.176 + };
   1.177 +#ifdef RBBI_DEBUG
   1.178 +static const char * const RBBIRuleStateNames[] = {    0,
   1.179 +     "start",
   1.180 +    0,
   1.181 +    0,
   1.182 +    0,
   1.183 +    0,
   1.184 +    0,
   1.185 +    0,
   1.186 +     "break-rule-end",
   1.187 +    0,
   1.188 +    0,
   1.189 +     "rev-option",
   1.190 +    0,
   1.191 +     "option-scan1",
   1.192 +    0,
   1.193 +     "option-scan2",
   1.194 +    0,
   1.195 +     "option-scan3",
   1.196 +    0,
   1.197 +    0,
   1.198 +     "reverse-rule",
   1.199 +     "term",
   1.200 +    0,
   1.201 +    0,
   1.202 +    0,
   1.203 +    0,
   1.204 +    0,
   1.205 +    0,
   1.206 +    0,
   1.207 +     "term-var-ref",
   1.208 +     "expr-mod",
   1.209 +    0,
   1.210 +    0,
   1.211 +    0,
   1.212 +    0,
   1.213 +     "expr-cont",
   1.214 +    0,
   1.215 +    0,
   1.216 +    0,
   1.217 +    0,
   1.218 +    0,
   1.219 +    0,
   1.220 +    0,
   1.221 +    0,
   1.222 +    0,
   1.223 +    0,
   1.224 +    0,
   1.225 +     "look-ahead",
   1.226 +    0,
   1.227 +     "expr-cont-no-slash",
   1.228 +    0,
   1.229 +    0,
   1.230 +    0,
   1.231 +    0,
   1.232 +    0,
   1.233 +    0,
   1.234 +    0,
   1.235 +    0,
   1.236 +    0,
   1.237 +     "tag-open",
   1.238 +    0,
   1.239 +    0,
   1.240 +     "tag-value",
   1.241 +    0,
   1.242 +    0,
   1.243 +    0,
   1.244 +     "tag-close",
   1.245 +    0,
   1.246 +    0,
   1.247 +     "expr-cont-no-tag",
   1.248 +    0,
   1.249 +    0,
   1.250 +    0,
   1.251 +    0,
   1.252 +    0,
   1.253 +    0,
   1.254 +    0,
   1.255 +    0,
   1.256 +    0,
   1.257 +    0,
   1.258 +     "scan-var-name",
   1.259 +    0,
   1.260 +     "scan-var-start",
   1.261 +    0,
   1.262 +     "scan-var-body",
   1.263 +    0,
   1.264 +     "scan-unicode-set",
   1.265 +    0,
   1.266 +    0,
   1.267 +    0,
   1.268 +     "assign-or-rule",
   1.269 +    0,
   1.270 +    0,
   1.271 +     "assign-end",
   1.272 +    0,
   1.273 +     "errorDeath",
   1.274 +    0};
   1.275 +#endif
   1.276 +
   1.277 +U_NAMESPACE_END
   1.278 +#endif

mercurial