#ifndef RBBIRPT_H
#define RBBIRPT_H
#include "unicode/utypes.h"
U_NAMESPACE_BEGIN
static const uint8_t kRuleSet_digit_char = 128;
static const uint8_t kRuleSet_name_char = 129;
static const uint8_t kRuleSet_name_start_char = 130;
static const uint8_t kRuleSet_rule_char = 131;
static const uint8_t kRuleSet_white_space = 132;
enum RBBI_RuleParseAction {
doCheckVarDef,
doDotAny,
doEndAssign,
doEndOfRule,
doEndVariableName,
doExit,
doExprCatOperator,
doExprFinished,
doExprOrOperator,
doExprRParen,
doExprStart,
doLParen,
doNOP,
doNoChain,
doOptionEnd,
doOptionStart,
doReverseDir,
doRuleChar,
doRuleError,
doRuleErrorAssignExpr,
doScanUnicodeSet,
doSlash,
doStartAssign,
doStartTagValue,
doStartVariableName,
doTagDigit,
doTagExpectedError,
doTagValue,
doUnaryOpPlus,
doUnaryOpQuestion,
doUnaryOpStar,
doVariableNameExpectedErr,
rbbiLastAction};
struct RBBIRuleTableEl {
RBBI_RuleParseAction fAction;
uint8_t fCharClass; uint8_t fNextState; uint8_t fPushState;
UBool fNextChar;
};
static const struct RBBIRuleTableEl gRuleParseStateTable[] = {
{doNOP, 0, 0, 0, TRUE}
, {doExprStart, 254, 29, 9, FALSE} , {doNOP, 132, 1,0, TRUE} , {doNoChain, 94 , 12, 9, TRUE} , {doExprStart, 36 , 88, 98, FALSE} , {doNOP, 33 , 19,0, TRUE} , {doNOP, 59 , 1,0, TRUE} , {doNOP, 252, 0,0, FALSE} , {doExprStart, 255, 29, 9, FALSE} , {doEndOfRule, 59 , 1,0, TRUE} , {doNOP, 132, 9,0, TRUE} , {doRuleError, 255, 103,0, FALSE} , {doExprStart, 254, 29,0, FALSE} , {doNOP, 132, 12,0, TRUE} , {doRuleError, 94 , 103,0, FALSE} , {doExprStart, 36 , 88, 37, FALSE} , {doRuleError, 59 , 103,0, FALSE} , {doRuleError, 252, 103,0, FALSE} , {doExprStart, 255, 29,0, FALSE} , {doNOP, 33 , 21,0, TRUE} , {doReverseDir, 255, 28, 9, FALSE} , {doOptionStart, 130, 23,0, TRUE} , {doRuleError, 255, 103,0, FALSE} , {doNOP, 129, 23,0, TRUE} , {doOptionEnd, 255, 25,0, FALSE} , {doNOP, 59 , 1,0, TRUE} , {doNOP, 132, 25,0, TRUE} , {doRuleError, 255, 103,0, FALSE} , {doExprStart, 255, 29, 9, FALSE} , {doRuleChar, 254, 38,0, TRUE} , {doNOP, 132, 29,0, TRUE} , {doRuleChar, 131, 38,0, TRUE} , {doNOP, 91 , 94, 38, FALSE} , {doLParen, 40 , 29, 38, TRUE} , {doNOP, 36 , 88, 37, FALSE} , {doDotAny, 46 , 38,0, TRUE} , {doRuleError, 255, 103,0, FALSE} , {doCheckVarDef, 255, 38,0, FALSE} , {doNOP, 132, 38,0, TRUE} , {doUnaryOpStar, 42 , 43,0, TRUE} , {doUnaryOpPlus, 43 , 43,0, TRUE} , {doUnaryOpQuestion, 63 , 43,0, TRUE} , {doNOP, 255, 43,0, FALSE} , {doExprCatOperator, 254, 29,0, FALSE} , {doNOP, 132, 43,0, TRUE} , {doExprCatOperator, 131, 29,0, FALSE} , {doExprCatOperator, 91 , 29,0, FALSE} , {doExprCatOperator, 40 , 29,0, FALSE} , {doExprCatOperator, 36 , 29,0, FALSE} , {doExprCatOperator, 46 , 29,0, FALSE} , {doExprCatOperator, 47 , 55,0, FALSE} , {doExprCatOperator, 123 , 67,0, TRUE} , {doExprOrOperator, 124 , 29,0, TRUE} , {doExprRParen, 41 , 255,0, TRUE} , {doExprFinished, 255, 255,0, FALSE} , {doSlash, 47 , 57,0, TRUE} , {doNOP, 255, 103,0, FALSE} , {doExprCatOperator, 254, 29,0, FALSE} , {doNOP, 132, 43,0, TRUE} , {doExprCatOperator, 131, 29,0, FALSE} , {doExprCatOperator, 91 , 29,0, FALSE} , {doExprCatOperator, 40 , 29,0, FALSE} , {doExprCatOperator, 36 , 29,0, FALSE} , {doExprCatOperator, 46 , 29,0, FALSE} , {doExprOrOperator, 124 , 29,0, TRUE} , {doExprRParen, 41 , 255,0, TRUE} , {doExprFinished, 255, 255,0, FALSE} , {doNOP, 132, 67,0, TRUE} , {doStartTagValue, 128, 70,0, FALSE} , {doTagExpectedError, 255, 103,0, FALSE} , {doNOP, 132, 74,0, TRUE} , {doNOP, 125 , 74,0, FALSE} , {doTagDigit, 128, 70,0, TRUE} , {doTagExpectedError, 255, 103,0, FALSE} , {doNOP, 132, 74,0, TRUE} , {doTagValue, 125 , 77,0, TRUE} , {doTagExpectedError, 255, 103,0, FALSE} , {doExprCatOperator, 254, 29,0, FALSE} , {doNOP, 132, 77,0, TRUE} , {doExprCatOperator, 131, 29,0, FALSE} , {doExprCatOperator, 91 , 29,0, FALSE} , {doExprCatOperator, 40 , 29,0, FALSE} , {doExprCatOperator, 36 , 29,0, FALSE} , {doExprCatOperator, 46 , 29,0, FALSE} , {doExprCatOperator, 47 , 55,0, FALSE} , {doExprOrOperator, 124 , 29,0, TRUE} , {doExprRParen, 41 , 255,0, TRUE} , {doExprFinished, 255, 255,0, FALSE} , {doStartVariableName, 36 , 90,0, TRUE} , {doNOP, 255, 103,0, FALSE} , {doNOP, 130, 92,0, TRUE} , {doVariableNameExpectedErr, 255, 103,0, FALSE} , {doNOP, 129, 92,0, TRUE} , {doEndVariableName, 255, 255,0, FALSE} , {doScanUnicodeSet, 91 , 255,0, TRUE} , {doScanUnicodeSet, 112 , 255,0, TRUE} , {doScanUnicodeSet, 80 , 255,0, TRUE} , {doNOP, 255, 103,0, FALSE} , {doNOP, 132, 98,0, TRUE} , {doStartAssign, 61 , 29, 101, TRUE} , {doNOP, 255, 37, 9, FALSE} , {doEndAssign, 59 , 1,0, TRUE} , {doRuleErrorAssignExpr, 255, 103,0, FALSE} , {doExit, 255, 103,0, TRUE} };
#ifdef RBBI_DEBUG
static const char * const RBBIRuleStateNames[] = { 0,
"start",
0,
0,
0,
0,
0,
0,
0,
"break-rule-end",
0,
0,
"start-after-caret",
0,
0,
0,
0,
0,
0,
"rev-option",
0,
"option-scan1",
0,
"option-scan2",
0,
"option-scan3",
0,
0,
"reverse-rule",
"term",
0,
0,
0,
0,
0,
0,
0,
"term-var-ref",
"expr-mod",
0,
0,
0,
0,
"expr-cont",
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
"look-ahead",
0,
"expr-cont-no-slash",
0,
0,
0,
0,
0,
0,
0,
0,
0,
"tag-open",
0,
0,
"tag-value",
0,
0,
0,
"tag-close",
0,
0,
"expr-cont-no-tag",
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
"scan-var-name",
0,
"scan-var-start",
0,
"scan-var-body",
0,
"scan-unicode-set",
0,
0,
0,
"assign-or-rule",
0,
0,
"assign-end",
0,
"errorDeath",
0};
#endif
U_NAMESPACE_END
#endif