Codota Logo
Definition.from
Code IndexAdd Codota to your IDE (free)

How to use
from
method
in
org.kframework.Definition

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
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.kframeworkDefinitionfrom

Javadoc

Parses the text to create a Definition object. The main module of the definition will be last module defined in the text file.

Popular methods of Definition

    Popular in Java

    • Updating database using SQL prepared statement
    • scheduleAtFixedRate (ScheduledExecutorService)
    • setContentView (Activity)
    • getSystemService (Context)
    • BufferedReader (java.io)
      Reads text from a character-input stream, buffering characters so as to provide for the efficient re
    • Socket (java.net)
      Provides a client-side TCP socket.
    • URL (java.net)
      A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
    • MessageDigest (java.security)
      Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
    • UUID (java.util)
      UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
    • ServletException (javax.servlet)
      Defines a general exception a servlet can throw when it encounters difficulty.
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now