public Rule(Symbol lhs, object rhsObject, RuleCollection ruleCollection) { LHS = lhs; RHS = new List <Symbol>(); RHS.Add(new Symbol(rhsObject)); ruleCollection.Add(this); }
public Rule(Symbol lhs, Symbol rhs, RuleCollection ruleCollection) { LHS = lhs; RHS = new List <Symbol>() { rhs }; ruleCollection.Add(this); }
public Rule(Symbol lhs, IEnumerable <object> rhsObjects, RuleCollection ruleCollection) { LHS = lhs; RHS = new List <Symbol>(); foreach (object rhsObject in rhsObjects) { RHS.Add(new Symbol(rhsObject)); } ruleCollection.Add(this); }
public Rule(Symbol lhs, List <Symbol> rhs, RuleCollection ruleCollection) { LHS = lhs; RHS = rhs; ruleCollection.Add(this); }