]> git.saurik.com Git - apple/icu.git/blame - icuSources/common/rbbirpt.h
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / common / rbbirpt.h
CommitLineData
b75a7d8f
A
1//---------------------------------------------------------------------------------
2//
3// Generated Header File. Do not edit by hand.
4// This file contains the state table for the ICU Rule Based Break Iterator
5// rule parser.
6// It is generated by the Perl script "rbbicst.pl" from
7// the rule parser state definitions file "rbbirpt.txt".
8//
73c04bcf 9// Copyright (C) 2002-2005 International Business Machines Corporation
b75a7d8f
A
10// and others. All rights reserved.
11//
12//---------------------------------------------------------------------------------
13#ifndef RBBIRPT_H
14#define RBBIRPT_H
15
16U_NAMESPACE_BEGIN
17//
18// Character classes for RBBI rule scanning.
19//
20 static const uint8_t kRuleSet_digit_char = 128;
73c04bcf
A
21 static const uint8_t kRuleSet_name_char = 129;
22 static const uint8_t kRuleSet_name_start_char = 130;
23 static const uint8_t kRuleSet_rule_char = 131;
24 static const uint8_t kRuleSet_white_space = 132;
b75a7d8f
A
25
26
27enum RBBI_RuleParseAction {
73c04bcf
A
28 doCheckVarDef,
29 doDotAny,
30 doEndAssign,
31 doEndOfRule,
32 doEndVariableName,
33 doExit,
34 doExprCatOperator,
35 doExprFinished,
b75a7d8f 36 doExprOrOperator,
73c04bcf
A
37 doExprRParen,
38 doExprStart,
39 doLParen,
40 doNOP,
374ca955 41 doOptionEnd,
73c04bcf
A
42 doOptionStart,
43 doReverseDir,
b75a7d8f 44 doRuleChar,
73c04bcf
A
45 doRuleError,
46 doRuleErrorAssignExpr,
47 doScanUnicodeSet,
b75a7d8f 48 doSlash,
73c04bcf 49 doStartAssign,
b75a7d8f 50 doStartTagValue,
b75a7d8f 51 doStartVariableName,
b75a7d8f 52 doTagDigit,
73c04bcf
A
53 doTagExpectedError,
54 doTagValue,
b75a7d8f 55 doUnaryOpPlus,
73c04bcf
A
56 doUnaryOpQuestion,
57 doUnaryOpStar,
58 doVariableNameExpectedErr,
b75a7d8f
A
59 rbbiLastAction};
60
61//-------------------------------------------------------------------------------
62//
63// RBBIRuleTableEl represents the structure of a row in the transition table
64// for the rule parser state machine.
65//-------------------------------------------------------------------------------
66struct 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.
72 uint8_t fPushState;
73 UBool fNextChar;
74};
75
76static const struct RBBIRuleTableEl gRuleParseStateTable[] = {
77 {doNOP, 0, 0, 0, TRUE}
374ca955 78 , {doExprStart, 254, 21, 8, FALSE} // 1 start
73c04bcf 79 , {doNOP, 132, 1,0, TRUE} // 2
374ca955
A
80 , {doExprStart, 36 /* $ */, 80, 90, FALSE} // 3
81 , {doNOP, 33 /* ! */, 11,0, TRUE} // 4
b75a7d8f
A
82 , {doNOP, 59 /* ; */, 1,0, TRUE} // 5
83 , {doNOP, 252, 0,0, FALSE} // 6
374ca955 84 , {doExprStart, 255, 21, 8, FALSE} // 7
b75a7d8f 85 , {doEndOfRule, 59 /* ; */, 1,0, TRUE} // 8 break-rule-end
73c04bcf 86 , {doNOP, 132, 8,0, TRUE} // 9
374ca955
A
87 , {doRuleError, 255, 95,0, FALSE} // 10
88 , {doNOP, 33 /* ! */, 13,0, TRUE} // 11 rev-option
89 , {doReverseDir, 255, 20, 8, FALSE} // 12
73c04bcf 90 , {doOptionStart, 130, 15,0, TRUE} // 13 option-scan1
374ca955 91 , {doRuleError, 255, 95,0, FALSE} // 14
73c04bcf 92 , {doNOP, 129, 15,0, TRUE} // 15 option-scan2
374ca955
A
93 , {doOptionEnd, 255, 17,0, FALSE} // 16
94 , {doNOP, 59 /* ; */, 1,0, TRUE} // 17 option-scan3
73c04bcf 95 , {doNOP, 132, 17,0, TRUE} // 18
374ca955
A
96 , {doRuleError, 255, 95,0, FALSE} // 19
97 , {doExprStart, 255, 21, 8, FALSE} // 20 reverse-rule
98 , {doRuleChar, 254, 30,0, TRUE} // 21 term
73c04bcf
A
99 , {doNOP, 132, 21,0, TRUE} // 22
100 , {doRuleChar, 131, 30,0, TRUE} // 23
374ca955
A
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
73c04bcf 107 , {doNOP, 132, 30,0, TRUE} // 30 expr-mod
374ca955
A
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
73c04bcf
A
113 , {doNOP, 132, 35,0, TRUE} // 36
114 , {doExprCatOperator, 131, 21,0, FALSE} // 37
374ca955
A
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
73c04bcf
A
127 , {doNOP, 132, 35,0, TRUE} // 50
128 , {doExprCatOperator, 131, 21,0, FALSE} // 51
374ca955
A
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
73c04bcf 136 , {doNOP, 132, 59,0, TRUE} // 59 tag-open
374ca955
A
137 , {doStartTagValue, 128, 62,0, FALSE} // 60
138 , {doTagExpectedError, 255, 95,0, FALSE} // 61
73c04bcf 139 , {doNOP, 132, 66,0, TRUE} // 62 tag-value
374ca955
A
140 , {doNOP, 125 /* } */, 66,0, FALSE} // 63
141 , {doTagDigit, 128, 62,0, TRUE} // 64
142 , {doTagExpectedError, 255, 95,0, FALSE} // 65
73c04bcf 143 , {doNOP, 132, 66,0, TRUE} // 66 tag-close
374ca955
A
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
73c04bcf
A
147 , {doNOP, 132, 69,0, TRUE} // 70
148 , {doExprCatOperator, 131, 21,0, FALSE} // 71
374ca955
A
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
73c04bcf 159 , {doNOP, 130, 84,0, TRUE} // 82 scan-var-start
374ca955 160 , {doVariableNameExpectedErr, 255, 95,0, FALSE} // 83
73c04bcf 161 , {doNOP, 129, 84,0, TRUE} // 84 scan-var-body
374ca955
A
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
73c04bcf 167 , {doNOP, 132, 90,0, TRUE} // 90 assign-or-rule
374ca955
A
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
b75a7d8f 173 };
374ca955 174#ifdef RBBI_DEBUG
b75a7d8f
A
175static const char * const RBBIRuleStateNames[] = { 0,
176 "start",
177 0,
178 0,
179 0,
180 0,
181 0,
182 0,
183 "break-rule-end",
184 0,
374ca955
A
185 0,
186 "rev-option",
187 0,
188 "option-scan1",
189 0,
190 "option-scan2",
191 0,
192 "option-scan3",
193 0,
b75a7d8f
A
194 0,
195 "reverse-rule",
196 "term",
197 0,
198 0,
199 0,
200 0,
201 0,
202 0,
203 0,
204 "term-var-ref",
205 "expr-mod",
206 0,
207 0,
208 0,
209 0,
210 "expr-cont",
211 0,
212 0,
213 0,
214 0,
215 0,
216 0,
217 0,
218 0,
219 0,
220 0,
221 0,
222 "look-ahead",
223 0,
224 "expr-cont-no-slash",
225 0,
226 0,
227 0,
228 0,
229 0,
230 0,
231 0,
232 0,
233 0,
234 "tag-open",
235 0,
236 0,
237 "tag-value",
238 0,
239 0,
240 0,
241 "tag-close",
242 0,
243 0,
244 "expr-cont-no-tag",
245 0,
246 0,
247 0,
248 0,
249 0,
250 0,
251 0,
252 0,
253 0,
254 0,
255 "scan-var-name",
256 0,
257 "scan-var-start",
258 0,
259 "scan-var-body",
260 0,
261 "scan-unicode-set",
262 0,
263 0,
264 0,
265 "assign-or-rule",
266 0,
267 0,
268 "assign-end",
269 0,
270 "errorDeath",
271 0};
374ca955 272#endif
b75a7d8f
A
273
274U_NAMESPACE_END
275#endif