202 references to RegexOpcode
System.Text.RegularExpressions (202)
System\Text\RegularExpressions\RegexInterpreterCode.cs (122)
26public static bool OpcodeBacktracks(RegexOpcode opcode) 28opcode &= RegexOpcode.OperatorMask; 30RegexOpcode.Oneloop or 31RegexOpcode.Onelazy or 32RegexOpcode.Notoneloop or 33RegexOpcode.Notonelazy or 34RegexOpcode.Setloop or 35RegexOpcode.Setlazy or 36RegexOpcode.Lazybranch or 37RegexOpcode.Branchmark or 38RegexOpcode.Lazybranchmark or 39RegexOpcode.Nullcount or 40RegexOpcode.Setcount or 41RegexOpcode.Branchcount or 42RegexOpcode.Lazybranchcount or 43RegexOpcode.Setmark or 44RegexOpcode.Capturemark or 45RegexOpcode.Getmark or 46RegexOpcode.Setjump or 47RegexOpcode.Backjump or 48RegexOpcode.Forejump or 49RegexOpcode.Goto; 56public static int OpcodeSize(RegexOpcode opcode) 58opcode &= RegexOpcode.OperatorMask; 61case RegexOpcode.Nothing: 62case RegexOpcode.Bol: 63case RegexOpcode.Eol: 64case RegexOpcode.Boundary: 65case RegexOpcode.NonBoundary: 66case RegexOpcode.ECMABoundary: 67case RegexOpcode.NonECMABoundary: 68case RegexOpcode.Beginning: 69case RegexOpcode.Start: 70case RegexOpcode.EndZ: 71case RegexOpcode.End: 72case RegexOpcode.Nullmark: 73case RegexOpcode.Setmark: 74case RegexOpcode.Getmark: 75case RegexOpcode.Setjump: 76case RegexOpcode.Backjump: 77case RegexOpcode.Forejump: 78case RegexOpcode.Stop: 79case RegexOpcode.UpdateBumpalong: 83case RegexOpcode.One: 84case RegexOpcode.Notone: 85case RegexOpcode.Multi: 86case RegexOpcode.Backreference: 87case RegexOpcode.TestBackreference: 88case RegexOpcode.Goto: 89case RegexOpcode.Nullcount: 90case RegexOpcode.Setcount: 91case RegexOpcode.Lazybranch: 92case RegexOpcode.Branchmark: 93case RegexOpcode.Lazybranchmark: 94case RegexOpcode.Set: 98case RegexOpcode.Capturemark: 99case RegexOpcode.Branchcount: 100case RegexOpcode.Lazybranchcount: 101case RegexOpcode.Onerep: 102case RegexOpcode.Notonerep: 103case RegexOpcode.Oneloop: 104case RegexOpcode.Oneloopatomic: 105case RegexOpcode.Notoneloop: 106case RegexOpcode.Notoneloopatomic: 107case RegexOpcode.Onelazy: 108case RegexOpcode.Notonelazy: 109case RegexOpcode.Setlazy: 110case RegexOpcode.Setrep: 111case RegexOpcode.Setloop: 112case RegexOpcode.Setloopatomic: 118goto case RegexOpcode.Stop; 129for (int i = 0; i < Codes.Length; i += OpcodeSize((RegexOpcode)Codes[i])) 140RegexOpcode opcode = (RegexOpcode)Codes[opcodeOffset]; 144sb.Append(OpcodeBacktracks(opcode & RegexOpcode.OperatorMask) ? '~' : ' '); 145sb.Append(opcode & RegexOpcode.OperatorMask); 146if ((opcode & RegexOpcode.CaseInsensitive) != 0) sb.Append("-Ci"); 147if ((opcode & RegexOpcode.RightToLeft) != 0) sb.Append("-Rtl"); 148if ((opcode & RegexOpcode.Backtracking) != 0) sb.Append("-Back"); 149if ((opcode & RegexOpcode.BacktrackingSecond) != 0) sb.Append("-Back2"); 151opcode &= RegexOpcode.OperatorMask; 155case RegexOpcode.One: 156case RegexOpcode.Onerep: 157case RegexOpcode.Oneloop: 158case RegexOpcode.Oneloopatomic: 159case RegexOpcode.Onelazy: 160case RegexOpcode.Notone: 161case RegexOpcode.Notonerep: 162case RegexOpcode.Notoneloop: 163case RegexOpcode.Notoneloopatomic: 164case RegexOpcode.Notonelazy: 168case RegexOpcode.Set: 169case RegexOpcode.Setrep: 170case RegexOpcode.Setloop: 171case RegexOpcode.Setloopatomic: 172case RegexOpcode.Setlazy: 176case RegexOpcode.Multi: 180case RegexOpcode.Backreference: 181case RegexOpcode.TestBackreference: 185case RegexOpcode.Capturemark: 193case RegexOpcode.Nullcount: 194case RegexOpcode.Setcount: 198case RegexOpcode.Goto: 199case RegexOpcode.Lazybranch: 200case RegexOpcode.Branchmark: 201case RegexOpcode.Lazybranchmark: 202case RegexOpcode.Branchcount: 203case RegexOpcode.Lazybranchcount: 210case RegexOpcode.Onerep: 211case RegexOpcode.Oneloop: 212case RegexOpcode.Oneloopatomic: 213case RegexOpcode.Onelazy: 214case RegexOpcode.Notonerep: 215case RegexOpcode.Notoneloop: 216case RegexOpcode.Notoneloopatomic: 217case RegexOpcode.Notonelazy: 218case RegexOpcode.Setrep: 219case RegexOpcode.Setloop: 220case RegexOpcode.Setloopatomic: 221case RegexOpcode.Setlazy: 225case RegexOpcode.Branchcount: 226case RegexOpcode.Lazybranchcount:
System\Text\RegularExpressions\RegexNodeKind.cs (26)
17One = RegexOpcode.One, 20Notone = RegexOpcode.Notone, 23Set = RegexOpcode.Set, 27Multi = RegexOpcode.Multi, 34Oneloop = RegexOpcode.Oneloop, 38Notoneloop = RegexOpcode.Notoneloop, 42Setloop = RegexOpcode.Setloop, 47Onelazy = RegexOpcode.Onelazy, 51Notonelazy = RegexOpcode.Notonelazy, 55Setlazy = RegexOpcode.Setlazy, 62Oneloopatomic = RegexOpcode.Oneloopatomic, 68Notoneloopatomic = RegexOpcode.Notoneloopatomic, 74Setloopatomic = RegexOpcode.Setloopatomic, 78Backreference = RegexOpcode.Backreference, 81Bol = RegexOpcode.Bol, 83Eol = RegexOpcode.Eol, 85Boundary = RegexOpcode.Boundary, 87NonBoundary = RegexOpcode.NonBoundary, 89ECMABoundary = RegexOpcode.ECMABoundary, 91NonECMABoundary = RegexOpcode.NonECMABoundary, 93Beginning = RegexOpcode.Beginning, 95Start = RegexOpcode.Start, 97EndZ = RegexOpcode.EndZ, 99End = RegexOpcode.End, 102UpdateBumpalong = RegexOpcode.UpdateBumpalong, 105Nothing = RegexOpcode.Nothing,
System\Text\RegularExpressions\RegexOpcode.cs (1)
10/// each of which is an <see cref="RegexOpcode"/> stored as an int, followed immediately by all of the operands
System\Text\RegularExpressions\RegexWriter.cs (53)
75Emit(RegexOpcode.Lazybranch, 0); 111Emit(RegexOpcode.Stop); 139private void Emit(RegexOpcode op) 150private void Emit(RegexOpcode op, int opd1) 162private void Emit(RegexOpcode op, int opd1, int opd2) 203RegexOpcode bits = 0; 206bits |= RegexOpcode.RightToLeft; 210bits |= RegexOpcode.CaseInsensitive; 224Emit(RegexOpcode.Lazybranch, 0); 234Emit(RegexOpcode.Goto, 0); 251Emit(RegexOpcode.Setjump); 253Emit(RegexOpcode.Lazybranch, 0); 254Emit(RegexOpcode.TestBackreference, RegexParser.MapCaptureNumber(node.M, _tree.CaptureNumberSparseMapping)); 255Emit(RegexOpcode.Forejump); 267Emit(RegexOpcode.Goto, 0); 269Emit(RegexOpcode.Forejump); 282Emit(RegexOpcode.Setjump); 283Emit(RegexOpcode.Setmark); 285Emit(RegexOpcode.Lazybranch, 0); 294Emit(RegexOpcode.Getmark); 295Emit(RegexOpcode.Forejump); 300Emit(RegexOpcode.Goto, 0); 302Emit(RegexOpcode.Getmark); 303Emit(RegexOpcode.Forejump); 315Emit(node.M == 0 ? RegexOpcode.Nullcount : RegexOpcode.Setcount, node.M == 0 ? 0 : 1 - node.M); 317Emit(node.M == 0 ? RegexOpcode.Nullmark : RegexOpcode.Setmark); 322Emit(RegexOpcode.Goto, 0); 334Emit(RegexOpcode.Branchcount + Lazy, _intStack.Pop(), node.N == int.MaxValue ? int.MaxValue : node.N - node.M); 336Emit(RegexOpcode.Branchmark + Lazy, _intStack.Pop()); 344Emit(RegexOpcode.Setmark); 348Emit(RegexOpcode.Capturemark, RegexParser.MapCaptureNumber(node.M, _tree.CaptureNumberSparseMapping), RegexParser.MapCaptureNumber(node.N, _tree.CaptureNumberSparseMapping)); 352Emit(RegexOpcode.Setjump); // causes lookahead/lookbehind to be non-backtracking 353Emit(RegexOpcode.Setmark); 357Emit(RegexOpcode.Getmark); 358Emit(RegexOpcode.Forejump); // causes lookahead/lookbehind to be non-backtracking 362Emit(RegexOpcode.Setjump); 364Emit(RegexOpcode.Lazybranch, 0); 368Emit(RegexOpcode.Backjump); 370Emit(RegexOpcode.Forejump); 374Emit(RegexOpcode.Setjump); 378Emit(RegexOpcode.Forejump); 383Emit((RegexOpcode)node.Kind | bits, node.Ch); 395RegexOpcode.Onerep : RegexOpcode.Notonerep) | bits, node.Ch, node.M); 399Emit((RegexOpcode)node.Kind | bits, node.Ch, node.N == int.MaxValue ? int.MaxValue : node.N - node.M); 410Emit(RegexOpcode.Setrep | bits, stringCode, node.M); 414Emit((RegexOpcode)node.Kind | bits, stringCode, (node.N == int.MaxValue) ? int.MaxValue : node.N - node.M); 420Emit((RegexOpcode)node.Kind | bits, StringCode(node.Str!)); 424Emit((RegexOpcode)node.Kind | bits, StringCode(node.Str!)); 428Emit((RegexOpcode)node.Kind | bits, RegexParser.MapCaptureNumber(node.M, _tree.CaptureNumberSparseMapping)); 443Emit((RegexOpcode)node.Kind);