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

How to use
TreeCleanerVisitor
in
org.kframework.parser.concrete2kore.disambiguation

Best Java code snippets using org.kframework.parser.concrete2kore.disambiguation.TreeCleanerVisitor (Showing top 4 results out of 315)

origin: kframework/k

public void assertCleanup(Term input, Term expected) {
  Term actual = treeCleanerVisitor.apply(input).right().get();
  if (!actual.equals(expected)) {
    assertEquals(expected.toString(), actual.toString());
  }
}
origin: kframework/k

Either<Set<ParseFailedException>, Term> rez = new TreeCleanerVisitor().apply(parsed);
if (rez.isLeft())
  return new Tuple2<>(rez, warn);
origin: kframework/k

  public void throwFirstLeftException(Term input) {
    Either<Set<ParseFailedException>, Term> result = treeCleanerVisitor.apply(input);
    if (result.isRight()) {
      fail("Expected an exception but got:" + result.right().get());
    } else {
      throw result.left().get().iterator().next();
    }
  }
}
origin: kframework/k

@Override
public Either<Set<ParseFailedException>, Term> apply(TermCons tc) {
  Either<Set<ParseFailedException>, Term> vis;
  if (tc.production().isSyntacticSubsort() && tc.production().klabel().isEmpty()) {
    // eliminating syntactic subsort
    vis = apply(tc.get(0));
  } else if (!tc.production().att().contains("bracket") && tc.production().klabel().isEmpty()) {
    return Left.apply(Sets.newHashSet(new ParseFailedException(new KException(
        KException.ExceptionType.ERROR, KException.KExceptionGroup.INNER_PARSER,
        "Only subsort productions are allowed to have no #klabel attribute", tc.source().get(), tc.location().get()))));
  } else {
    // invalidate the hashCode cache
    vis = super.apply(tc);
  }
  return vis;
}
org.kframework.parser.concrete2kore.disambiguationTreeCleanerVisitor

Javadoc

Remove parsing artifacts such as single element ambiguities.

Most used methods

  • apply
  • <init>

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JList (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for Android Studio
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