Examples of ArrayPredictionContext


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

  }

  // Array merges

  @Test public void test_A$_A$_fullctx() {
    ArrayPredictionContext A1 = array(PredictionContext.EMPTY);
    ArrayPredictionContext A2 = array(PredictionContext.EMPTY);
    PredictionContext r = PredictionContext.merge(A1, A2, fullCtx(), null);
    System.out.println(toDOTString(r, fullCtx()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  @Test public void test_Aab_Ac() { // a,b + c
    SingletonPredictionContext a = a();
    SingletonPredictionContext b = b();
    SingletonPredictionContext c = c();
    ArrayPredictionContext A1 = array(a, b);
    ArrayPredictionContext A2 = array(c);
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  }

  @Test public void test_Aa_Aa() {
    SingletonPredictionContext a1 = a();
    SingletonPredictionContext a2 = a();
    ArrayPredictionContext A1 = array(a1);
    ArrayPredictionContext A2 = array(a2);
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  @Test public void test_Aa_Abc() { // a + b,c
    SingletonPredictionContext a = a();
    SingletonPredictionContext b = b();
    SingletonPredictionContext c = c();
    ArrayPredictionContext A1 = array(a);
    ArrayPredictionContext A2 = array(b, c);
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  @Test public void test_Aac_Ab() { // a,c + b
    SingletonPredictionContext a = a();
    SingletonPredictionContext b = b();
    SingletonPredictionContext c = c();
    ArrayPredictionContext A1 = array(a, c);
    ArrayPredictionContext A2 = array(b);
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

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

  @Test public void test_Aab_Aa() { // a,b + a
    ArrayPredictionContext A1 = array(a(), b());
    ArrayPredictionContext A2 = array(a());
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

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

  @Test public void test_Aab_Ab() { // a,b + b
    ArrayPredictionContext A1 = array(a(), b());
    ArrayPredictionContext A2 = array(b());
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  }

  @Test public void test_Aax_Aby() { // ax + by but in arrays
    SingletonPredictionContext a = createSingleton(x(), 1);
    SingletonPredictionContext b = createSingleton(y(), 2);
    ArrayPredictionContext A1 = array(a);
    ArrayPredictionContext A2 = array(b);
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  }

  @Test public void test_Aax_Aay() { // ax + ay -> merged singleton a, array parent
    SingletonPredictionContext a1 = createSingleton(x(), 1);
    SingletonPredictionContext a2 = createSingleton(y(), 1);
    ArrayPredictionContext A1 = array(a1);
    ArrayPredictionContext A2 = array(a2);
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\n" +
View Full Code Here

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

  }

  @Test public void test_Aaxc_Aayd() { // ax,c + ay,d -> merged a, array parent
    SingletonPredictionContext a1 = createSingleton(x(), 1);
    SingletonPredictionContext a2 = createSingleton(y(), 1);
    ArrayPredictionContext A1 = array(a1, c());
    ArrayPredictionContext A2 = array(a2, d());
    PredictionContext r = PredictionContext.merge(A1, A2, rootIsWildcard(), null);
    System.out.println(toDOTString(r, rootIsWildcard()));
    String expecting =
      "digraph G {\n" +
      "rankdir=LR;\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.