scuffed-code/icu4c/source/i18n/regexcst.h
2002-10-31 23:01:54 +00:00

253 lines
7.9 KiB
C

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