Tabnine Logo
OuterParsingOptions.mainDefinitionFile
Code IndexAdd Tabnine to your IDE (free)

How to use
mainDefinitionFile
method
in
org.kframework.utils.options.OuterParsingOptions

Best Java code snippets using org.kframework.utils.options.OuterParsingOptions.mainDefinitionFile (Showing top 7 results out of 315)

origin: kframework/k

public String mainModule(FileUtil files) {
  if (mainModule == null) {
    return FilenameUtils.getBaseName(outerParsing.mainDefinitionFile(files).getName()).toUpperCase();
  }
  return mainModule;
}
origin: kframework/k

@Override
public void accept(CompiledDefinition def) {
  String kore = getKompiledString(def);
  File defFile = kompileOptions.outerParsing.mainDefinitionFile(files);
  String name = defFile.getName();
  String basename = FilenameUtils.removeExtension(name);
  files.saveToDefinitionDirectory(basename + ".kore", kore);
}
origin: kframework/k

@Provides
@DefinitionDir
File definitionDir(@WorkingDir File workingDir, OuterParsingOptions options) {
  if (options.directory == null) {
    // bootstrap the part of FileUtil we need
    return options.mainDefinitionFile(new FileUtil(null, null, workingDir, null, null, null)).getParentFile();
  }
  File f = new File(options.directory);
  if (f.isAbsolute()) return f;
  return new File(workingDir, options.directory);
}
origin: kframework/k

@Override
protected int run() {
  List<org.kframework.kil.Module> modules = new ArrayList<>();
  Source source = Source.apply(options.mainDefinitionFile(files).getAbsolutePath());
  File currentDirectory = options.mainDefinitionFile(files).getParentFile();
  List<File> lookupDirectories = ListUtils.union(options.includes.stream()
          .map(files::resolveWorkingDirectory).collect(Collectors.toList()),
  modules.addAll(parser.slurp(FileUtil.load(options.mainDefinitionFile(files)),
      source,
      currentDirectory,
origin: kframework/k

  @Provides @KompiledDir
  File kompiledDir(@DefinitionDir File defDir, OuterParsingOptions options, @WorkingDir File workingDir, @TempDir File tempDir) {
    // bootstrap the part of FileUtil we need
    return new File(defDir, FilenameUtils.removeExtension(options.mainDefinitionFile(new FileUtil(null, null, workingDir, null, null, null)).getName()) + "-kompiled");
  }
}
origin: kframework/k

private void parse(String... args) {
  new JCommander(options, args);
  options.outerParsing.mainDefinitionFile(files);
  options.mainModule(files);
  options.syntaxModule(files);
}
origin: kframework/k

  @Override
  public int run() {
    if (!options.outerParsing.mainDefinitionFile(files).exists()) {
      throw KEMException.criticalError("Definition file doesn't exist: " +
          options.outerParsing.mainDefinitionFile(files).getAbsolutePath());
    }

    Kompile kompile = new Kompile(options, files, kem, sw);
    Backend backend = koreBackend.get();
    CompiledDefinition def = kompile.run(options.outerParsing.mainDefinitionFile(files), options.mainModule(files), options.syntaxModule(files), backend.steps(), backend.excludedModuleTags());
    sw.printIntermediate("Kompile to kore");
    loader.saveOrDie(files.resolveKompiled("compiled.bin"), def);
    sw.printIntermediate("Save to disk");
    backend.accept(def);
    sw.printIntermediate("Backend");
    loader.saveOrDie(files.resolveKompiled("timestamp"), "");
    sw.printTotal("Total");
    return 0;
  }
}
org.kframework.utils.optionsOuterParsingOptionsmainDefinitionFile

Popular methods of OuterParsingOptions

    Popular in Java

    • Reactive rest calls using spring rest template
    • setScale (BigDecimal)
    • onRequestPermissionsResult (Fragment)
    • getExternalFilesDir (Context)
    • ByteBuffer (java.nio)
      A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
    • Selector (java.nio.channels)
      A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
    • SQLException (java.sql)
      An exception that indicates a failed JDBC operation. It provides the following information about pro
    • Stack (java.util)
      Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
    • CountDownLatch (java.util.concurrent)
      A synchronization aid that allows one or more threads to wait until a set of operations being perfor
    • DateTimeFormat (org.joda.time.format)
      Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
    • Github Copilot alternatives
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now