private void generateFollow(Syntax syntax, Nullable nullAble, FirstSets firstSets)	{
		// The FOLLOW set of a nonterminal are all symbols that appear after the
		// nonterminal on the right side of all rules. If the nonterminal stands
		// at last position, add the FOLLOW set of the left side of this rule.
		
		// loop across all syntax rules
		for (int rulePos = 0; rulePos < syntax.size(); rulePos++)	{
			Rule rule = syntax.getRule(rulePos);
			String nonterm = rule.getNonterminal();	// left side of derivation

			if (rulePos == 0)	{	// START node, FOLLOW of start node is always epsilon
				put(nonterm, Token.EPSILON);
				// first rule is made programmatically, add Epsilon to FOLLOW
				put(rule.getRightSymbol(0), Token.EPSILON);
			}
			else	{
				List nonterms = new ArrayList();	// collect receiving nonterminals
				
				for (int i = 0; i < rule.rightSize(); i++)	{
					String symbol = rule.getRightSymbol(i);
					boolean isTerminal = Token.isTerminal(symbol);
					
					if (nonterms.size() > 0)	{	// if there are receivers (not at first element)
						// add symbol to FOLLOW sets of all nonterminals in local list
						List l;
						if (isTerminal)	{
							l = new ArrayList();
							l.add(symbol);	// terminal goes to FOLLOW set
						}
						else	{
							l = (List) firstSets.get(symbol);	// FIRST(symbol) goes to FOLLOW set
						}
						//System.err.println("rule "+rule+", adding to "+nonterms+" symbols "+v);
						addToAllFollowSets(nonterms, l);
					}
					
					if (isTerminal || nullAble.isNullable(symbol) == false)	{	// if it is a terminal or can not be null
						nonterms.clear();	// empty list of receiving nonterminals
					}

					if (isTerminal == false)	{	// if it is a nonterminal
						nonterms.add(symbol);
						
						if (i == rule.rightSize() - 1)	{	// at end
							// add left side of rule to FOLLOW sets of all collected nonterminals
							List l = new ArrayList();
							l.add(nonterm);
							addToAllFollowSets(nonterms, l);
						}
					}
				}	// end for all symbols
			}	// end if rule position 0
		}	// end for, loop across rules
	}