static Productions() { Expr = NonTerminals.Expr; ExprTail = NonTerminals.ExprTail; Term = NonTerminals.Term; TermTail = NonTerminals.TermTail; Factor = NonTerminals.Factor; Expr.Add(NonTerminals.Term + NonTerminals.ExprTail); ExprTail.Add(("+" + NonTerminals.Term + NonTerminals.ExprTail) | ("-" + NonTerminals.Term + NonTerminals.ExprTail) | (Terminal.Epsilon) ); Term.Add(NonTerminals.Factor + NonTerminals.TermTail); TermTail.Add(("*" + NonTerminals.Factor + NonTerminals.TermTail) | ("/" + NonTerminals.Factor + NonTerminals.TermTail) | (Terminal.Epsilon) ); Factor.Add("(" + NonTerminals.Expr + ")") .Add(Terminals.Number); }
public ListItem(string term, string description) { Term.Add(new TextRun(term)); Description.Add(new TextRun(description)); }