Esempio n. 1
0
        public static IAutomatonTable <char> BuildAutomatonTable(IEnumerable <string> Rules)
        {
            IAutomatonTableFactory <char>     automatonTableFactory;
            IAutomatonTable <char>            automatonTable;
            SituationCollectionFactory <char> situationCollectionFactory;
            DistinctInputFactory distinctInputFactory;

            distinctInputFactory       = new DistinctInputFactory(new RangeValueProvider());
            automatonTableFactory      = new AutomatonTableFactory <char>( );
            situationCollectionFactory = new SituationCollectionFactory <char>(SituationGraphHelper.BuildSituationGraph(Rules.Select(item => RuleHelper.BuildRule(item)).ToArray()));
            automatonTable             = automatonTableFactory.BuildAutomatonTable(situationCollectionFactory, distinctInputFactory);

            return(automatonTable);
        }
Esempio n. 2
0
 public static ISituationCollectionFactory <char> BuildSituationCollectionFactory(IEnumerable <IRule <char> > Rules)
 {
     return(new SituationCollectionFactory <char>(SituationGraphHelper.BuildSituationGraph(Rules)));
 }