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