public KeyToken(TermFlags flags = TermFlags.None) : base(Token.Value, Token.Value) { this.Flags |= flags; if (this.FlagIsSet(TermFlags.IsKeyword) && !Keywords.ContainsKey(this.Text)) { Keywords[this.Text] = this; } }
public Terminal(string name, TokenCategory category, TermFlags flags) : base(name) { Category = category; this.Flags |= flags; if (Category == TokenCategory.Outline) { this.SetFlag(TermFlags.IsPunctuation); } OutputTerminal = this; }
private static NonTerminal NonTerminal(string name, BnfExpression rule, TermFlags flags = TermFlags.None) { var nonTerminal = NonTerminal(name, rule, n => new ElementsHolder { DebugName = name, Elements = n.Elements() }); nonTerminal.SetFlag(flags); return(nonTerminal); }
public void SetFlag(TermFlags flag, bool value) { if (value) { Flags |= flag; } else { Flags &= ~flag; } }
public Term(string name, int id, TermFlags flags) { #region Preconditions if (name == null) throw new ArgumentNullException("name"); #endregion this.id = id; this.name = name; this.flags = flags; this.lexeme = new Lexeme(this); }
public CompoundTerminalBase(string name, TermFlags flags) : base(name) { SetFlag(flags); Escapes = GetDefaultEscapes(); }
public static bool IsSet(this TermFlags flags, TermFlags flag) { return((flags & flag) != 0); }
public static bool IsSet(this TermFlags flags, TermFlags flag) { return (flags & flag) != 0; }
public TermInfo(TermFlags flags) { this.flags = flags; }
public void RemoveFlag(TermFlags flag) { flags &= ~flag; }
public void AddFlag(TermFlags flag) { flags |= flag; }
public void SetFlag(TermFlags flag) { SetFlag(flag, true); }
public bool FlagIsSet(TermFlags flag) { return((Flags & flag) != 0); }
public static bool IsSet(this TermFlags enumValue, TermFlags flag) { return((enumValue & flag) != 0); }
public static bool IsSet(this TermFlags enumValue, TermFlags flag) { return (enumValue & flag) != 0; }
public Terminal(string name, string errorAlias, TokenCategory category, TermFlags flags) : this(name, category, flags) { this.ErrorAlias = errorAlias; }
public void ChangeFlag(TermFlags flag, bool value) { if (value) AddFlag(flag); else RemoveFlag(flag); }
public Term(string name, TermFlags flags = TermFlags.None) : this(name, 0, flags) { }