public Object getParentNode(Object foo) throws UnsupportedAxisException {
		if (DEBUG) {
			System.out.println(this.getClass().getName() + ".getParentNode("
					+ foo + ")");
		}

		if (foo instanceof Tree) {
			final Tree tree = (Tree) foo;
			return tree.getParent();

		} else if (foo instanceof ANTLRTreeAttribute) {
			final ANTLRTreeAttribute attribute = (ANTLRTreeAttribute) foo;
			return attribute.getTree();

		} else {
			return null;
		}
	}