| //--------------------------------------------------------------------------------- |
| // |
| // 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 { |
| doCloseParen, |
| doProperty, |
| doOrOperator, |
| doOpenCaptureParen, |
| doBadOpenParenType, |
| doRuleError, |
| doBackslashs, |
| doNGOpt, |
| doNamedChar, |
| doBackslashw, |
| doPossesiveStar, |
| doMismatchedParenErr, |
| doOpenLookBehind, |
| doBackslashx, |
| doBackslashz, |
| doStar, |
| doCaret, |
| doEnterQuoteMode, |
| doPossesivePlus, |
| doNGStar, |
| doMatchMode, |
| doOpenLookAheadNeg, |
| doPlus, |
| doOpenNonCaptureParen, |
| doBackslashA, |
| doBackslashB, |
| doNGPlus, |
| doPatFinish, |
| doBackslashD, |
| doPossesiveOpt, |
| doBackslashG, |
| doOpt, |
| doLiteralChar, |
| doOpenAtomicParen, |
| doBackslashS, |
| doOpenLookAhead, |
| doBackRef, |
| doDollar, |
| doDotAny, |
| doBackslashW, |
| doBackslashX, |
| doScanUnicodeSet, |
| doBackslashZ, |
| doNOP, |
| doExit, |
| doPatStart, |
| doBackslashb, |
| doNotImplementedError, |
| doBackslashd, |
| doOpenLookBehindNeg, |
| 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, 2,0, FALSE} // 1 start |
| , {doLiteralChar, 254, 12,0, TRUE} // 2 term |
| , {doLiteralChar, 130, 12,0, TRUE} // 3 |
| , {doScanUnicodeSet, 91 /* [ */, 12,0, TRUE} // 4 |
| , {doNOP, 40 /* ( */, 20,0, TRUE} // 5 |
| , {doDotAny, 46 /* . */, 12,0, TRUE} // 6 |
| , {doCaret, 94 /* ^ */, 2,0, TRUE} // 7 |
| , {doDollar, 36 /* $ */, 2,0, TRUE} // 8 |
| , {doNOP, 92 /* \ */, 59,0, TRUE} // 9 |
| , {doPatFinish, 253, 2,0, FALSE} // 10 |
| , {doRuleError, 255, 79,0, FALSE} // 11 |
| , {doNOP, 42 /* * */, 48,0, TRUE} // 12 expr-quant |
| , {doNOP, 43 /* + */, 51,0, TRUE} // 13 |
| , {doNOP, 63 /* ? */, 54,0, TRUE} // 14 |
| , {doNOP, 123 /* { */, 57,0, TRUE} // 15 |
| , {doNOP, 255, 17,0, FALSE} // 16 |
| , {doOrOperator, 124 /* | */, 2,0, TRUE} // 17 expr-cont |
| , {doCloseParen, 41 /* ) */, 255,0, TRUE} // 18 |
| , {doNOP, 255, 2,0, FALSE} // 19 |
| , {doNOP, 63 /* ? */, 22,0, TRUE} // 20 open-paren |
| , {doOpenCaptureParen, 255, 2, 12, FALSE} // 21 |
| , {doOpenNonCaptureParen, 58 /* : */, 2, 12, TRUE} // 22 open-paren-extended |
| , {doOpenAtomicParen, 62 /* > */, 2, 12, TRUE} // 23 |
| , {doOpenLookAhead, 61 /* = */, 2, 17, TRUE} // 24 |
| , {doOpenLookAheadNeg, 33 /* ! */, 2, 17, TRUE} // 25 |
| , {doNOP, 60 /* < */, 34,0, TRUE} // 26 |
| , {doNOP, 35 /* # */, 37,0, TRUE} // 27 |
| , {doMatchMode, 105 /* i */, 40,0, TRUE} // 28 |
| , {doMatchMode, 120 /* x */, 40,0, TRUE} // 29 |
| , {doMatchMode, 115 /* s */, 40,0, TRUE} // 30 |
| , {doMatchMode, 109 /* m */, 40,0, TRUE} // 31 |
| , {doMatchMode, 45 /* - */, 40,0, TRUE} // 32 |
| , {doBadOpenParenType, 255, 79,0, FALSE} // 33 |
| , {doOpenLookBehind, 61 /* = */, 2, 17, TRUE} // 34 open-paren-lookbehind |
| , {doOpenLookBehindNeg, 33 /* ! */, 2, 17, TRUE} // 35 |
| , {doBadOpenParenType, 255, 79,0, FALSE} // 36 |
| , {doNOP, 41 /* ) */, 2,0, TRUE} // 37 paren-comment |
| , {doMismatchedParenErr, 253, 79,0, FALSE} // 38 |
| , {doNOP, 255, 37,0, TRUE} // 39 |
| , {doMatchMode, 105 /* i */, 40,0, TRUE} // 40 paren-flag |
| , {doMatchMode, 115 /* s */, 40,0, TRUE} // 41 |
| , {doMatchMode, 109 /* m */, 40,0, TRUE} // 42 |
| , {doMatchMode, 120 /* x */, 40,0, TRUE} // 43 |
| , {doMatchMode, 45 /* - */, 40,0, TRUE} // 44 |
| , {doNOP, 41 /* ) */, 2,0, TRUE} // 45 |
| , {doOpenNonCaptureParen, 58 /* : */, 2, 12, TRUE} // 46 |
| , {doNOP, 255, 79,0, FALSE} // 47 |
| , {doNGStar, 63 /* ? */, 17,0, TRUE} // 48 quant-star |
| , {doPossesiveStar, 43 /* + */, 17,0, TRUE} // 49 |
| , {doStar, 255, 17,0, FALSE} // 50 |
| , {doNGPlus, 63 /* ? */, 17,0, TRUE} // 51 quant-plus |
| , {doPossesivePlus, 43 /* + */, 17,0, TRUE} // 52 |
| , {doPlus, 255, 17,0, FALSE} // 53 |
| , {doNGOpt, 63 /* ? */, 17,0, TRUE} // 54 quant-opt |
| , {doPossesiveOpt, 43 /* + */, 17,0, TRUE} // 55 |
| , {doOpt, 255, 17,0, FALSE} // 56 |
| , {doNOP, 129, 57,0, TRUE} // 57 interval-open |
| , {doNotImplementedError, 255, 79,0, FALSE} // 58 |
| , {doBackslashA, 65 /* A */, 2,0, TRUE} // 59 backslash |
| , {doBackslashB, 66 /* B */, 2,0, TRUE} // 60 |
| , {doBackslashb, 98 /* b */, 2,0, TRUE} // 61 |
| , {doBackslashd, 100 /* d */, 12,0, TRUE} // 62 |
| , {doBackslashD, 68 /* D */, 12,0, TRUE} // 63 |
| , {doBackslashG, 71 /* G */, 2,0, TRUE} // 64 |
| , {doNamedChar, 78 /* N */, 12,0, TRUE} // 65 |
| , {doProperty, 112 /* p */, 12,0, FALSE} // 66 |
| , {doProperty, 80 /* P */, 12,0, FALSE} // 67 |
| , {doEnterQuoteMode, 81 /* Q */, 2,0, TRUE} // 68 |
| , {doBackslashS, 83 /* S */, 12,0, TRUE} // 69 |
| , {doBackslashs, 115 /* s */, 12,0, TRUE} // 70 |
| , {doBackslashW, 87 /* W */, 12,0, TRUE} // 71 |
| , {doBackslashw, 119 /* w */, 12,0, TRUE} // 72 |
| , {doBackslashX, 88 /* X */, 12,0, TRUE} // 73 |
| , {doBackslashx, 120 /* x */, 12,0, TRUE} // 74 |
| , {doBackslashZ, 90 /* Z */, 2,0, TRUE} // 75 |
| , {doBackslashz, 122 /* z */, 2,0, TRUE} // 76 |
| , {doBackRef, 128, 12,0, TRUE} // 77 |
| , {doLiteralChar, 255, 12,0, TRUE} // 78 |
| , {doExit, 255, 79,0, TRUE} // 79 errorDeath |
| }; |
| static const char *RegexStateNames[] = { 0, |
| "start", |
| "term", |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| "expr-quant", |
| 0, |
| 0, |
| 0, |
| 0, |
| "expr-cont", |
| 0, |
| 0, |
| "open-paren", |
| 0, |
| "open-paren-extended", |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| "open-paren-lookbehind", |
| 0, |
| 0, |
| "paren-comment", |
| 0, |
| 0, |
| "paren-flag", |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| "quant-star", |
| 0, |
| 0, |
| "quant-plus", |
| 0, |
| 0, |
| "quant-opt", |
| 0, |
| 0, |
| "interval-open", |
| 0, |
| "backslash", |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| 0, |
| "errorDeath", |
| 0}; |
| |
| U_NAMESPACE_END |
| #endif |