private void getRulesUnderSymbol(String nonterminal, Syntax sourceSyntax, Map done)	{
		if (done.get(nonterminal) != null)
			return;
		done.put(nonterminal, nonterminal);

		for (int i = 0; i < sourceSyntax.size(); i++)	{
			Rule rule = sourceSyntax.getRule(i);
			if (rule.getNonterminal().equals(nonterminal))	{
				addRule(rule);
				for (int j = 0; j < rule.rightSize(); j++)	{	// cascade to other rules
					String sym = rule.getRightSymbol(j);
					if (Token.isTerminal(sym) == false && sym.equals(Token.BUTNOT) == false && sym.equals(Token.UPTO) == false)
						getRulesUnderSymbol(sym, sourceSyntax, done);
				}
			}
		}
	}