/// <summary> /// Initializes a new copy of the <see cref="Eto.Parse.Grammar"/> class /// </summary> /// <param name="other">Other object to copy</param> /// <param name="args">Arguments for the copy</param> protected Grammar(Grammar other, ParserCloneArgs args) { this.EnableMatchEvents = other.EnableMatchEvents; this.Separator = args.Clone(other.Separator); this.CaseSensitive = other.CaseSensitive; this.Optimizations = other.Optimizations; }
protected UntilParser(UntilParser other, ParserCloneArgs args) : base(other, args) { Minimum = other.Minimum; Maximum = other.Maximum; Skip = other.Skip; Capture = other.Capture; }
protected RepeatParser(RepeatParser other, ParserCloneArgs args) : base(other, args) { Minimum = other.Minimum; Maximum = other.Maximum; Until = args.Clone(other.Until); SkipUntil = other.SkipUntil; CaptureUntil = other.CaptureUntil; Separator = args.Clone(other.Separator); }
public abstract Parser Clone(ParserCloneArgs args);
/// <summary> /// Initializes a new copy of the <see cref="Eto.Parse.Parser"/> class /// </summary> /// <param name="other">Parser to copy</param> /// <param name="args">Arguments for the copy</param> protected Parser(Parser other, ParserCloneArgs args) { AddError = other.AddError; args.Add(other, this); }
public override Parser Clone(ParserCloneArgs args) { return new AlternativeParser(this, args); }
protected AlternativeParser(AlternativeParser other, ParserCloneArgs chain) : base(other, chain) { }
protected EndParser(EndParser other, ParserCloneArgs chain) : base(other, chain) { }
public override Parser Clone(ParserCloneArgs args) { return new UntilParser(this, args); }
protected ListParser(ListParser other, ParserCloneArgs chain) : base(other, chain) { Items = new List<Parser>(other.Items.Select(chain.Clone)); }
public override Parser Clone(ParserCloneArgs args) { return new LiteralTerminal(this, args); }
protected LiteralTerminal(LiteralTerminal other, ParserCloneArgs chain) : base(other, chain) { CaseSensitive = other.CaseSensitive; Value = other.Value; }
protected UnaryParser(UnaryParser other, ParserCloneArgs args) : base(other, args) { Inner = args.Clone(other.Inner); }
public override Parser Clone(ParserCloneArgs args) { return(new UnaryParser(this, args)); }
public override Parser Clone(ParserCloneArgs args) { return new Grammar(this, args); }
public override Parser Clone(ParserCloneArgs args) { return(new Grammar(this, args)); }
protected ListParser(ListParser other, ParserCloneArgs chain) : base(other, chain) { Items = new List <Parser>(other.Items.Select(chain.Clone)); }
public override Parser Clone(ParserCloneArgs args) { return new RepeatParser(this, args); }
protected StartParser(StartParser other, ParserCloneArgs chain) : base(other, chain) { }