Examples of PredictionContext


Examples of org.antlr.v4.runtime.atn.PredictionContext

  public boolean rootIsWildcard() { return true; }
  public boolean fullCtx() { return false; }

  @Test public void test_$_$() {
    PredictionContext r = PredictionContext.merge(PredictionContext.EMPTY,
                            PredictionContext.EMPTY,
                            rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, rootIsWildcard()));
  }

  @Test public void test_$_$_fullctx() {
    PredictionContext r = PredictionContext.merge(PredictionContext.EMPTY,
                            PredictionContext.EMPTY,
                            fullCtx(), null);
    System.out.println(toDOTString(r, fullCtx()));
    String expecting =
      "digraph G {\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, fullCtx()));
  }

  @Test public void test_x_$() {
    PredictionContext r = PredictionContext.merge(x(), PredictionContext.EMPTY, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[label=\"*\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, rootIsWildcard()));
  }

  @Test public void test_x_$_fullctx() {
    PredictionContext r = PredictionContext.merge(x(), PredictionContext.EMPTY, fullCtx(), null);
    System.out.println(toDOTString(r, fullCtx()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[shape=record, label=\"<p0>|<p1>$\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, fullCtx()));
  }

  @Test public void test_$_x() {
    PredictionContext r = PredictionContext.merge(PredictionContext.EMPTY, x(), rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[label=\"*\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, rootIsWildcard()));
  }

  @Test public void test_$_x_fullctx() {
    PredictionContext r = PredictionContext.merge(PredictionContext.EMPTY, x(), fullCtx(), null);
    System.out.println(toDOTString(r, fullCtx()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[shape=record, label=\"<p0>|<p1>$\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, fullCtx()));
  }

  @Test public void test_a_a() {
    PredictionContext r = PredictionContext.merge(a(), a(), rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[label=\"0\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, rootIsWildcard()));
  }

  @Test public void test_a$_ax() {
    PredictionContext a1 = a();
    PredictionContext x = x();
    PredictionContext a2 = createSingleton(x, 1);
    PredictionContext r = PredictionContext.merge(a1, a2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[label=\"0\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, rootIsWildcard()));
  }

  @Test public void test_a$_ax_fullctx() {
    PredictionContext a1 = a();
    PredictionContext x = x();
    PredictionContext a2 = createSingleton(x, 1);
    PredictionContext r = PredictionContext.merge(a1, a2, fullCtx(), null);
    System.out.println(toDOTString(r, fullCtx()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[label=\"0\"];\n" +
View Full Code Here

Examples of org.antlr.v4.runtime.atn.PredictionContext

      "}\n";
    assertEquals(expecting, toDOTString(r, fullCtx()));
  }

  @Test public void test_ax$_a$() {
    PredictionContext x = x();
    PredictionContext a1 = createSingleton(x, 1);
    PredictionContext a2 = a();
    PredictionContext r = PredictionContext.merge(a1, a2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[label=\"0\"];\n" +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.