예제 #1
0
 public Rule(Symbol lhs, object rhsObject, RuleCollection ruleCollection)
 {
     LHS = lhs;
     RHS = new List <Symbol>();
     RHS.Add(new Symbol(rhsObject));
     ruleCollection.Add(this);
 }
예제 #2
0
 public Rule(Symbol lhs, Symbol rhs, RuleCollection ruleCollection)
 {
     LHS = lhs;
     RHS = new List <Symbol>()
     {
         rhs
     };
     ruleCollection.Add(this);
 }
예제 #3
0
 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);
 }
예제 #4
0
 public Rule(Symbol lhs, List <Symbol> rhs, RuleCollection ruleCollection)
 {
     LHS = lhs;
     RHS = rhs;
     ruleCollection.Add(this);
 }