Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 @Override
 protected Void visit(Rule node, Object context) {
   super.visit(node, context);
   if ((node.flags() & Rule.BOUNDED) != 0) {
     nQualifiedRules++;
   }
   return null;
 }