@Override
		public int execute(StringBuilder buf) {
			if ( text!=null ) {
				buf.append(text);
			}
			return lastIndex+1;
		}
I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp
 instructions.
runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java