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