Exemplo n.º 1
0
 /** Rewrite sequence elements */
 @Override
 public void visit(final OpSequence opSequence) {
   if (LOG.isDebugEnabled()) {
     LOG.debug("Starting visiting OpSequence");
   }
   addOp(rewriteOpN(opSequence, OpSequence.create()));
 }
 private static Op flush(BasicPattern pattern, Op op) {
   if (pattern == null || pattern.isEmpty()) {
     if (op == null) return OpTable.unit();
     return op;
   }
   OpBGP opBGP = new OpBGP(pattern);
   return OpSequence.create(op, opBGP);
 }
Exemplo n.º 3
0
 /**
  * Reset the rewriter to the initial state.
  *
  * @return this rewriter for chaining.
  */
 public OpRewriter reset() {
   result = OpSequence.create();
   return this;
 }