private static MakeFlags ( bool negate, bool ignore, bool reverse, bool lazy ) : OpFlags | ||
negate | bool | |
ignore | bool | |
reverse | bool | |
lazy | bool | |
리턴 | OpFlags |
public void EmitSet(char lo, BitArray set, bool negate, bool ignore, bool reverse) { this.Emit(OpCode.Set, PatternCompiler.MakeFlags(negate, ignore, reverse, false)); this.Emit((ushort)lo); int num = set.Length + 15 >> 4; this.Emit((ushort)num); int num2 = 0; while (num-- != 0) { ushort num3 = 0; for (int i = 0; i < 16; i++) { if (num2 >= set.Length) { break; } if (set[num2++]) { num3 |= (ushort)(1 << i); } } this.Emit(num3); } }
public void EmitAnchor(bool reverse, int offset, LinkRef tail) { this.BeginLink(tail); this.Emit(OpCode.Anchor, PatternCompiler.MakeFlags(false, false, reverse, false)); this.EmitLink(tail); this.Emit((ushort)offset); }
public void EmitFastRepeat(int min, int max, bool lazy, LinkRef tail) { this.BeginLink(tail); this.Emit(OpCode.FastRepeat, PatternCompiler.MakeFlags(false, false, false, lazy)); this.EmitLink(tail); this.EmitCount(min); this.EmitCount(max); }
public void EmitCharacter(char c, bool negate, bool ignore, bool reverse) { this.Emit(OpCode.Character, PatternCompiler.MakeFlags(negate, ignore, reverse, false)); if (ignore) { c = char.ToLower(c); } this.Emit((ushort)c); }
public void EmitString(string str, bool ignore, bool reverse) { this.Emit(OpCode.String, PatternCompiler.MakeFlags(false, ignore, reverse, false)); int length = str.Length; this.Emit((ushort)length); if (ignore) { str = str.ToLower(); } for (int i = 0; i < length; i++) { this.Emit((ushort)str[i]); } }
public void EmitRange(char lo, char hi, bool negate, bool ignore, bool reverse) { this.Emit(OpCode.Range, PatternCompiler.MakeFlags(negate, ignore, reverse, false)); this.Emit((ushort)lo); this.Emit((ushort)hi); }
public void EmitNotCategory(Category cat, bool negate, bool reverse) { this.Emit(OpCode.NotCategory, PatternCompiler.MakeFlags(negate, false, reverse, false)); this.Emit((ushort)cat); }
public void EmitReference(int gid, bool ignore, bool reverse) { this.Emit(OpCode.Reference, PatternCompiler.MakeFlags(false, ignore, reverse, false)); this.Emit((ushort)gid); }