Ejemplo n.º 1
0
 public List<Rule> GetRules(NonTerminal term)
 {
     return _productions[term].Select(p => new Rule(term, new List<Symbol>(p))).ToList();
 }
Ejemplo n.º 2
0
 public void Add(NonTerminal term, IEnumerable<Symbol> production)
 {
     if (!_productions.ContainsKey(term))
         _productions.Add(term, new List<List<Symbol>>(1));
     _productions[term].Add(production as List<Symbol> ?? production.ToList());
 }
Ejemplo n.º 3
0
Archivo: Rule.cs Proyecto: surenkov/UCP
 public Rule(NonTerminal name, List<Symbol> production)
     : this(name, production, 0)
 { }
Ejemplo n.º 4
0
Archivo: Rule.cs Proyecto: surenkov/UCP
 protected Rule(NonTerminal name, List<Symbol> production, int dot)
 {
     Name = name;
     Production = production;
     Dot = dot;
 }
Ejemplo n.º 5
0
 private EarleyRule(NonTerminal name, List<Symbol> production, int dot, int start)
     : base(name, production, dot)
 {
     Start = start;
 }
Ejemplo n.º 6
0
 public EarleyRule(NonTerminal name, List<Symbol> production, int start)
     : this(name, production, 0, start)
 {
 }