/* Copyright (c) 2008-2013, Avian Contributors

   Permission to use, copy, modify, and/or distribute this software
   for any purpose with or without fee is hereby granted, provided
   that the above copyright notice and this permission notice appear
   in all copies.

   There is NO WARRANTY for this software.  See license.txt for
   details. */

package regex;

/**
 * A minimal implementation of a regular expression engine.
 * 
 * @author Johannes Schindelin
 */
public class RegexPattern extends Pattern {
  private PikeVM vm;

  public RegexMatcher matcher(CharSequence string) {
    return new RegexMatcher(vm, string);
  }

  RegexPattern(String regex, int flags, PikeVM vm) {
    super(regex, flags);
    this.vm = vm;
  }
}

@@ -424,16 +424,1199 @@
 engine.%0A
+ * %3Cp%3E%0A * Intended as a permissively-licensed drop-in replacement for Oracle JDK's%0A * regular expression engine, this class uses the Pike VM implemented in%0A * %7B@link PikeVM%7D to match regular expressions.%0A * %3C/p%3E%0A * %3Cp%3E%0A * The Pike VM not only has a nicer runtime performance than Oracle JDK's%0A * backtracking approach -- %3Ci%3EO(n*m)%3C/i%3E instead of %3Ci%3EO(2%5Em)%3C/i%3E where%0A * %3Ci%3En%3C/i%3E is the length of the regular expression pattern (after normalizing%0A * %7B&lt;n&gt;%7D quantifiers) and %3Ci%3Em%3C/i%3E the length of the text to match against%0A * the pattern -- but also supports arbitrary-sized look-behinds.%0A * %3C/p%3E%0A * %3Cp%3E%0A * The current implementation supports all regular expression constructs%0A * supported by Oracle JDK's regular expression engine except for the following%0A * ones:%0A * %3Cul%3E%0A * %3Cli%3Econtrol characters: %5CcX%3C/li%3E%0A * %3Cli%3Eextended character classes: %5Cp%7B...%7D%3C/li%3E%0A * %3Cli%3Eextended boundary matchers: %5CA,%5CG,%5CZ,%5Cz%3C/li%3E%0A * %3Cli%3Epossessive quantifiers: X?+%3C/li%3E%0A * %3Cli%3Eback references: %5C&lt;n&gt;, %5Ck&lt;name&gt;%3C/li%3E%0A * %3Cli%3Elong escape: %5CQ, %5CE%3C/li%3E%0A * %3Cli%3Enamed groups: (?&lt;name&gt;X)%3C/li%3E%0A * %3Cli%3Eflags: (?idmsuxU)%3C/li%3E%0A * %3Cli%3Eindependent, non-capturing group: (?%3EX)%3C/li%3E%0A * %3C/ul%3E%0A * %3C/p%3E%0A
  * %0A * @

document the strengths and limitations