Beispiel #1
0
 /*
     protected YYNode insert(YYNode n) {
         expand(n);
         return (YYNode)insertSon(n);
     }
 */
 protected YYNode absorb(YYNode n) {
   YYNode s = (YYNode) n.firstSon();
   for (; s != null; s = (YYNode) s.nextBrother()) {
     this.addSon(s);
   }
   return this.expand(n);
 }
Beispiel #2
0
 /** Writing to the output */
 public void write(Writer w) throws IOException {
   StringBuffer buf = ibuf().getbuf();
   int beg = this.beg_charno0;
   int pos = beg;
   Iterator<Node> i = iterator();
   while (i.hasNext()) {
     YYNode n = (YYNode) i.next();
     w.write(buf.substring(pos, n.beg_charno0));
     n.write(w);
     pos = n.end_charno0;
   }
   w.write(buf.substring(pos, this.end_charno0));
 }