public Grammar translate(Grammar from) {
   nQualifiedRules = 0;
   nQualifiedExpressions = 0;
   for (Rule r : from) {
     r.accept(this, null);
   }
   System.err.println("bounded rules = " + nQualifiedRules);
   System.err.println("bounded expressions = " + nQualifiedExpressions);
   return from;
 }
 @Override
 protected Void visit(Rule node, Object context) {
   super.visit(node, context);
   if ((node.flags() & Rule.BOUNDED) != 0) {
     nQualifiedRules++;
   }
   return null;
 }