//X → A B public static ProductionBase <TR> SelectMany <T1, T2, TR>( this ProductionBase <T1> p1, Func <T1, ProductionBase <T2> > p2Selector, Func <T1, T2, TR> resultSelector) { return(new ConcatenationProduction <T1, T2, TR>(p1, p2Selector, resultSelector)); }
public ConcatenationProduction( ProductionBase <T1> p1, Func <T1, ProductionBase <T2> > p2Selector, Func <T1, T2, TR> resultSelector) { m_p1 = p1; m_p2Selector = p2Selector; m_resultSelector = resultSelector; }
public MappingProduction(ProductionBase <T> p, Func <T, TR> resultSelector) { m_p = p; m_resultSelector = resultSelector; }
//X → A public static ProductionBase <TR> Select <T, TR>( this ProductionBase <T> p1, Func <T, TR> resultSelector) { return(new MappingProduction <T, TR>(p1, resultSelector)); }
//X → A //X → B public static ProductionBase <T> Union <T>( this ProductionBase <T> p1, ProductionBase <T> p2) { return(new AlternationProduction <T>(p1, p2)); }
public ParserRunner(ProductionBase <T> parseFunc) { m_parseFunc = parseFunc.BuildParse(FinalFuture); }