- Forest forest = current.token==null ? null : shiftToken((Tok)current.token, loc);
- GSS.Phase next = gss.new Phase<Tok>(current, this, current, input.next(count, gss.resets, gss.waits), loc, forest);
+ Forest forest = current.token==null ? null : shiftToken(oldloc, (Tok)current.token, loc);
+ GSS.Phase next = gss.new Phase<Tok>(current, this, current, input.next(), loc, forest);
+ if (!helpgc) {
+ FileOutputStream fos = new FileOutputStream("out-"+idx+".dot");
+ PrintWriter p = new PrintWriter(new OutputStreamWriter(fos));
+ GraphViz gv = new GraphViz();
+ for(Object n : next)
+ ((GSS.Phase.Node)n).toGraphViz(gv);
+ gv.dump(p);
+ p.flush();
+ p.close();
+ }