public void parse() throws Exception {
		
		initConfig();
		
		String action = "";
		
		while (!action.equals("ACCEPT")) {
			
			Symbol beta1 = beta.pop();
			Symbol alpha1 = alpha.peek();
			
			if ( beta==null || alpha==null ) {
				throw new Exception("ERROR: stack are empty");
			}
			
			
			SymbolPair pair = new SymbolPair(beta1, alpha1);	
			if ( table.containsKey( pair ) ) {
				
				TableCell cell = table.get(pair);
				action = cell.getName();
				
				if (action.equals("PUSH")) {
					
					for (int i=cell.getAlpha().size()-1 ; i>=0 ; i--) {
						if (!cell.getAlpha().get(i).equals(Grammar.EPSILON)) {
							beta.push( cell.getAlpha().get(i) );
						}
					}
					pi.push( cell.getProductionNr() );
					
				}
				
				if (action.equals("POP")) {
					alpha.pop();
				}
				
				
			} else {
				throw new Exception("ERROR at: (" + beta1 + "," + alpha1 + ")");
			}
			
		
			
		}
		
		constructTree();
		
	}