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