private static final char SPACE = ' ';
@NotNull
public static Map<CompilerMessageCategory, List<JFlexMessage>> compile(VirtualFile file, Sdk projectSdk) throws IOException, CantRunException {
JFlexSettings settings = JFlexSettings.getInstance();
//Earlier code used jflex.bat or jflex.sh. These files are broken after IDEA went open-source and changed
//its sdk distribution structure. It's better to call JFlex.Main directly, not using any dumb bat or sh files.
JavaParameters javaParameters = new JavaParameters();
javaParameters.setJdk(projectSdk);