@Override
	public void dumpProductions()
	{
		int i = 0;
		for(NonTerminal nt : grammar.getNT())
		{
			if(!grammar.pContains(nt)) continue;
			for(Production p : grammar.getP(nt))
			{
				Element productionElement = (Element) dumpTop.appendChild(document.createElement("production"));
				productionElement.setAttribute("tag","p" + i);
				productionElement.setAttribute("id",p.toString());
				if(grammar.getOwner(p) != null && numbering.containsKey(grammar.getOwner(p)))
				{
					productionElement.setAttribute("owner","g" + numbering.get(grammar.getOwner(p)));
				}
				productionElement.setAttribute("name",p.getName().toString());
				if(grammar.hasDisplayName(p.getName()))
				{
					Element displayNameElement = (Element) productionElement.appendChild(document.createElement("displayname"));
					displayNameElement.setTextContent(grammar.getDisplayName(nt.getId()));
				}
				Element lhsElement = (Element) productionElement.appendChild(document.createElement("lhs"));
				lhsElement.setTextContent("nt" + numbering.get(p.getLeft()));
				for(GrammarSymbol s : p.getRight())
				{
					Element rhsElement = (Element) productionElement.appendChild(document.createElement("rhssym"));
					if(s instanceof Terminal) rhsElement.setTextContent("t" + numbering.get(s));
					else if(s instanceof NonTerminal) rhsElement.setTextContent("nt" + numbering.get(s));
				}
				numbering.put(p,i++);
			}
		}
	}