示例#1
0
        public EarleyEngine(Grammar grammar)
        {
            Grammar     = grammar;
            DottedRules = new DottedRuleFactory(Grammar.Productions);
            EarleyItems = new EarleyStateFactory(DottedRules);
            Location    = 0;
            Chart       = new Chart();

            Initialize();
        }
示例#2
0
 public DottedRule(DottedRuleFactory factory, Production production, int dot)
 {
     this.factory = factory;
     Production   = production;
     Dot          = dot;
 }
示例#3
0
 public EarleyStateFactory(DottedRuleFactory dottedRules)
 {
     DottedRules = dottedRules;
 }