Tabnine Logo
Definition
Code IndexAdd Tabnine to your IDE (free)

How to use
Definition
in
org.kframework

Best Java code snippets using org.kframework.Definition (Showing top 4 results out of 315)

origin: kframework/k

/**
 * Parses the text to create a {@link Definition} object.
 */
public static org.kframework.definition.Definition from(String definitionText, String mainModuleName, Source source) {
  return from(definitionText, mainModuleName, source, Lists.newArrayList(Kompile.BUILTIN_DIRECTORY));
}
origin: kframework/k

/**
 * Parses the text to create a {@link Definition} object.
 */
public static org.kframework.definition.Definition from(String definitionText, String mainModuleName) {
  return from(definitionText, mainModuleName, Source.apply("generated"));
}
origin: kframework/k

/**
 * Parses the text to create a {@link Definition} object.
 * The main module of the definition will be last module defined in the text file.
 */
public static org.kframework.definition.Definition from(String definitionText) {
  Pattern pattern = Pattern.compile("(?:^|\\s)module ([A-Z][A-Z\\-]*)");
  Matcher m = pattern.matcher(definitionText);
  if(!m.find()) {
    throw new RuntimeException("Could not find any module in the definition");
  }
  String nameOfLastModule = m.group(m.groupCount());
  return from(definitionText, nameOfLastModule, Source.apply("generated"));
}
origin: kframework/k

  @Test
  public void testFrom() throws Exception {
    org.kframework.definition.Definition actual = Definition.from("module X endmodule");
    Module modSyntax = Module.apply("X$SYNTAX", Set());
    Module mod = new Module("X", Set(modSyntax), Set(), Att());
    assertEquals(org.kframework.definition.Definition.apply(mod, Set(mod, modSyntax), Att()), actual);
  }
}
org.kframeworkDefinition

Most used methods

  • from
    Parses the text to create a Definition object.

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • getSystemService (Context)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JComboBox (javax.swing)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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