//--------------------------------------------------------------------------------- // // Generated Header File. Do not edit by hand. // This file contains the state table for the ICU Regular Expression Pattern Parser // It is generated by the Perl script "regexcst.pl" from // the rule parser state definitions file "regexcst.txt". // // Copyright (C) 2002 International Business Machines Corporation // and others. All rights reserved. // //--------------------------------------------------------------------------------- #ifndef RBBIRPT_H #define RBBIRPT_H U_NAMESPACE_BEGIN // // Character classes for regex pattern scanning. // static const uint8_t kRuleSet_digit_char = 128; static const uint8_t kRuleSet_white_space = 129; static const uint8_t kRuleSet_rule_char = 130; enum Regex_PatternParseAction { doExprOrOperator, doCloseParen, doTagValue, doOrOperator, doOpenCaptureParen, doBadOpenParenType, doRuleError, doStartString, doNGOpt, doPossesiveStar, doOpenLookBehind, doExprRParen, doStar, doPossesivePlus, doNGStar, doOpenLookAheadNeg, doPlus, doOpenNonCaptureParen, doNGPlus, doPatFinish, doIntervalMinValue, doIntervalDigit, doPossesiveOpt, doOpt, doOpenAtomicParen, doStringChar, doOpenLookAhead, doNumberExpectedError, doDotAny, doExprFinished, doScanUnicodeSet, doNOP, doExit, doPatStart, doEndString, doOpenLookBehindNeg, doSplitString, rbbiLastAction}; //------------------------------------------------------------------------------- // // RegexTableEl represents the structure of a row in the transition table // for the pattern parser state machine. //------------------------------------------------------------------------------- struct RegexTableEl { Regex_PatternParseAction fAction; uint8_t fCharClass; // 0-127: an individual ASCII character // 128-255: character class index uint8_t fNextState; // 0-250: normal next-state numbers // 255: pop next-state from stack. uint8_t fPushState; UBool fNextChar; }; static const struct RegexTableEl gRuleParseStateTable[] = { {doNOP, 0, 0, 0, TRUE} , {doPatStart, 255, 3, 2, FALSE} // 1 start , {doPatFinish, 255, 2,0, FALSE} // 2 finish , {doStartString, 254, 10,0, TRUE} // 3 term , {doStartString, 130, 10,0, TRUE} // 4 , {doScanUnicodeSet, 91 /* [ */, 17,0, TRUE} // 5 , {doNOP, 40 /* ( */, 29, 17, TRUE} // 6 , {doDotAny, 46 /* . */, 17,0, TRUE} // 7 , {doNOP, 253, 255,0, FALSE} // 8 , {doRuleError, 255, 67,0, FALSE} // 9 , {doStringChar, 254, 10,0, TRUE} // 10 string , {doStringChar, 130, 10,0, TRUE} // 11 , {doSplitString, 63 /* ? */, 17,0, FALSE} // 12 , {doSplitString, 43 /* + */, 17,0, FALSE} // 13 , {doSplitString, 42 /* * */, 17,0, FALSE} // 14 , {doSplitString, 123 /* { */, 17,0, FALSE} // 15 , {doEndString, 255, 17,0, FALSE} // 16 , {doNOP, 42 /* * */, 40,0, TRUE} // 17 expr-quant , {doNOP, 43 /* + */, 43,0, TRUE} // 18 , {doNOP, 63 /* ? */, 46,0, TRUE} // 19 , {doNOP, 255, 21,0, FALSE} // 20 , {doNOP, 254, 3,0, FALSE} // 21 expr-cont , {doNOP, 130, 3,0, FALSE} // 22 , {doNOP, 91 /* [ */, 3,0, FALSE} // 23 , {doNOP, 40 /* ( */, 3,0, FALSE} // 24 , {doNOP, 46 /* . */, 3,0, FALSE} // 25 , {doOrOperator, 124 /* | */, 3,0, TRUE} // 26 , {doCloseParen, 41 /* ) */, 255,0, TRUE} // 27 , {doExprFinished, 255, 255,0, FALSE} // 28 , {doNOP, 63 /* ? */, 31,0, TRUE} // 29 open-paren , {doOpenCaptureParen, 255, 3, 17, FALSE} // 30 , {doOpenNonCaptureParen, 58 /* : */, 3, 17, TRUE} // 31 open-paren-extended , {doOpenAtomicParen, 62 /* > */, 3, 17, TRUE} // 32 , {doOpenLookAhead, 61 /* = */, 3, 21, TRUE} // 33 , {doOpenLookAheadNeg, 33 /* ! */, 3, 21, TRUE} // 34 , {doNOP, 60 /* < */, 37,0, TRUE} // 35 , {doBadOpenParenType, 255, 67,0, FALSE} // 36 , {doOpenLookBehind, 61 /* = */, 3, 21, TRUE} // 37 open-paren-lookbehind , {doOpenLookBehindNeg, 33 /* ! */, 3, 21, TRUE} // 38 , {doBadOpenParenType, 255, 67,0, FALSE} // 39 , {doNGStar, 63 /* ? */, 21,0, TRUE} // 40 quant-star , {doPossesiveStar, 43 /* + */, 21,0, TRUE} // 41 , {doStar, 255, 21,0, FALSE} // 42 , {doNGPlus, 63 /* ? */, 21,0, TRUE} // 43 quant-plus , {doPossesivePlus, 43 /* + */, 21,0, TRUE} // 44 , {doPlus, 255, 21,0, FALSE} // 45 , {doNGOpt, 63 /* ? */, 21,0, TRUE} // 46 quant-opt , {doPossesiveOpt, 43 /* + */, 21,0, TRUE} // 47 , {doOpt, 255, 21,0, FALSE} // 48 , {doNOP, 129, 49,0, TRUE} // 49 interval-open , {doIntervalMinValue, 128, 52,0, FALSE} // 50 , {doNumberExpectedError, 255, 67,0, FALSE} // 51 , {doNOP, 129, 56,0, TRUE} // 52 interval-value , {doNOP, 125 /* } */, 56,0, FALSE} // 53 , {doIntervalDigit, 128, 52,0, TRUE} // 54 , {doNumberExpectedError, 255, 67,0, FALSE} // 55 , {doNOP, 129, 56,0, TRUE} // 56 interval-close , {doTagValue, 125 /* } */, 59,0, TRUE} // 57 , {doNumberExpectedError, 255, 67,0, FALSE} // 58 , {doNOP, 254, 3,0, FALSE} // 59 expr-cont-no-interval , {doNOP, 130, 3,0, FALSE} // 60 , {doNOP, 91 /* [ */, 3,0, FALSE} // 61 , {doNOP, 40 /* ( */, 3,0, FALSE} // 62 , {doNOP, 46 /* . */, 3,0, FALSE} // 63 , {doExprOrOperator, 124 /* | */, 3,0, TRUE} // 64 , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 65 , {doExprFinished, 255, 255,0, FALSE} // 66 , {doExit, 255, 67,0, TRUE} // 67 errorDeath }; static const char *RegexStateNames[] = { 0, "start", "finish", "term", 0, 0, 0, 0, 0, 0, "string", 0, 0, 0, 0, 0, 0, "expr-quant", 0, 0, 0, "expr-cont", 0, 0, 0, 0, 0, 0, 0, "open-paren", 0, "open-paren-extended", 0, 0, 0, 0, 0, "open-paren-lookbehind", 0, 0, "quant-star", 0, 0, "quant-plus", 0, 0, "quant-opt", 0, 0, "interval-open", 0, 0, "interval-value", 0, 0, 0, "interval-close", 0, 0, "expr-cont-no-interval", 0, 0, 0, 0, 0, 0, 0, "errorDeath", 0}; U_NAMESPACE_END #endif