private static ParsedRegex visitRegexMacroNode(Node n,String inheritance,CompilerLogger logger)
	throws CopperException
	{
		int termNodeIndex = -1;
		for(int i = 0;i < n.getChildNodes().getLength();i++)
		{
			if(n.getChildNodes().item(i).getNodeName().equals("term"))
			{
				if(termNodeIndex == -1) termNodeIndex = i;
				else
				{
					formalError(logger,n,"has more than one","term","child");
					return null;
				}
			}
			else if(!n.getChildNodes().item(i).getNodeName().startsWith("#"))
			{
				formalError(logger,n,"has invalid",n.getChildNodes().item(i).getNodeName(),"child");
				return null;
			}
		}
		
		if(n.getChildNodes().item(termNodeIndex).getAttributes().getNamedItem("id") == null)
		{
			formalError(logger,n.getChildNodes().item(termNodeIndex),"missing","id","attribute");
			return null;
		}

		return new MacroHole(new Terminal(n.getChildNodes().item(termNodeIndex).getAttributes().getNamedItem("id").getTextContent()));
	}