public static Node Parse(String query) throws Exception{
		ArrayList<String> tokens = new ArrayList<String>();
		Node root = null;
		Node lastNode = null;
		String token;
		int startIndex = 0;
		
		// Default operator is OR
		if(query.charAt(0) != '#'){
			tokens.add("#OR");
		}
		
		// Loop to read next token
		while((token = nextToken(query.substring(startIndex, query.length()))) != null){
			tokens.add(token);
			// Deal with next token index
			query = query.substring(startIndex + token.length(), query.length());
			if(query.length() == 0)
				break;
			int steps = 0;
			while(query.charAt(steps) == ' '){
				steps++;
			}
			query = query.substring(steps, query.length());
			if(query.length() == 0)
				break;
		}
		
		// Delete stopwords
		for(int i = 0; i < tokens.size(); i++){
			if(Stopwords.getInstance().containKey(tokens.get(i))){
				tokens.remove(i);
			}
		}
		
		// Build the expression tree
		root = BuildExprTree(tokens);
		
		return root;
	}