private static ParsedRegex visitRegexCharsetNode(Node n,String inheritance, CompilerLogger logger)
	throws CopperException
	{
		LinkedList<CharacterSet> constituents = new LinkedList<CharacterSet>();
		for(int i = 0;i < n.getChildNodes().getLength();i++)
		{
			CharacterSet pr = visitRegexInteriorCharsetNode(n.getChildNodes().item(i),inheritance,logger);
			if(pr != null) constituents.add(pr);
		}
		CharacterSet union;
		if(constituents.size() == 0)
		{
			if(logger.isLoggable(CompilerLogMessageSort.ERROR)) logger.logErrorMessage(CompilerLogMessageSort.ERROR,null,"Empty character set");
			return null;
		}
		else if(constituents.size() == 1)
		{
			union = constituents.getFirst();
		}
		else
		{
			union = CharacterSet.instantiate(CharacterSet.LOOSE_CHARACTERS);
			for(CharacterSet cs : constituents) union = CharacterSet.union(union,cs);
		}
		// DEBUG-X-BEGIN
		//System.err.println(n.hasAttributes() + " " + n.getAttributes().getNamedItem("invert"));
		// DEBUG-X-END
		if(n.hasAttributes() && n.getAttributes().getNamedItem("invert") != null)
		{
			union = union.invertSet();
		}
		return union;
	}