Examples of PredictionContext


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

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

  @Test public void test_aa$_a$_$_fullCtx() {
    PredictionContext empty = PredictionContext.EMPTY;
    PredictionContext child1 = createSingleton(empty, 8);
    PredictionContext right = PredictionContext.merge(empty, child1, false, null);
    PredictionContext left = createSingleton(right, 8);
    PredictionContext merged = PredictionContext.merge(left, right, false, null);
    String actual = toDOTString(merged, false);
    System.out.println(actual);
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

      "}\n";
    assertEquals(expecting, actual);
  }

  @Test public void test_ax$_a$_fullctx() {
    PredictionContext x = x();
    PredictionContext a1 = createSingleton(x, 1);
    PredictionContext a2 = a();
    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_a_b() {
    PredictionContext r = PredictionContext.merge(a(), b(), rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    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, rootIsWildcard()));
  }

  @Test public void test_ax_ax_same() {
    PredictionContext x = x();
    PredictionContext a1 = createSingleton(x, 1);
    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_ax_ax() {
    PredictionContext x1 = x();
    PredictionContext x2 = x();
    PredictionContext a1 = createSingleton(x1, 1);
    PredictionContext a2 = createSingleton(x2, 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_abx_abx() {
    PredictionContext x1 = x();
    PredictionContext x2 = x();
    PredictionContext b1 = createSingleton(x1, 2);
    PredictionContext b2 = createSingleton(x2, 2);
    PredictionContext a1 = createSingleton(b1, 1);
    PredictionContext a2 = createSingleton(b2, 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_abx_acx() {
    PredictionContext x1 = x();
    PredictionContext x2 = x();
    PredictionContext b = createSingleton(x1, 2);
    PredictionContext c = createSingleton(x2, 3);
    PredictionContext a1 = createSingleton(b, 1);
    PredictionContext a2 = createSingleton(c, 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_ax_bx_same() {
    PredictionContext x = x();
    PredictionContext a = createSingleton(x, 1);
    PredictionContext b = createSingleton(x, 2);
    PredictionContext r = PredictionContext.merge(a, b, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    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, rootIsWildcard()));
  }

  @Test public void test_ax_bx() {
    PredictionContext x1 = x();
    PredictionContext x2 = x();
    PredictionContext a = createSingleton(x1, 1);
    PredictionContext b = createSingleton(x2, 2);
    PredictionContext r = PredictionContext.merge(a, b, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    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, rootIsWildcard()));
  }

  @Test public void test_ax_by() {
    PredictionContext a = createSingleton(x(), 1);
    PredictionContext b = createSingleton(y(), 2);
    PredictionContext r = PredictionContext.merge(a, b, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
      "  s0[shape=record, label=\"<p0>|<p1>\"];\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.