private static String[] injectOptionsFromFile(String[] args, int index) {
		if (index >= args.length) {
			Msg.error(SleighCompile.class, "Missing options input file name");
			return null;
		}

		File optionsFile = new File(args[index]);
		if (!optionsFile.isFile()) {
			Msg.error(SleighCompile.class,
				"Options file not found: " + optionsFile.getAbsolutePath());
			if (SystemUtilities.isInDevelopmentMode()) {
				Msg.error(SleighCompile.class,
					"Eclipse language module must be selected and 'gradle prepdev' prevously run");
			}
			return null;
		}
		ArrayList<String> list = new ArrayList<>();
		for (int i = 0; i <= index; i++) {
			list.add(args[i]);
		}

		try (BufferedReader r = new BufferedReader(new FileReader(optionsFile))) {
			String option = r.readLine();
			while (option != null) {
				option = option.trim();
				if (option.length() != 0 && !option.startsWith("#")) {
					list.add(option);
				}
				option = r.readLine();
			}
		}
		catch (IOException e) {
			Msg.error(SleighCompile.class,
				"Reading options file failed (" + optionsFile.getName() + "): " + e.getMessage());
			return null;
		}

		for (int i = index + 1; i < args.length; i++) {
			list.add(args[i]);
		}
		return list.toArray(new String[list.size()]);
	}
Execute the Sleigh compiler process

@param args sleigh compiler command line arguments
@return exit code (TODO: exit codes are not well defined)
@throws IOException for file access errors
@throws RecognitionException for parse errors
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/SleighCompileLauncher.java