示例#1
0
 public void addTermNode(TermNode term)
 {
     terms.Add(term);
 }
示例#2
0
 public void Visit(TermNode termNode)
 {
     if(termNode.neg) {
         PrintLine("<neg_term>");
     } else {
         PrintLine("<term>");
     }
     indent();
     int count = 0;
     foreach (FactorNode f in termNode.factors) {
         if(count > 0) {
             PrintLine(termNode.opers[count-1]);
         }
         f.Accept(this);
         count++;
     }
     unindent();
     if(termNode.neg) {
         PrintLine("</neg_term>");
     } else {
         PrintLine("</term>");
     }
 }
 public void Visit(TermNode termNode)
 {
     throw new NotImplementedException();
 }
示例#4
0
 public void Visit(TermNode termNode)
 {
     int count = 0;
     foreach (FactorNode f in termNode.factors) {
         if(count > 0) {
             Print(termNode.opers[count-1]);
         }
         f.Accept(this);
         count++;
     }
 }