private static void verifyEnrich(
      final SyntacticTree expectedTree,
      final SyntacticTree originalTree,
      final FragmentMapper<RobustPath<SyntacticTree>> fragmentMapper) {
    LOGGER.info("Flat tree: ", TreeFixture.asString(originalTree));
    LOGGER.info("Expected tree: ", TreeFixture.asString(expectedTree));
    final Treepath<SyntacticTree> expectedTreepath = Treepath.create(expectedTree);
    final Treepath<SyntacticTree> originalTreepath = Treepath.create(originalTree);

    final Treepath<SyntacticTree> rehierarchized =
        DesignatorInterpreterAccessor.enrich(
            DesignatorTools.TRAVERSAL.first(originalTreepath),
            //        originalTreepath,
            fragmentMapper);

    TreeFixture.assertEqualsNoSeparators(
        expectedTreepath.getTreeAtEnd(), rehierarchized.getTreeAtEnd());
  }
Ejemplo n.º 2
0
 static {
   LOGGER.debug("Crafted regex ", PATTERN.pattern());
 }
Ejemplo n.º 3
0
 static {
   LOGGER.debug("Crafted regex: ", DOCUMENT_PATTERN.pattern());
 }