protected void hypothesizeChomsky(GrammarEnvironment env, Grammar g) {
		//System.out.println("Chomsky TIME");
		
		CNFConverter converter = null;
		try {
			converter = new CNFConverter(g);
		} catch (IllegalArgumentException e) {
			JOptionPane.showMessageDialog(env, e.getMessage(),
					"Illegal Grammar", JOptionPane.ERROR_MESSAGE);
			return;
		}
		Production[] p = g.getProductions();
		boolean chomsky = true;
		for (int i = 0; i < p.length; i++)
			chomsky &= converter.isChomsky(p[i]);
		
		if (!chomsky) {
			ArrayList <Production> resultList=new ArrayList <Production>();
			for (int i=0; i<p.length; i++)
			{
				myTempCNF=new ArrayList <Production>();
				converter = new CNFConverter(g);
				convertToCNF(converter, p[i]);
				resultList.addAll(myTempCNF);
			}
			Production[] pp=new Production[resultList.size()];
			for (int i=0; i<pp.length; i++)
			{
				pp[i]=resultList.get(i);
			}
			pp=converter.convert(pp);
			String var=g.getStartVariable();
			g=new UnrestrictedGrammar();
			g.addProductions(pp);
			g.setStartVariable(var);
			
		}
		myGrammar=g;
	}