code: protected void assignLevel() {
  
      int lvl = Integer.MAX_VALUE;
  
      SAXSymbol sym;
  
      for (sym = this.first(); (!sym.isGuard()); sym = sym.n) {
  
        if (sym.isNonTerminal()) {
          SAXRule referedTo = ((SAXNonTerminal) sym).r;
          lvl = Math.min(referedTo.level + 1, lvl);
        }
        else {
          level = 1;
          return;
        }
  
      }
  
      level = lvl;
    }
docs: This traces the rule level.