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());
  }
Esempio n. 2
0
 static {
   LOGGER.debug("Crafted regex ", PATTERN.pattern());
 }
Esempio n. 3
0
 static {
   LOGGER.debug("Crafted regex: ", DOCUMENT_PATTERN.pattern());
 }