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