Tabnine Logo
org.kframework.kil
Code IndexAdd Tabnine to your IDE (free)

How to use org.kframework.kil

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

origin: stackoverflow.com

if(cell.getContents().equalsIgnoreCase(key)){
  for (int i = 0; i < sheet.getColumns(); i++) {
    Cell cel = sheet.getCell(i, j);
    resultSet.add(cel.getContents());
origin: kframework/k

/**
 * Retrieves the attribute by key from the list of attributes
 */
public <T> T getAttr(Key<T> key) {
  final Attribute<T> value = (Attribute<T>) get(key);
  if (value == null)
    return null;
  return value.getValue();
}
origin: kframework/k

/**
 * Retrieves the attribute by key from the list of attributes
 *
 * @param key
 * @return a value for key in the list of attributes or the default value.
 */
public String getAttribute(String key) {
  return getAttribute(Attribute.keyOf(key));
}
origin: kframework/k

public LiterateModuleComment(LiterateDefinitionComment ldc) {
  setSource(ldc.getSource());
  setLocation(ldc.getLocation());
  value = ldc.getValue();
  lcType = ldc.getType();
}
origin: kframework/k

public void visit(Syntax syntax) {
  this.sort = syntax.getDeclaredSort().getRealSort();
  syntax.getPriorityBlocks().forEach(pb -> pb.getProductions().forEach(this::visit));
}
origin: kframework/k

  public void addProduction(Production p, boolean kore) {
    if (p.getKLabel(false) != null) {
      tags.put(p.getKLabel(false), p);
    }
    for (Attribute<?> a : p.getAttributes().values()) {
      tags.put(a.getKey().toString(), p);
    }
  }
}
origin: kframework/k

public Import getImportSyntax() {
  if (isImportSyntax()) {
    return this;
  }
  return new Import(name + IMPORTS_SYNTAX_SUFFIX, getLocation(), getSource());
}
origin: kframework/k

public void removeAttribute(String key) {
  getAttributes().remove(Attribute.keyOf(key));
}
origin: kframework/k

public <T> void add(Class<T> cls, T value) {
  add(new Attribute<T>(Key.get(cls), value));
}
origin: kframework/k

@Override
public int hashCode() {
  int hash = sort.hashCode();
  for (PriorityBlock pb : priorityBlocks)
    hash += pb.hashCode();
  return hash;
}
origin: kframework/k

/**
 * Appends an attribute to the list of attributes.
 *
 * @param key
 * @param val
 */
public void addAttribute(String key, String val) {
  addAttribute(Attribute.of(key, val));
}
origin: kframework/k

/**
 * Copies attributes from another node into this node.
 * Use this in preference to {@link ASTNode#getAttributes} where appropriate because
 * the latter will create a new object if no attributes exist.
 * @param node The ASTNode to copy all attributes from.
 */
public void copyAttributesFrom(ASTNode node) {
  if (node.attributes == null)
    return;
  this.getAttributes().putAll(node.attributes);
}
origin: kframework/k

/**
 * @param key
 * @return whether the attribute key occurs in the list of attributes.
 */
public boolean containsAttribute(String key) {
  if (attributes == null)
    return false;
  return attributes.containsKey(Attribute.keyOf(key));
}
origin: kframework/k

public <T> void addAttribute(Class<T> key, Annotation annotation, T val) {
  addAttribute(Key.get(key, annotation), val);
}
origin: kframework/k

public <T> T typeSafeGet(Class<T> cls) {
  return typeSafeGet(Key.get(cls));
}
origin: kframework/k

public <T> void addAttribute(Key<T> key, T val) {
  addAttribute(new Attribute<>(key, val));
}
origin: kframework/k

public String getAttr(String key) {
  return getAttr(Attribute.keyOf(key));
}
origin: kframework/k

public <T> T getAttribute(Class<T> cls) {
  return getAttribute(Key.get(cls));
}
origin: kframework/k

/**
 * @param key
 * @return whether the attribute key occurs in the list of attributes.
 */
public boolean containsAttribute(Key<?> key) {
  if (attributes == null)
    return false;
  return attributes.containsKey(key);
}
origin: kframework/k

public <T> T typeSafeGet(Key<T> key) {
  Attribute<?> attr = get(key);
  if (attr == null) return null;
  return (T) attr.getValue();
}
org.kframework.kil

Most used classes

  • Lexical
    A terminal in a Production.
  • Module
    A module.
  • PriorityBlock
    A block of productions at the same priority within a syntax declaration.
  • Production
    A production. Any explicit attributes on the production are stored in ASTNode#attributes.
  • StringSentence
    Used as a container for unparsed sentences like rule, context and configuration.
  • UserList,
  • ASTNode,
  • Attribute$Key,
  • Attribute,
  • Attributes,
  • Cell,
  • Definition,
  • Freezer,
  • Hole,
  • Import,
  • LiterateDefinitionComment,
  • LiterateModuleComment,
  • ModuleItem,
  • NonTerminal
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