static void markNode(IdGroup idGroup, Node node, boolean[] split) { if (node.isLeaf()) { String name = node.getIdentifier().getName(); int index = idGroup.whichIdNumber(name); if (index < 0) { throw new IllegalArgumentException("INCOMPATIBLE IDENTIFIER (" + name + ")"); } split[index] = true; } else { for (int i = 0; i < node.getChildCount(); i++) { markNode(idGroup, node.getChild(i), split); } } }
@Override public int whichIdNumber(String name) { return idg.whichIdNumber(name); }