//Pipe/Alternative //New version proposed by the codeplex user bdaugherty internal static BnfExpression Op_Pipe(BnfTerm term1, BnfTerm term2) { BnfExpression expr1 = term1 as BnfExpression; if (expr1 == null) { expr1 = new BnfExpression(term1); } BnfExpression expr2 = term2 as BnfExpression; if (expr2 == null) { expr2 = new BnfExpression(term2); } expr1.Data.AddRange(expr2.Data); return(expr1); }
public NonTerminal(string name, BnfExpression expression) : this(name) { Rule = expression; }
public NonTerminal(string name, BnfExpression expression) : this(name) { Rule = expression; Flags |= TermFlags.NoAstNode; }