1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
namespace System.Text.RegularExpressions {
// for the IgnoreCase opcodes, the char data is stored lowercased
// two-byte integers are in little endian format
enum RxOp : byte {
// followed by count, min, max integers
Info,
False,
True,
// position anchors
AnyPosition,
StartOfString,
StartOfLine,
StartOfScan,
EndOfString,
EndOfLine,
End,
WordBoundary,
NoWordBoundary,
// latin1 strings
// followed by single byte length and latin1 bytes
// keep the order, see EmitString ()
String,
StringIgnoreCase,
StringReverse,
StringIgnoreCaseReverse,
// followed by two byte length and unicode chars (two bytes per char)
// a better setup may be to reference the chars in the patterns string
// (offset, length) pairs, at least when the pattern contains them,
// but this means we can't lowercase before hand: consider using a separate
// string/array
// keep the order, see EmitString ()
UnicodeString,
UnicodeStringIgnoreCase,
UnicodeStringReverse,
UnicodeStringIgnoreCaseReverse,
// latin1 single char
// followed by a latin1 byte
// keep the order, see EmitCharacter ()
Char,
NoChar,
CharIgnoreCase,
NoCharIgnoreCase,
CharReverse,
NoCharReverse,
CharIgnoreCaseReverse,
NoCharIgnoreCaseReverse,
// followed by latin1 min and max bytes
// keep the order, see EmitRange ()
Range,
NoRange,
RangeIgnoreCase,
NoRangeIgnoreCase,
RangeReverse,
NoRangeReverse,
RangeIgnoreCaseReverse,
NoRangeIgnoreCaseReverse,
// followed by lowbyte and length of the bitmap and by the bitmap
// keep the order, see EmitSet ()
Bitmap,
NoBitmap,
BitmapIgnoreCase,
NoBitmapIgnoreCase,
BitmapReverse,
NoBitmapReverse,
BitmapIgnoreCaseReverse,
NoBitmapIgnoreCaseReverse,
// unicode chars
// followed by a unicode char
// keep the order, see EmitCharacter ()
UnicodeChar,
NoUnicodeChar,
UnicodeCharIgnoreCase,
NoUnicodeCharIgnoreCase,
UnicodeCharReverse,
NoUnicodeCharReverse,
UnicodeCharIgnoreCaseReverse,
NoUnicodeCharIgnoreCaseReverse,
// followed by unicode char min and max chars
// keep the order, see EmitRange ()
UnicodeRange,
NoUnicodeRange,
UnicodeRangeIgnoreCase,
NoUnicodeRangeIgnoreCase,
UnicodeRangeReverse,
NoUnicodeRangeReverse,
UnicodeRangeIgnoreCaseReverse,
NoUnicodeRangeIgnoreCaseReverse,
// followed by lowchar and length of the bitmap and by the bitmap
UnicodeBitmap,
NoUnicodeBitmap,
UnicodeBitmapIgnoreCase,
NoUnicodeBitmapIgnoreCase,
UnicodeBitmapReverse,
NoUnicodeBitmapReverse,
UnicodeBitmapIgnoreCaseReverse,
NoUnicodeBitmapIgnoreCaseReverse,
// add reverse and negate versions of the categories
CategoryAny,
NoCategoryAny,
CategoryAnyReverse,
NoCategoryAnyReverse,
CategoryAnySingleline,
NoCategoryAnySingleline,
CategoryAnySinglelineReverse,
NoCategoryAnySinglelineReverse,
CategoryDigit,
NoCategoryDigit,
CategoryDigitReverse,
NoCategoryDigitReverse,
CategoryWord,
NoCategoryWord,
CategoryWordReverse,
NoCategoryWordReverse,
CategoryWhiteSpace,
NoCategoryWhiteSpace,
CategoryWhiteSpaceReverse,
NoCategoryWhiteSpaceReverse,
CategoryEcmaWord,
NoCategoryEcmaWord,
CategoryEcmaWordReverse,
NoCategoryEcmaWordReverse,
CategoryEcmaWhiteSpace,
NoCategoryEcmaWhiteSpace,
CategoryEcmaWhiteSpaceReverse,
NoCategoryEcmaWhiteSpaceReverse,
// followed by a unicode category value (byte)
CategoryUnicode,
NoCategoryUnicode,
CategoryUnicodeReverse,
NoCategoryUnicodeReverse,
CategoryUnicodeLetter,
NoCategoryUnicodeLetter,
CategoryUnicodeLetterReverse,
NoCategoryUnicodeLetterReverse,
CategoryUnicodeMark,
NoCategoryUnicodeMark,
CategoryUnicodeMarkReverse,
NoCategoryUnicodeMarkReverse,
CategoryUnicodeNumber,
NoCategoryUnicodeNumber,
CategoryUnicodeNumberReverse,
NoCategoryUnicodeNumberReverse,
CategoryUnicodeSeparator,
NoCategoryUnicodeSeparator,
CategoryUnicodeSeparatorReverse,
NoCategoryUnicodeSeparatorReverse,
CategoryUnicodePunctuation,
NoCategoryUnicodePunctuation,
CategoryUnicodePunctuationReverse,
NoCategoryUnicodePunctuationReverse,
CategoryUnicodeSymbol,
NoCategoryUnicodeSymbol,
CategoryUnicodeSymbolReverse,
NoCategoryUnicodeSymbolReverse,
CategoryUnicodeSpecials,
NoCategoryUnicodeSpecials,
CategoryUnicodeSpecialsReverse,
NoCategoryUnicodeSpecialsReverse,
CategoryUnicodeOther,
NoCategoryUnicodeOther,
CategoryUnicodeOtherReverse,
NoCategoryUnicodeOtherReverse,
// add more categories
// followed by Category value (byte)
CategoryGeneral,
NoCategoryGeneral,
CategoryGeneralReverse,
NoCategoryGeneralReverse,
// backreferences
// followed by two-byte reference number
// keep the order, see EmitReference ()
Reference,
ReferenceIgnoreCase,
ReferenceReverse,
ReferenceIgnoreCaseReverse,
// group/capture support
// followed by two-byte group id
OpenGroup,
CloseGroup,
BalanceStart,
Balance,
// followed by offset and two-byte group id
IfDefined,
// skip ahead num bytes
// followed by two-byte offset
Jump,
// followed by two-byte offset
SubExpression,
// followed by true and false two-byte offsets
Test,
// followed by two-byte offset
Branch,
// followed by two-byte offset
TestCharGroup,
// anchoring expression
// followed by offset of tail and offset
Anchor,
AnchorReverse,
// repetition support
// followed by min, max ints
Repeat,
RepeatLazy,
Until,
FastRepeat,
FastRepeatLazy,
// followed by min byte
RepeatInfinite,
RepeatInfiniteLazy,
}
}
|