public final Expression processFile() throws IOException {
		
		mNumberOfVariables = 0;
		mNumberOfClauses = 0;
		mMaxParsedIndex = 0;
		
		try (Scanner scanner = new Scanner(mFilePath, ENCODING.name())) {
			
			while (scanner.hasNextLine() && !encounteredError()) {
				
				processLine(scanner.nextLine());
				
			}
			
			scanner.close();
			
		}
		
		if (encounteredError()) {
			
			return null;
			
		}
		
		if (wrongPreferencesAmounts()) {
			
			println("Error: parsed expression amounts differ from preference amounts.");
			return null;
			
		}
		
		return mExpression;
		
	}