public void mainLoop() {
		String input;
		String[] inputParts;
		while (true) {
			input = getInput();
			inputParts = input.split(" ");
			
			// Try each module in turn
			for (Module module: modules) {
				if (module.matches(inputParts)) {
					module.execute(inputParts);
					break;
				}
			}
		}
	}