public static void main(String[] args) throws IOException {
		File inputFile = new File(inputPath);
		if (inputFile == null) return;

		queryInput = ReadFile(inputFile,queryInput);//get all query inputs
		for (String query:queryInput) {//traverse each query
			queryTree = new ArrayList<Node>();
			queryID = Integer.parseInt(query.split(":")[0]);

			//create the parse tree for current
			new parseTree();
			queryTree = parseTree.queryParse(query.split(":")[1], queryTree);

			//get evaluation result
			ArrayList<InveList> finalResult = new ArrayList<InveList>();
			new evalQuery();
			evalQuery.queryEvaluation(queryTree, queryID,IsRanked);
			finalResult = evalQuery.finalResult;

			//ranking evaluation result
			//for Ranked and UnRanked, there are different methods
			if (IsRanked == "Ranked") {
				Myrankcomparator comp1 = new Myrankcomparator();
				Collections.sort(finalResult,comp1);
			}
			else if (IsRanked == "UnRanked"){
				Myunrankcomparator comp2 = new Myunrankcomparator();
				Collections.sort(finalResult,comp2);
			}

			//output ranked result to appointed file
			File outputFile = new File(main.outputPath);
			if (outputFile == null) return;
			WriteFile(finalResult,outputFile);
			System.out.println(query.split(":")[1]);
		}

		System.out.println("Finished!");
	}