• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GENERATED SOURCE. DO NOT MODIFY. */
2 // © 2016 and later: Unicode, Inc. and others.
3 // License & terms of use: http://www.unicode.org/copyright.html
4 /*
5  *******************************************************************************
6  * Copyright (c) 2003-2016, International Business Machines
7  * Corporation and others. All Rights Reserved.
8  *******************************************************************************
9  */
10 
11 package android.icu.text;
12 
13 /**
14  * Generated Java File.  Do not edit by hand.
15  * This file contains the state table for the ICU Rule Based Break Iterator
16  * rule parser.
17  * It is generated by the Perl script "rbbicst.pl" from
18  * the rule parser state definitions file "rbbirpt.txt".
19  * @hide draft / provisional / internal are hidden on Android
20  *
21  */
22 class RBBIRuleParseTable
23 {
24      static final short doCheckVarDef = 1;
25      static final short doDotAny = 2;
26      static final short doEndAssign = 3;
27      static final short doEndOfRule = 4;
28      static final short doEndVariableName = 5;
29      static final short doExit = 6;
30      static final short doExprCatOperator = 7;
31      static final short doExprFinished = 8;
32      static final short doExprOrOperator = 9;
33      static final short doExprRParen = 10;
34      static final short doExprStart = 11;
35      static final short doLParen = 12;
36      static final short doNOP = 13;
37      static final short doNoChain = 14;
38      static final short doOptionEnd = 15;
39      static final short doOptionStart = 16;
40      static final short doReverseDir = 17;
41      static final short doRuleChar = 18;
42      static final short doRuleError = 19;
43      static final short doRuleErrorAssignExpr = 20;
44      static final short doScanUnicodeSet = 21;
45      static final short doSlash = 22;
46      static final short doStartAssign = 23;
47      static final short doStartTagValue = 24;
48      static final short doStartVariableName = 25;
49      static final short doTagDigit = 26;
50      static final short doTagExpectedError = 27;
51      static final short doTagValue = 28;
52      static final short doUnaryOpPlus = 29;
53      static final short doUnaryOpQuestion = 30;
54      static final short doUnaryOpStar = 31;
55      static final short doVariableNameExpectedErr = 32;
56 
57      static final short kRuleSet_default = 255;
58      static final short kRuleSet_digit_char = 128;
59      static final short kRuleSet_eof = 252;
60      static final short kRuleSet_escaped = 254;
61      static final short kRuleSet_name_char = 129;
62      static final short kRuleSet_name_start_char = 130;
63      static final short kRuleSet_rule_char = 131;
64      static final short kRuleSet_white_space = 132;
65 
66 
67    static class RBBIRuleTableElement {
68       short      fAction;
69       short      fCharClass;
70       short      fNextState;
71       short      fPushState;
72       boolean    fNextChar;
73       String     fStateName;
RBBIRuleTableElement(short a, int cc, int ns, int ps, boolean nc, String sn)74       RBBIRuleTableElement(short a, int cc, int ns, int ps, boolean nc, String sn) {
75       fAction = a;
76       fCharClass = (short)cc;
77       fNextState = (short)ns;
78       fPushState = (short)ps;
79       fNextChar  = nc;
80       fStateName = sn;
81    }
82    };
83 
84     static RBBIRuleTableElement[] gRuleParseStateTable = {
85        new RBBIRuleTableElement(doNOP, 0, 0,0,  true,   null )     //  0
86      , new RBBIRuleTableElement(doExprStart, 254, 29, 9, false,   "start")     //  1
87      , new RBBIRuleTableElement(doNOP, 132, 1,0,  true,   null )     //  2
88      , new RBBIRuleTableElement(doNoChain,'^',  12, 9, true,   null )     //  3
89      , new RBBIRuleTableElement(doExprStart,'$',  88, 98, false,   null )     //  4
90      , new RBBIRuleTableElement(doNOP,'!',  19,0,  true,   null )     //  5
91      , new RBBIRuleTableElement(doNOP,';',  1,0,  true,   null )     //  6
92      , new RBBIRuleTableElement(doNOP, 252, 0,0,  false,   null )     //  7
93      , new RBBIRuleTableElement(doExprStart, 255, 29, 9, false,   null )     //  8
94      , new RBBIRuleTableElement(doEndOfRule,';',  1,0,  true,   "break-rule-end")     //  9
95      , new RBBIRuleTableElement(doNOP, 132, 9,0,  true,   null )     //  10
96      , new RBBIRuleTableElement(doRuleError, 255, 103,0,  false,   null )     //  11
97      , new RBBIRuleTableElement(doExprStart, 254, 29,0,  false,   "start-after-caret")     //  12
98      , new RBBIRuleTableElement(doNOP, 132, 12,0,  true,   null )     //  13
99      , new RBBIRuleTableElement(doRuleError,'^',  103,0,  false,   null )     //  14
100      , new RBBIRuleTableElement(doExprStart,'$',  88, 37, false,   null )     //  15
101      , new RBBIRuleTableElement(doRuleError,';',  103,0,  false,   null )     //  16
102      , new RBBIRuleTableElement(doRuleError, 252, 103,0,  false,   null )     //  17
103      , new RBBIRuleTableElement(doExprStart, 255, 29,0,  false,   null )     //  18
104      , new RBBIRuleTableElement(doNOP,'!',  21,0,  true,   "rev-option")     //  19
105      , new RBBIRuleTableElement(doReverseDir, 255, 28, 9, false,   null )     //  20
106      , new RBBIRuleTableElement(doOptionStart, 130, 23,0,  true,   "option-scan1")     //  21
107      , new RBBIRuleTableElement(doRuleError, 255, 103,0,  false,   null )     //  22
108      , new RBBIRuleTableElement(doNOP, 129, 23,0,  true,   "option-scan2")     //  23
109      , new RBBIRuleTableElement(doOptionEnd, 255, 25,0,  false,   null )     //  24
110      , new RBBIRuleTableElement(doNOP,';',  1,0,  true,   "option-scan3")     //  25
111      , new RBBIRuleTableElement(doNOP, 132, 25,0,  true,   null )     //  26
112      , new RBBIRuleTableElement(doRuleError, 255, 103,0,  false,   null )     //  27
113      , new RBBIRuleTableElement(doExprStart, 255, 29, 9, false,   "reverse-rule")     //  28
114      , new RBBIRuleTableElement(doRuleChar, 254, 38,0,  true,   "term")     //  29
115      , new RBBIRuleTableElement(doNOP, 132, 29,0,  true,   null )     //  30
116      , new RBBIRuleTableElement(doRuleChar, 131, 38,0,  true,   null )     //  31
117      , new RBBIRuleTableElement(doNOP,'[',  94, 38, false,   null )     //  32
118      , new RBBIRuleTableElement(doLParen,'(',  29, 38, true,   null )     //  33
119      , new RBBIRuleTableElement(doNOP,'$',  88, 37, false,   null )     //  34
120      , new RBBIRuleTableElement(doDotAny,'.',  38,0,  true,   null )     //  35
121      , new RBBIRuleTableElement(doRuleError, 255, 103,0,  false,   null )     //  36
122      , new RBBIRuleTableElement(doCheckVarDef, 255, 38,0,  false,   "term-var-ref")     //  37
123      , new RBBIRuleTableElement(doNOP, 132, 38,0,  true,   "expr-mod")     //  38
124      , new RBBIRuleTableElement(doUnaryOpStar,'*',  43,0,  true,   null )     //  39
125      , new RBBIRuleTableElement(doUnaryOpPlus,'+',  43,0,  true,   null )     //  40
126      , new RBBIRuleTableElement(doUnaryOpQuestion,'?',  43,0,  true,   null )     //  41
127      , new RBBIRuleTableElement(doNOP, 255, 43,0,  false,   null )     //  42
128      , new RBBIRuleTableElement(doExprCatOperator, 254, 29,0,  false,   "expr-cont")     //  43
129      , new RBBIRuleTableElement(doNOP, 132, 43,0,  true,   null )     //  44
130      , new RBBIRuleTableElement(doExprCatOperator, 131, 29,0,  false,   null )     //  45
131      , new RBBIRuleTableElement(doExprCatOperator,'[',  29,0,  false,   null )     //  46
132      , new RBBIRuleTableElement(doExprCatOperator,'(',  29,0,  false,   null )     //  47
133      , new RBBIRuleTableElement(doExprCatOperator,'$',  29,0,  false,   null )     //  48
134      , new RBBIRuleTableElement(doExprCatOperator,'.',  29,0,  false,   null )     //  49
135      , new RBBIRuleTableElement(doExprCatOperator,'/',  55,0,  false,   null )     //  50
136      , new RBBIRuleTableElement(doExprCatOperator,'{',  67,0,  true,   null )     //  51
137      , new RBBIRuleTableElement(doExprOrOperator,'|',  29,0,  true,   null )     //  52
138      , new RBBIRuleTableElement(doExprRParen,')',  255,0,  true,   null )     //  53
139      , new RBBIRuleTableElement(doExprFinished, 255, 255,0,  false,   null )     //  54
140      , new RBBIRuleTableElement(doSlash,'/',  57,0,  true,   "look-ahead")     //  55
141      , new RBBIRuleTableElement(doNOP, 255, 103,0,  false,   null )     //  56
142      , new RBBIRuleTableElement(doExprCatOperator, 254, 29,0,  false,   "expr-cont-no-slash")     //  57
143      , new RBBIRuleTableElement(doNOP, 132, 43,0,  true,   null )     //  58
144      , new RBBIRuleTableElement(doExprCatOperator, 131, 29,0,  false,   null )     //  59
145      , new RBBIRuleTableElement(doExprCatOperator,'[',  29,0,  false,   null )     //  60
146      , new RBBIRuleTableElement(doExprCatOperator,'(',  29,0,  false,   null )     //  61
147      , new RBBIRuleTableElement(doExprCatOperator,'$',  29,0,  false,   null )     //  62
148      , new RBBIRuleTableElement(doExprCatOperator,'.',  29,0,  false,   null )     //  63
149      , new RBBIRuleTableElement(doExprOrOperator,'|',  29,0,  true,   null )     //  64
150      , new RBBIRuleTableElement(doExprRParen,')',  255,0,  true,   null )     //  65
151      , new RBBIRuleTableElement(doExprFinished, 255, 255,0,  false,   null )     //  66
152      , new RBBIRuleTableElement(doNOP, 132, 67,0,  true,   "tag-open")     //  67
153      , new RBBIRuleTableElement(doStartTagValue, 128, 70,0,  false,   null )     //  68
154      , new RBBIRuleTableElement(doTagExpectedError, 255, 103,0,  false,   null )     //  69
155      , new RBBIRuleTableElement(doNOP, 132, 74,0,  true,   "tag-value")     //  70
156      , new RBBIRuleTableElement(doNOP,'}',  74,0,  false,   null )     //  71
157      , new RBBIRuleTableElement(doTagDigit, 128, 70,0,  true,   null )     //  72
158      , new RBBIRuleTableElement(doTagExpectedError, 255, 103,0,  false,   null )     //  73
159      , new RBBIRuleTableElement(doNOP, 132, 74,0,  true,   "tag-close")     //  74
160      , new RBBIRuleTableElement(doTagValue,'}',  77,0,  true,   null )     //  75
161      , new RBBIRuleTableElement(doTagExpectedError, 255, 103,0,  false,   null )     //  76
162      , new RBBIRuleTableElement(doExprCatOperator, 254, 29,0,  false,   "expr-cont-no-tag")     //  77
163      , new RBBIRuleTableElement(doNOP, 132, 77,0,  true,   null )     //  78
164      , new RBBIRuleTableElement(doExprCatOperator, 131, 29,0,  false,   null )     //  79
165      , new RBBIRuleTableElement(doExprCatOperator,'[',  29,0,  false,   null )     //  80
166      , new RBBIRuleTableElement(doExprCatOperator,'(',  29,0,  false,   null )     //  81
167      , new RBBIRuleTableElement(doExprCatOperator,'$',  29,0,  false,   null )     //  82
168      , new RBBIRuleTableElement(doExprCatOperator,'.',  29,0,  false,   null )     //  83
169      , new RBBIRuleTableElement(doExprCatOperator,'/',  55,0,  false,   null )     //  84
170      , new RBBIRuleTableElement(doExprOrOperator,'|',  29,0,  true,   null )     //  85
171      , new RBBIRuleTableElement(doExprRParen,')',  255,0,  true,   null )     //  86
172      , new RBBIRuleTableElement(doExprFinished, 255, 255,0,  false,   null )     //  87
173      , new RBBIRuleTableElement(doStartVariableName,'$',  90,0,  true,   "scan-var-name")     //  88
174      , new RBBIRuleTableElement(doNOP, 255, 103,0,  false,   null )     //  89
175      , new RBBIRuleTableElement(doNOP, 130, 92,0,  true,   "scan-var-start")     //  90
176      , new RBBIRuleTableElement(doVariableNameExpectedErr, 255, 103,0,  false,   null )     //  91
177      , new RBBIRuleTableElement(doNOP, 129, 92,0,  true,   "scan-var-body")     //  92
178      , new RBBIRuleTableElement(doEndVariableName, 255, 255,0,  false,   null )     //  93
179      , new RBBIRuleTableElement(doScanUnicodeSet,'[',  255,0,  true,   "scan-unicode-set")     //  94
180      , new RBBIRuleTableElement(doScanUnicodeSet,'p',  255,0,  true,   null )     //  95
181      , new RBBIRuleTableElement(doScanUnicodeSet,'P',  255,0,  true,   null )     //  96
182      , new RBBIRuleTableElement(doNOP, 255, 103,0,  false,   null )     //  97
183      , new RBBIRuleTableElement(doNOP, 132, 98,0,  true,   "assign-or-rule")     //  98
184      , new RBBIRuleTableElement(doStartAssign,'=',  29, 101, true,   null )     //  99
185      , new RBBIRuleTableElement(doNOP, 255, 37, 9, false,   null )     //  100
186      , new RBBIRuleTableElement(doEndAssign,';',  1,0,  true,   "assign-end")     //  101
187      , new RBBIRuleTableElement(doRuleErrorAssignExpr, 255, 103,0,  false,   null )     //  102
188      , new RBBIRuleTableElement(doExit, 255, 103,0,  true,   "errorDeath")     //  103
189  };
190 };
191