2002-10-22 00:09:32 +00:00
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// 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,
|
2002-10-29 01:20:15 +00:00
|
|
|
doProperty,
|
2002-10-22 00:09:32 +00:00
|
|
|
doOrOperator,
|
|
|
|
doOpenCaptureParen,
|
|
|
|
doBadOpenParenType,
|
|
|
|
doRuleError,
|
2002-10-31 23:01:54 +00:00
|
|
|
doBackslashs,
|
2002-10-22 00:09:32 +00:00
|
|
|
doNGOpt,
|
2002-11-06 02:35:20 +00:00
|
|
|
doNamedChar,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashw,
|
2002-10-22 00:09:32 +00:00
|
|
|
doPossesiveStar,
|
2002-11-07 02:34:46 +00:00
|
|
|
doMismatchedParenErr,
|
2002-10-22 00:09:32 +00:00
|
|
|
doOpenLookBehind,
|
2002-11-06 02:35:20 +00:00
|
|
|
doBackslashx,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashz,
|
2002-10-22 00:09:32 +00:00
|
|
|
doStar,
|
2002-11-06 02:35:20 +00:00
|
|
|
doCaret,
|
2002-10-31 23:01:54 +00:00
|
|
|
doEnterQuoteMode,
|
2002-10-22 00:09:32 +00:00
|
|
|
doPossesivePlus,
|
|
|
|
doNGStar,
|
2002-11-07 02:34:46 +00:00
|
|
|
doMatchMode,
|
2002-10-22 00:09:32 +00:00
|
|
|
doOpenLookAheadNeg,
|
|
|
|
doPlus,
|
|
|
|
doOpenNonCaptureParen,
|
2002-10-24 22:16:07 +00:00
|
|
|
doBackslashA,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashB,
|
2002-10-22 00:09:32 +00:00
|
|
|
doNGPlus,
|
|
|
|
doPatFinish,
|
2002-10-31 01:58:01 +00:00
|
|
|
doBackslashD,
|
2002-10-22 00:09:32 +00:00
|
|
|
doPossesiveOpt,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashG,
|
2002-10-22 00:09:32 +00:00
|
|
|
doOpt,
|
2002-11-11 18:49:49 +00:00
|
|
|
doLiteralChar,
|
2002-10-22 00:09:32 +00:00
|
|
|
doOpenAtomicParen,
|
2002-10-31 23:01:54 +00:00
|
|
|
doBackslashS,
|
2002-10-22 00:09:32 +00:00
|
|
|
doOpenLookAhead,
|
2002-11-06 02:35:20 +00:00
|
|
|
doBackRef,
|
|
|
|
doDollar,
|
2002-10-22 00:09:32 +00:00
|
|
|
doDotAny,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashW,
|
|
|
|
doBackslashX,
|
2002-10-22 00:09:32 +00:00
|
|
|
doScanUnicodeSet,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashZ,
|
2002-10-22 00:09:32 +00:00
|
|
|
doNOP,
|
|
|
|
doExit,
|
|
|
|
doPatStart,
|
2002-10-28 17:18:44 +00:00
|
|
|
doBackslashb,
|
2002-11-07 02:34:46 +00:00
|
|
|
doNotImplementedError,
|
2002-11-11 18:49:49 +00:00
|
|
|
doBackslashd,
|
2002-10-22 00:09:32 +00:00
|
|
|
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}
|
2002-11-11 18:49:49 +00:00
|
|
|
, {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
|
2002-10-22 00:09:32 +00:00
|
|
|
};
|
|
|
|
static const char *RegexStateNames[] = { 0,
|
|
|
|
"start",
|
|
|
|
"term",
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-10-24 22:16:07 +00:00
|
|
|
0,
|
2002-11-06 02:35:20 +00:00
|
|
|
0,
|
|
|
|
0,
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
"expr-quant",
|
|
|
|
0,
|
|
|
|
0,
|
2002-11-07 02:34:46 +00:00
|
|
|
0,
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
"expr-cont",
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"open-paren",
|
|
|
|
0,
|
|
|
|
"open-paren-extended",
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-11-06 02:35:20 +00:00
|
|
|
0,
|
2002-11-07 02:34:46 +00:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
"open-paren-lookbehind",
|
|
|
|
0,
|
2002-11-06 02:35:20 +00:00
|
|
|
0,
|
|
|
|
"paren-comment",
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
0,
|
2002-11-07 02:34:46 +00:00
|
|
|
"paren-flag",
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-11-07 02:34:46 +00:00
|
|
|
"quant-star",
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
"quant-plus",
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
0,
|
2002-11-07 02:34:46 +00:00
|
|
|
"quant-opt",
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
0,
|
2002-11-07 02:34:46 +00:00
|
|
|
"interval-open",
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
2002-11-06 02:35:20 +00:00
|
|
|
"backslash",
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-10-28 17:18:44 +00:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-10-29 01:20:15 +00:00
|
|
|
0,
|
|
|
|
0,
|
2002-10-31 01:58:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2002-10-31 23:01:54 +00:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2002-10-22 00:09:32 +00:00
|
|
|
0,
|
|
|
|
"errorDeath",
|
|
|
|
0};
|
|
|
|
|
|
|
|
U_NAMESPACE_END
|
|
|
|
#endif
|