Codota Logo
ProductionReference.location
Code IndexAdd Codota to your IDE (free)

How to use
location
method
in
org.kframework.parser.ProductionReference

Best Java code snippets using org.kframework.parser.ProductionReference.location (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: kframework/k-legacy

public static KEMException criticalError(String message, ProductionReference node) {
  return create(ExceptionType.ERROR, KExceptionGroup.CRITICAL, message, null, node.location().orElse(null), node.source().orElse(null));
}
origin: kframework/k

  String msg = "Found sort '" + childSort + "' where list sort '" + expectedSort + "' was expected. Moving on.";
  warnings.add(new ParseFailedException(
      new KException(KException.ExceptionType.HIDDENWARNING, KException.KExceptionGroup.LISTS, msg, child.source().get(), child.location().get())));
  newItems.add(child);
} else {
  TermCons terminator = TermCons.apply(ConsPStack.empty(), ulTerm.pTerminator, child.location(), child.source());
  TermCons newTc = TermCons.apply(ConsPStack.from(Arrays.asList(terminator, child)), ul.pList, child.location(), child.source());
  newItems.add(newTc);
  changed = true;
origin: kframework/k

  public Either<java.util.Set<ParseFailedException>, Term> apply(ProductionReference pr) {
    if (pr instanceof TermCons) {
      TermCons tc = (TermCons) pr;
      if (VariableTypeInferenceFilter.hasPolySort(tc)) {
        return VariableTypeInferenceFilter.visitPolyChildren(tc, this::apply);
      }
    }
    if (pr instanceof Constant && pr.production().sort().equals(Sorts.KVariable())) {
      // skip variables since they will always have a different sort at this stage.
      return Right.apply(pr);
    }
    if ((!strict && !subsorts.lessThanEq(pr.production().sort(), sort)) || (strict && !pr.production().sort().equals(sort))) {
      String msg = "Unexpected sort " + pr.production().sort() + " for term parsed as production " + pr.production() + ". Expected " + sort + ".";
      KException kex = new KException(KException.ExceptionType.ERROR, KException.KExceptionGroup.CRITICAL, msg, pr.source().orElse(null), pr.location().orElse(null));
      return Left.apply(Sets.newHashSet(new VariableTypeClashException(kex)));
    }
    return Right.apply(pr);
  }
}
org.kframework.parserProductionReferencelocation

Popular methods of ProductionReference

  • source
  • production

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • onCreateOptionsMenu (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
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