public RuleSpec(IEnumerable <Mode> modes, string name, RegexSpec expression, IEnumerable <Command> commands)
 {
     Modes      = new HashSet <Mode>(modes);
     Name       = name;
     IsFragment = char.IsLower(name, 0);
     Expression = expression;
     Commands   = commands.ToList();
 }
 public RuleSpec(IEnumerable<Mode> modes, string name, RegexSpec expression, IEnumerable<Command> commands)
 {
     Modes = new HashSet<Mode>(modes);
     Name = name;
     IsFragment = char.IsLower(name, 0);
     Expression = expression;
     Commands = commands.ToList();
 }
 private static RegexSpec R(RegexSpec regex)
 {
     return(regex);
 }
 public RuleSpec(Mode mode, string name, RegexSpec expression, params Command[] commands)
     : this(new[] { mode }, name, expression, commands)
 {
 }
 public RuleSpec(Mode mode, string name, RegexSpec expression, params Command[] commands)
     : this(new[] { mode }, name, expression, commands)
 {
 }
 protected abstract RegexSpec Simplify(LexerSpec lexerSpec, RegexSpec exp, bool changed);
 protected UnaryRegexSpec(RegexSpec expression)
 {
     Expression = expression;
 }