private ResourceFile findFile(ResourceFile parentDir, String fileNameOrRelativePath,
			String extension) throws SleighException {
		ResourceFile file = new ResourceFile(parentDir, fileNameOrRelativePath);
		if (file.exists()) {
			return file;
		}
		String fileName = getFileNameFromPath(fileNameOrRelativePath);
		List<ResourceFile> files = findFiles(fileName, extension);
		if (files.size() == 1) {
			return files.get(0);
		}

		String relativePath = discardRelativePath(fileNameOrRelativePath);
		for (ResourceFile resourceFile : files) {
			if (file.getAbsolutePath().endsWith(relativePath)) {
				return resourceFile;
			}
		}
		ResourceFile missingFile = new ResourceFile(parentDir, fileNameOrRelativePath);
		throw new SleighException("Missing sleigh file: " + missingFile.getAbsolutePath());
	}
Construct language provider (intended for test use only)
@param ldefsFile language definitions file
@throws SAXException if parse error occurs
@throws IOException if IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/SleighLanguageProvider.java