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