1 //---------------------------------------------------------------------------------
3 // Generated Header File. Do not edit by hand.
4 // This file contains the state table for the ICU Rule Based Break Iterator
6 // It is generated by the Perl script "rbbicst.pl" from
7 // the rule parser state definitions file "rbbirpt.txt".
9 // Copyright (C) 2002-2004 International Business Machines Corporation
10 // and others. All rights reserved.
12 //---------------------------------------------------------------------------------
18 // Character classes for RBBI rule scanning.
20 static const uint8_t kRuleSet_digit_char
= 128;
21 static const uint8_t kRuleSet_white_space
= 129;
22 static const uint8_t kRuleSet_rule_char
= 130;
23 static const uint8_t kRuleSet_name_start_char
= 131;
24 static const uint8_t kRuleSet_name_char
= 132;
27 enum RBBI_RuleParseAction
{
30 doRuleErrorAssignExpr
,
34 doVariableNameExpectedErr
,
61 //-------------------------------------------------------------------------------
63 // RBBIRuleTableEl represents the structure of a row in the transition table
64 // for the rule parser state machine.
65 //-------------------------------------------------------------------------------
66 struct RBBIRuleTableEl
{
67 RBBI_RuleParseAction fAction
;
68 uint8_t fCharClass
; // 0-127: an individual ASCII character
69 // 128-255: character class index
70 uint8_t fNextState
; // 0-250: normal next-stat numbers
71 // 255: pop next-state from stack.
76 static const struct RBBIRuleTableEl gRuleParseStateTable
[] = {
77 {doNOP
, 0, 0, 0, TRUE
}
78 , {doExprStart
, 254, 21, 8, FALSE
} // 1 start
79 , {doNOP
, 129, 1,0, TRUE
} // 2
80 , {doExprStart
, 36 /* $ */, 80, 90, FALSE
} // 3
81 , {doNOP
, 33 /* ! */, 11,0, TRUE
} // 4
82 , {doNOP
, 59 /* ; */, 1,0, TRUE
} // 5
83 , {doNOP
, 252, 0,0, FALSE
} // 6
84 , {doExprStart
, 255, 21, 8, FALSE
} // 7
85 , {doEndOfRule
, 59 /* ; */, 1,0, TRUE
} // 8 break-rule-end
86 , {doNOP
, 129, 8,0, TRUE
} // 9
87 , {doRuleError
, 255, 95,0, FALSE
} // 10
88 , {doNOP
, 33 /* ! */, 13,0, TRUE
} // 11 rev-option
89 , {doReverseDir
, 255, 20, 8, FALSE
} // 12
90 , {doOptionStart
, 131, 15,0, TRUE
} // 13 option-scan1
91 , {doRuleError
, 255, 95,0, FALSE
} // 14
92 , {doNOP
, 132, 15,0, TRUE
} // 15 option-scan2
93 , {doOptionEnd
, 255, 17,0, FALSE
} // 16
94 , {doNOP
, 59 /* ; */, 1,0, TRUE
} // 17 option-scan3
95 , {doNOP
, 129, 17,0, TRUE
} // 18
96 , {doRuleError
, 255, 95,0, FALSE
} // 19
97 , {doExprStart
, 255, 21, 8, FALSE
} // 20 reverse-rule
98 , {doRuleChar
, 254, 30,0, TRUE
} // 21 term
99 , {doNOP
, 129, 21,0, TRUE
} // 22
100 , {doRuleChar
, 130, 30,0, TRUE
} // 23
101 , {doNOP
, 91 /* [ */, 86, 30, FALSE
} // 24
102 , {doLParen
, 40 /* ( */, 21, 30, TRUE
} // 25
103 , {doNOP
, 36 /* $ */, 80, 29, FALSE
} // 26
104 , {doDotAny
, 46 /* . */, 30,0, TRUE
} // 27
105 , {doRuleError
, 255, 95,0, FALSE
} // 28
106 , {doCheckVarDef
, 255, 30,0, FALSE
} // 29 term-var-ref
107 , {doNOP
, 129, 30,0, TRUE
} // 30 expr-mod
108 , {doUnaryOpStar
, 42 /* * */, 35,0, TRUE
} // 31
109 , {doUnaryOpPlus
, 43 /* + */, 35,0, TRUE
} // 32
110 , {doUnaryOpQuestion
, 63 /* ? */, 35,0, TRUE
} // 33
111 , {doNOP
, 255, 35,0, FALSE
} // 34
112 , {doExprCatOperator
, 254, 21,0, FALSE
} // 35 expr-cont
113 , {doNOP
, 129, 35,0, TRUE
} // 36
114 , {doExprCatOperator
, 130, 21,0, FALSE
} // 37
115 , {doExprCatOperator
, 91 /* [ */, 21,0, FALSE
} // 38
116 , {doExprCatOperator
, 40 /* ( */, 21,0, FALSE
} // 39
117 , {doExprCatOperator
, 36 /* $ */, 21,0, FALSE
} // 40
118 , {doExprCatOperator
, 46 /* . */, 21,0, FALSE
} // 41
119 , {doExprCatOperator
, 47 /* / */, 47,0, FALSE
} // 42
120 , {doExprCatOperator
, 123 /* { */, 59,0, TRUE
} // 43
121 , {doExprOrOperator
, 124 /* | */, 21,0, TRUE
} // 44
122 , {doExprRParen
, 41 /* ) */, 255,0, TRUE
} // 45
123 , {doExprFinished
, 255, 255,0, FALSE
} // 46
124 , {doSlash
, 47 /* / */, 49,0, TRUE
} // 47 look-ahead
125 , {doNOP
, 255, 95,0, FALSE
} // 48
126 , {doExprCatOperator
, 254, 21,0, FALSE
} // 49 expr-cont-no-slash
127 , {doNOP
, 129, 35,0, TRUE
} // 50
128 , {doExprCatOperator
, 130, 21,0, FALSE
} // 51
129 , {doExprCatOperator
, 91 /* [ */, 21,0, FALSE
} // 52
130 , {doExprCatOperator
, 40 /* ( */, 21,0, FALSE
} // 53
131 , {doExprCatOperator
, 36 /* $ */, 21,0, FALSE
} // 54
132 , {doExprCatOperator
, 46 /* . */, 21,0, FALSE
} // 55
133 , {doExprOrOperator
, 124 /* | */, 21,0, TRUE
} // 56
134 , {doExprRParen
, 41 /* ) */, 255,0, TRUE
} // 57
135 , {doExprFinished
, 255, 255,0, FALSE
} // 58
136 , {doNOP
, 129, 59,0, TRUE
} // 59 tag-open
137 , {doStartTagValue
, 128, 62,0, FALSE
} // 60
138 , {doTagExpectedError
, 255, 95,0, FALSE
} // 61
139 , {doNOP
, 129, 66,0, TRUE
} // 62 tag-value
140 , {doNOP
, 125 /* } */, 66,0, FALSE
} // 63
141 , {doTagDigit
, 128, 62,0, TRUE
} // 64
142 , {doTagExpectedError
, 255, 95,0, FALSE
} // 65
143 , {doNOP
, 129, 66,0, TRUE
} // 66 tag-close
144 , {doTagValue
, 125 /* } */, 69,0, TRUE
} // 67
145 , {doTagExpectedError
, 255, 95,0, FALSE
} // 68
146 , {doExprCatOperator
, 254, 21,0, FALSE
} // 69 expr-cont-no-tag
147 , {doNOP
, 129, 69,0, TRUE
} // 70
148 , {doExprCatOperator
, 130, 21,0, FALSE
} // 71
149 , {doExprCatOperator
, 91 /* [ */, 21,0, FALSE
} // 72
150 , {doExprCatOperator
, 40 /* ( */, 21,0, FALSE
} // 73
151 , {doExprCatOperator
, 36 /* $ */, 21,0, FALSE
} // 74
152 , {doExprCatOperator
, 46 /* . */, 21,0, FALSE
} // 75
153 , {doExprCatOperator
, 47 /* / */, 47,0, FALSE
} // 76
154 , {doExprOrOperator
, 124 /* | */, 21,0, TRUE
} // 77
155 , {doExprRParen
, 41 /* ) */, 255,0, TRUE
} // 78
156 , {doExprFinished
, 255, 255,0, FALSE
} // 79
157 , {doStartVariableName
, 36 /* $ */, 82,0, TRUE
} // 80 scan-var-name
158 , {doNOP
, 255, 95,0, FALSE
} // 81
159 , {doNOP
, 131, 84,0, TRUE
} // 82 scan-var-start
160 , {doVariableNameExpectedErr
, 255, 95,0, FALSE
} // 83
161 , {doNOP
, 132, 84,0, TRUE
} // 84 scan-var-body
162 , {doEndVariableName
, 255, 255,0, FALSE
} // 85
163 , {doScanUnicodeSet
, 91 /* [ */, 255,0, TRUE
} // 86 scan-unicode-set
164 , {doScanUnicodeSet
, 112 /* p */, 255,0, TRUE
} // 87
165 , {doScanUnicodeSet
, 80 /* P */, 255,0, TRUE
} // 88
166 , {doNOP
, 255, 95,0, FALSE
} // 89
167 , {doNOP
, 129, 90,0, TRUE
} // 90 assign-or-rule
168 , {doStartAssign
, 61 /* = */, 21, 93, TRUE
} // 91
169 , {doNOP
, 255, 29, 8, FALSE
} // 92
170 , {doEndAssign
, 59 /* ; */, 1,0, TRUE
} // 93 assign-end
171 , {doRuleErrorAssignExpr
, 255, 95,0, FALSE
} // 94
172 , {doExit
, 255, 95,0, TRUE
} // 95 errorDeath
175 static const char * const RBBIRuleStateNames
[] = { 0,
224 "expr-cont-no-slash",