michael@0: //--------------------------------------------------------------------------------- michael@0: // michael@0: // Generated Header File. Do not edit by hand. michael@0: // This file contains the state table for the ICU Rule Based Break Iterator michael@0: // rule parser. michael@0: // It is generated by the Perl script "rbbicst.pl" from michael@0: // the rule parser state definitions file "rbbirpt.txt". michael@0: // michael@0: // Copyright (C) 2002-2005 International Business Machines Corporation michael@0: // and others. All rights reserved. michael@0: // michael@0: //--------------------------------------------------------------------------------- michael@0: #ifndef RBBIRPT_H michael@0: #define RBBIRPT_H michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: // michael@0: // Character classes for RBBI rule scanning. michael@0: // michael@0: static const uint8_t kRuleSet_digit_char = 128; michael@0: static const uint8_t kRuleSet_name_char = 129; michael@0: static const uint8_t kRuleSet_name_start_char = 130; michael@0: static const uint8_t kRuleSet_rule_char = 131; michael@0: static const uint8_t kRuleSet_white_space = 132; michael@0: michael@0: michael@0: enum RBBI_RuleParseAction { michael@0: doCheckVarDef, michael@0: doDotAny, michael@0: doEndAssign, michael@0: doEndOfRule, michael@0: doEndVariableName, michael@0: doExit, michael@0: doExprCatOperator, michael@0: doExprFinished, michael@0: doExprOrOperator, michael@0: doExprRParen, michael@0: doExprStart, michael@0: doLParen, michael@0: doNOP, michael@0: doOptionEnd, michael@0: doOptionStart, michael@0: doReverseDir, michael@0: doRuleChar, michael@0: doRuleError, michael@0: doRuleErrorAssignExpr, michael@0: doScanUnicodeSet, michael@0: doSlash, michael@0: doStartAssign, michael@0: doStartTagValue, michael@0: doStartVariableName, michael@0: doTagDigit, michael@0: doTagExpectedError, michael@0: doTagValue, michael@0: doUnaryOpPlus, michael@0: doUnaryOpQuestion, michael@0: doUnaryOpStar, michael@0: doVariableNameExpectedErr, michael@0: rbbiLastAction}; michael@0: michael@0: //------------------------------------------------------------------------------- michael@0: // michael@0: // RBBIRuleTableEl represents the structure of a row in the transition table michael@0: // for the rule parser state machine. michael@0: //------------------------------------------------------------------------------- michael@0: struct RBBIRuleTableEl { michael@0: RBBI_RuleParseAction fAction; michael@0: uint8_t fCharClass; // 0-127: an individual ASCII character michael@0: // 128-255: character class index michael@0: uint8_t fNextState; // 0-250: normal next-stat numbers michael@0: // 255: pop next-state from stack. michael@0: uint8_t fPushState; michael@0: UBool fNextChar; michael@0: }; michael@0: michael@0: static const struct RBBIRuleTableEl gRuleParseStateTable[] = { michael@0: {doNOP, 0, 0, 0, TRUE} michael@0: , {doExprStart, 254, 21, 8, FALSE} // 1 start michael@0: , {doNOP, 132, 1,0, TRUE} // 2 michael@0: , {doExprStart, 36 /* $ */, 80, 90, FALSE} // 3 michael@0: , {doNOP, 33 /* ! */, 11,0, TRUE} // 4 michael@0: , {doNOP, 59 /* ; */, 1,0, TRUE} // 5 michael@0: , {doNOP, 252, 0,0, FALSE} // 6 michael@0: , {doExprStart, 255, 21, 8, FALSE} // 7 michael@0: , {doEndOfRule, 59 /* ; */, 1,0, TRUE} // 8 break-rule-end michael@0: , {doNOP, 132, 8,0, TRUE} // 9 michael@0: , {doRuleError, 255, 95,0, FALSE} // 10 michael@0: , {doNOP, 33 /* ! */, 13,0, TRUE} // 11 rev-option michael@0: , {doReverseDir, 255, 20, 8, FALSE} // 12 michael@0: , {doOptionStart, 130, 15,0, TRUE} // 13 option-scan1 michael@0: , {doRuleError, 255, 95,0, FALSE} // 14 michael@0: , {doNOP, 129, 15,0, TRUE} // 15 option-scan2 michael@0: , {doOptionEnd, 255, 17,0, FALSE} // 16 michael@0: , {doNOP, 59 /* ; */, 1,0, TRUE} // 17 option-scan3 michael@0: , {doNOP, 132, 17,0, TRUE} // 18 michael@0: , {doRuleError, 255, 95,0, FALSE} // 19 michael@0: , {doExprStart, 255, 21, 8, FALSE} // 20 reverse-rule michael@0: , {doRuleChar, 254, 30,0, TRUE} // 21 term michael@0: , {doNOP, 132, 21,0, TRUE} // 22 michael@0: , {doRuleChar, 131, 30,0, TRUE} // 23 michael@0: , {doNOP, 91 /* [ */, 86, 30, FALSE} // 24 michael@0: , {doLParen, 40 /* ( */, 21, 30, TRUE} // 25 michael@0: , {doNOP, 36 /* $ */, 80, 29, FALSE} // 26 michael@0: , {doDotAny, 46 /* . */, 30,0, TRUE} // 27 michael@0: , {doRuleError, 255, 95,0, FALSE} // 28 michael@0: , {doCheckVarDef, 255, 30,0, FALSE} // 29 term-var-ref michael@0: , {doNOP, 132, 30,0, TRUE} // 30 expr-mod michael@0: , {doUnaryOpStar, 42 /* * */, 35,0, TRUE} // 31 michael@0: , {doUnaryOpPlus, 43 /* + */, 35,0, TRUE} // 32 michael@0: , {doUnaryOpQuestion, 63 /* ? */, 35,0, TRUE} // 33 michael@0: , {doNOP, 255, 35,0, FALSE} // 34 michael@0: , {doExprCatOperator, 254, 21,0, FALSE} // 35 expr-cont michael@0: , {doNOP, 132, 35,0, TRUE} // 36 michael@0: , {doExprCatOperator, 131, 21,0, FALSE} // 37 michael@0: , {doExprCatOperator, 91 /* [ */, 21,0, FALSE} // 38 michael@0: , {doExprCatOperator, 40 /* ( */, 21,0, FALSE} // 39 michael@0: , {doExprCatOperator, 36 /* $ */, 21,0, FALSE} // 40 michael@0: , {doExprCatOperator, 46 /* . */, 21,0, FALSE} // 41 michael@0: , {doExprCatOperator, 47 /* / */, 47,0, FALSE} // 42 michael@0: , {doExprCatOperator, 123 /* { */, 59,0, TRUE} // 43 michael@0: , {doExprOrOperator, 124 /* | */, 21,0, TRUE} // 44 michael@0: , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 45 michael@0: , {doExprFinished, 255, 255,0, FALSE} // 46 michael@0: , {doSlash, 47 /* / */, 49,0, TRUE} // 47 look-ahead michael@0: , {doNOP, 255, 95,0, FALSE} // 48 michael@0: , {doExprCatOperator, 254, 21,0, FALSE} // 49 expr-cont-no-slash michael@0: , {doNOP, 132, 35,0, TRUE} // 50 michael@0: , {doExprCatOperator, 131, 21,0, FALSE} // 51 michael@0: , {doExprCatOperator, 91 /* [ */, 21,0, FALSE} // 52 michael@0: , {doExprCatOperator, 40 /* ( */, 21,0, FALSE} // 53 michael@0: , {doExprCatOperator, 36 /* $ */, 21,0, FALSE} // 54 michael@0: , {doExprCatOperator, 46 /* . */, 21,0, FALSE} // 55 michael@0: , {doExprOrOperator, 124 /* | */, 21,0, TRUE} // 56 michael@0: , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 57 michael@0: , {doExprFinished, 255, 255,0, FALSE} // 58 michael@0: , {doNOP, 132, 59,0, TRUE} // 59 tag-open michael@0: , {doStartTagValue, 128, 62,0, FALSE} // 60 michael@0: , {doTagExpectedError, 255, 95,0, FALSE} // 61 michael@0: , {doNOP, 132, 66,0, TRUE} // 62 tag-value michael@0: , {doNOP, 125 /* } */, 66,0, FALSE} // 63 michael@0: , {doTagDigit, 128, 62,0, TRUE} // 64 michael@0: , {doTagExpectedError, 255, 95,0, FALSE} // 65 michael@0: , {doNOP, 132, 66,0, TRUE} // 66 tag-close michael@0: , {doTagValue, 125 /* } */, 69,0, TRUE} // 67 michael@0: , {doTagExpectedError, 255, 95,0, FALSE} // 68 michael@0: , {doExprCatOperator, 254, 21,0, FALSE} // 69 expr-cont-no-tag michael@0: , {doNOP, 132, 69,0, TRUE} // 70 michael@0: , {doExprCatOperator, 131, 21,0, FALSE} // 71 michael@0: , {doExprCatOperator, 91 /* [ */, 21,0, FALSE} // 72 michael@0: , {doExprCatOperator, 40 /* ( */, 21,0, FALSE} // 73 michael@0: , {doExprCatOperator, 36 /* $ */, 21,0, FALSE} // 74 michael@0: , {doExprCatOperator, 46 /* . */, 21,0, FALSE} // 75 michael@0: , {doExprCatOperator, 47 /* / */, 47,0, FALSE} // 76 michael@0: , {doExprOrOperator, 124 /* | */, 21,0, TRUE} // 77 michael@0: , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 78 michael@0: , {doExprFinished, 255, 255,0, FALSE} // 79 michael@0: , {doStartVariableName, 36 /* $ */, 82,0, TRUE} // 80 scan-var-name michael@0: , {doNOP, 255, 95,0, FALSE} // 81 michael@0: , {doNOP, 130, 84,0, TRUE} // 82 scan-var-start michael@0: , {doVariableNameExpectedErr, 255, 95,0, FALSE} // 83 michael@0: , {doNOP, 129, 84,0, TRUE} // 84 scan-var-body michael@0: , {doEndVariableName, 255, 255,0, FALSE} // 85 michael@0: , {doScanUnicodeSet, 91 /* [ */, 255,0, TRUE} // 86 scan-unicode-set michael@0: , {doScanUnicodeSet, 112 /* p */, 255,0, TRUE} // 87 michael@0: , {doScanUnicodeSet, 80 /* P */, 255,0, TRUE} // 88 michael@0: , {doNOP, 255, 95,0, FALSE} // 89 michael@0: , {doNOP, 132, 90,0, TRUE} // 90 assign-or-rule michael@0: , {doStartAssign, 61 /* = */, 21, 93, TRUE} // 91 michael@0: , {doNOP, 255, 29, 8, FALSE} // 92 michael@0: , {doEndAssign, 59 /* ; */, 1,0, TRUE} // 93 assign-end michael@0: , {doRuleErrorAssignExpr, 255, 95,0, FALSE} // 94 michael@0: , {doExit, 255, 95,0, TRUE} // 95 errorDeath michael@0: }; michael@0: #ifdef RBBI_DEBUG michael@0: static const char * const RBBIRuleStateNames[] = { 0, michael@0: "start", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "break-rule-end", michael@0: 0, michael@0: 0, michael@0: "rev-option", michael@0: 0, michael@0: "option-scan1", michael@0: 0, michael@0: "option-scan2", michael@0: 0, michael@0: "option-scan3", michael@0: 0, michael@0: 0, michael@0: "reverse-rule", michael@0: "term", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "term-var-ref", michael@0: "expr-mod", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "expr-cont", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "look-ahead", michael@0: 0, michael@0: "expr-cont-no-slash", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "tag-open", michael@0: 0, michael@0: 0, michael@0: "tag-value", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "tag-close", michael@0: 0, michael@0: 0, michael@0: "expr-cont-no-tag", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "scan-var-name", michael@0: 0, michael@0: "scan-var-start", michael@0: 0, michael@0: "scan-var-body", michael@0: 0, michael@0: "scan-unicode-set", michael@0: 0, michael@0: 0, michael@0: 0, michael@0: "assign-or-rule", michael@0: 0, michael@0: 0, michael@0: "assign-end", michael@0: 0, michael@0: "errorDeath", michael@0: 0}; michael@0: #endif michael@0: michael@0: U_NAMESPACE_END michael@0: #endif