001: /*
002: *******************************************************************************
003: * Copyright (C) 2003-2006,
004: * International Business Machines Corporation and others. All Rights Reserved.
005: *******************************************************************************
006: */
007:
008: package com.ibm.icu.text;
009:
010: /**
011: * Generated Java File. Do not edit by hand.
012: * This file contains the state table for the ICU Rule Based Break Iterator
013: * rule parser.
014: * It is generated by the Perl script "rbbicst.pl" from
015: * the rule parser state definitions file "rbbirpt.txt".
016: * @internal
017: *
018: */
019: class RBBIRuleParseTable {
020: static final short doCheckVarDef = 1;
021: static final short doDotAny = 2;
022: static final short doEndAssign = 3;
023: static final short doEndOfRule = 4;
024: static final short doEndVariableName = 5;
025: static final short doExit = 6;
026: static final short doExprCatOperator = 7;
027: static final short doExprFinished = 8;
028: static final short doExprOrOperator = 9;
029: static final short doExprRParen = 10;
030: static final short doExprStart = 11;
031: static final short doLParen = 12;
032: static final short doNOP = 13;
033: static final short doOptionEnd = 14;
034: static final short doOptionStart = 15;
035: static final short doReverseDir = 16;
036: static final short doRuleChar = 17;
037: static final short doRuleError = 18;
038: static final short doRuleErrorAssignExpr = 19;
039: static final short doScanUnicodeSet = 20;
040: static final short doSlash = 21;
041: static final short doStartAssign = 22;
042: static final short doStartTagValue = 23;
043: static final short doStartVariableName = 24;
044: static final short doTagDigit = 25;
045: static final short doTagExpectedError = 26;
046: static final short doTagValue = 27;
047: static final short doUnaryOpPlus = 28;
048: static final short doUnaryOpQuestion = 29;
049: static final short doUnaryOpStar = 30;
050: static final short doVariableNameExpectedErr = 31;
051:
052: static final short kRuleSet_default = 255;
053: static final short kRuleSet_digit_char = 128;
054: static final short kRuleSet_eof = 252;
055: static final short kRuleSet_escaped = 254;
056: static final short kRuleSet_name_char = 129;
057: static final short kRuleSet_name_start_char = 130;
058: static final short kRuleSet_rule_char = 131;
059: static final short kRuleSet_white_space = 132;
060:
061: static class RBBIRuleTableElement {
062: short fAction;
063: short fCharClass;
064: short fNextState;
065: short fPushState;
066: boolean fNextChar;
067: String fStateName;
068:
069: RBBIRuleTableElement(short a, int cc, int ns, int ps,
070: boolean nc, String sn) {
071: fAction = a;
072: fCharClass = (short) cc;
073: fNextState = (short) ns;
074: fPushState = (short) ps;
075: fNextChar = nc;
076: fStateName = sn;
077: }
078: }
079:
080: static RBBIRuleTableElement[] gRuleParseStateTable = {
081: new RBBIRuleTableElement(doNOP, 0, 0, 0, true, null) // 0
082: ,
083: new RBBIRuleTableElement(doExprStart, 254, 21, 8, false,
084: "start") // 1
085: ,
086: new RBBIRuleTableElement(doNOP, 132, 1, 0, true, null) // 2
087: ,
088: new RBBIRuleTableElement(doExprStart, '$', 80, 90, false,
089: null) // 3
090: ,
091: new RBBIRuleTableElement(doNOP, '!', 11, 0, true, null) // 4
092: ,
093: new RBBIRuleTableElement(doNOP, ';', 1, 0, true, null) // 5
094: ,
095: new RBBIRuleTableElement(doNOP, 252, 0, 0, false, null) // 6
096: ,
097: new RBBIRuleTableElement(doExprStart, 255, 21, 8, false,
098: null) // 7
099: ,
100: new RBBIRuleTableElement(doEndOfRule, ';', 1, 0, true,
101: "break-rule-end") // 8
102: ,
103: new RBBIRuleTableElement(doNOP, 132, 8, 0, true, null) // 9
104: ,
105: new RBBIRuleTableElement(doRuleError, 255, 95, 0, false,
106: null) // 10
107: ,
108: new RBBIRuleTableElement(doNOP, '!', 13, 0, true,
109: "rev-option") // 11
110: ,
111: new RBBIRuleTableElement(doReverseDir, 255, 20, 8, false,
112: null) // 12
113: ,
114: new RBBIRuleTableElement(doOptionStart, 130, 15, 0, true,
115: "option-scan1") // 13
116: ,
117: new RBBIRuleTableElement(doRuleError, 255, 95, 0, false,
118: null) // 14
119: ,
120: new RBBIRuleTableElement(doNOP, 129, 15, 0, true,
121: "option-scan2") // 15
122: ,
123: new RBBIRuleTableElement(doOptionEnd, 255, 17, 0, false,
124: null) // 16
125: ,
126: new RBBIRuleTableElement(doNOP, ';', 1, 0, true,
127: "option-scan3") // 17
128: ,
129: new RBBIRuleTableElement(doNOP, 132, 17, 0, true, null) // 18
130: ,
131: new RBBIRuleTableElement(doRuleError, 255, 95, 0, false,
132: null) // 19
133: ,
134: new RBBIRuleTableElement(doExprStart, 255, 21, 8, false,
135: "reverse-rule") // 20
136: ,
137: new RBBIRuleTableElement(doRuleChar, 254, 30, 0, true,
138: "term") // 21
139: ,
140: new RBBIRuleTableElement(doNOP, 132, 21, 0, true, null) // 22
141: ,
142: new RBBIRuleTableElement(doRuleChar, 131, 30, 0, true, null) // 23
143: ,
144: new RBBIRuleTableElement(doNOP, '[', 86, 30, false, null) // 24
145: ,
146: new RBBIRuleTableElement(doLParen, '(', 21, 30, true, null) // 25
147: ,
148: new RBBIRuleTableElement(doNOP, '$', 80, 29, false, null) // 26
149: ,
150: new RBBIRuleTableElement(doDotAny, '.', 30, 0, true, null) // 27
151: ,
152: new RBBIRuleTableElement(doRuleError, 255, 95, 0, false,
153: null) // 28
154: ,
155: new RBBIRuleTableElement(doCheckVarDef, 255, 30, 0, false,
156: "term-var-ref") // 29
157: ,
158: new RBBIRuleTableElement(doNOP, 132, 30, 0, true,
159: "expr-mod") // 30
160: ,
161: new RBBIRuleTableElement(doUnaryOpStar, '*', 35, 0, true,
162: null) // 31
163: ,
164: new RBBIRuleTableElement(doUnaryOpPlus, '+', 35, 0, true,
165: null) // 32
166: ,
167: new RBBIRuleTableElement(doUnaryOpQuestion, '?', 35, 0,
168: true, null) // 33
169: ,
170: new RBBIRuleTableElement(doNOP, 255, 35, 0, false, null) // 34
171: ,
172: new RBBIRuleTableElement(doExprCatOperator, 254, 21, 0,
173: false, "expr-cont") // 35
174: ,
175: new RBBIRuleTableElement(doNOP, 132, 35, 0, true, null) // 36
176: ,
177: new RBBIRuleTableElement(doExprCatOperator, 131, 21, 0,
178: false, null) // 37
179: ,
180: new RBBIRuleTableElement(doExprCatOperator, '[', 21, 0,
181: false, null) // 38
182: ,
183: new RBBIRuleTableElement(doExprCatOperator, '(', 21, 0,
184: false, null) // 39
185: ,
186: new RBBIRuleTableElement(doExprCatOperator, '$', 21, 0,
187: false, null) // 40
188: ,
189: new RBBIRuleTableElement(doExprCatOperator, '.', 21, 0,
190: false, null) // 41
191: ,
192: new RBBIRuleTableElement(doExprCatOperator, '/', 47, 0,
193: false, null) // 42
194: ,
195: new RBBIRuleTableElement(doExprCatOperator, '{', 59, 0,
196: true, null) // 43
197: ,
198: new RBBIRuleTableElement(doExprOrOperator, '|', 21, 0,
199: true, null) // 44
200: ,
201: new RBBIRuleTableElement(doExprRParen, ')', 255, 0, true,
202: null) // 45
203: ,
204: new RBBIRuleTableElement(doExprFinished, 255, 255, 0,
205: false, null) // 46
206: ,
207: new RBBIRuleTableElement(doSlash, '/', 49, 0, true,
208: "look-ahead") // 47
209: ,
210: new RBBIRuleTableElement(doNOP, 255, 95, 0, false, null) // 48
211: ,
212: new RBBIRuleTableElement(doExprCatOperator, 254, 21, 0,
213: false, "expr-cont-no-slash") // 49
214: ,
215: new RBBIRuleTableElement(doNOP, 132, 35, 0, true, null) // 50
216: ,
217: new RBBIRuleTableElement(doExprCatOperator, 131, 21, 0,
218: false, null) // 51
219: ,
220: new RBBIRuleTableElement(doExprCatOperator, '[', 21, 0,
221: false, null) // 52
222: ,
223: new RBBIRuleTableElement(doExprCatOperator, '(', 21, 0,
224: false, null) // 53
225: ,
226: new RBBIRuleTableElement(doExprCatOperator, '$', 21, 0,
227: false, null) // 54
228: ,
229: new RBBIRuleTableElement(doExprCatOperator, '.', 21, 0,
230: false, null) // 55
231: ,
232: new RBBIRuleTableElement(doExprOrOperator, '|', 21, 0,
233: true, null) // 56
234: ,
235: new RBBIRuleTableElement(doExprRParen, ')', 255, 0, true,
236: null) // 57
237: ,
238: new RBBIRuleTableElement(doExprFinished, 255, 255, 0,
239: false, null) // 58
240: ,
241: new RBBIRuleTableElement(doNOP, 132, 59, 0, true,
242: "tag-open") // 59
243: ,
244: new RBBIRuleTableElement(doStartTagValue, 128, 62, 0,
245: false, null) // 60
246: ,
247: new RBBIRuleTableElement(doTagExpectedError, 255, 95, 0,
248: false, null) // 61
249: ,
250: new RBBIRuleTableElement(doNOP, 132, 66, 0, true,
251: "tag-value") // 62
252: ,
253: new RBBIRuleTableElement(doNOP, '}', 66, 0, false, null) // 63
254: ,
255: new RBBIRuleTableElement(doTagDigit, 128, 62, 0, true, null) // 64
256: ,
257: new RBBIRuleTableElement(doTagExpectedError, 255, 95, 0,
258: false, null) // 65
259: ,
260: new RBBIRuleTableElement(doNOP, 132, 66, 0, true,
261: "tag-close") // 66
262: ,
263: new RBBIRuleTableElement(doTagValue, '}', 69, 0, true, null) // 67
264: ,
265: new RBBIRuleTableElement(doTagExpectedError, 255, 95, 0,
266: false, null) // 68
267: ,
268: new RBBIRuleTableElement(doExprCatOperator, 254, 21, 0,
269: false, "expr-cont-no-tag") // 69
270: ,
271: new RBBIRuleTableElement(doNOP, 132, 69, 0, true, null) // 70
272: ,
273: new RBBIRuleTableElement(doExprCatOperator, 131, 21, 0,
274: false, null) // 71
275: ,
276: new RBBIRuleTableElement(doExprCatOperator, '[', 21, 0,
277: false, null) // 72
278: ,
279: new RBBIRuleTableElement(doExprCatOperator, '(', 21, 0,
280: false, null) // 73
281: ,
282: new RBBIRuleTableElement(doExprCatOperator, '$', 21, 0,
283: false, null) // 74
284: ,
285: new RBBIRuleTableElement(doExprCatOperator, '.', 21, 0,
286: false, null) // 75
287: ,
288: new RBBIRuleTableElement(doExprCatOperator, '/', 47, 0,
289: false, null) // 76
290: ,
291: new RBBIRuleTableElement(doExprOrOperator, '|', 21, 0,
292: true, null) // 77
293: ,
294: new RBBIRuleTableElement(doExprRParen, ')', 255, 0, true,
295: null) // 78
296: ,
297: new RBBIRuleTableElement(doExprFinished, 255, 255, 0,
298: false, null) // 79
299: ,
300: new RBBIRuleTableElement(doStartVariableName, '$', 82, 0,
301: true, "scan-var-name") // 80
302: ,
303: new RBBIRuleTableElement(doNOP, 255, 95, 0, false, null) // 81
304: ,
305: new RBBIRuleTableElement(doNOP, 130, 84, 0, true,
306: "scan-var-start") // 82
307: ,
308: new RBBIRuleTableElement(doVariableNameExpectedErr, 255,
309: 95, 0, false, null) // 83
310: ,
311: new RBBIRuleTableElement(doNOP, 129, 84, 0, true,
312: "scan-var-body") // 84
313: ,
314: new RBBIRuleTableElement(doEndVariableName, 255, 255, 0,
315: false, null) // 85
316: ,
317: new RBBIRuleTableElement(doScanUnicodeSet, '[', 255, 0,
318: true, "scan-unicode-set") // 86
319: ,
320: new RBBIRuleTableElement(doScanUnicodeSet, 'p', 255, 0,
321: true, null) // 87
322: ,
323: new RBBIRuleTableElement(doScanUnicodeSet, 'P', 255, 0,
324: true, null) // 88
325: ,
326: new RBBIRuleTableElement(doNOP, 255, 95, 0, false, null) // 89
327: ,
328: new RBBIRuleTableElement(doNOP, 132, 90, 0, true,
329: "assign-or-rule") // 90
330: ,
331: new RBBIRuleTableElement(doStartAssign, '=', 21, 93, true,
332: null) // 91
333: ,
334: new RBBIRuleTableElement(doNOP, 255, 29, 8, false, null) // 92
335: ,
336: new RBBIRuleTableElement(doEndAssign, ';', 1, 0, true,
337: "assign-end") // 93
338: ,
339: new RBBIRuleTableElement(doRuleErrorAssignExpr, 255, 95, 0,
340: false, null) // 94
341: ,
342: new RBBIRuleTableElement(doExit, 255, 95, 0, true,
343: "errorDeath") // 95
344: };
345: }
|