--- /dev/null
+//\r
+// This software is now distributed according to\r
+// the Lesser Gnu Public License. Please see\r
+// http://www.gnu.org/copyleft/lesser.txt for\r
+// the details.\r
+// -- Happy Computing!\r
+//\r
+package com.stevesoft.pat;\r
+\r
+/** \r
+ Shareware: package pat\r
+ <a href="copyright.html">Copyright 2001, Steven R. Brandt</a>\r
+*/ /**\r
+This class only exists to store data needed during the\r
+compilation of a regular expression. */\r
+public class Rthings {\r
+ /** The numeric identity of the next () to be encountered\r
+ while compiling the pattern. */\r
+ public int val=Regex.BackRefOffset;\r
+ /** Needed in case (?i) is encountered, to pass back the\r
+ message that ignoreCase should be set. */\r
+ public boolean ignoreCase;\r
+ /** Needed in case (?Q) is encountered, to pass back the\r
+ message that dontMatchInQuotes should be set. */\r
+ public boolean dontMatchInQuotes;\r
+ public boolean optimizeMe = false;\r
+ public boolean noBackRefs = false;\r
+ public int parenLevel = 0;\r
+ boolean gFlag = false, mFlag = false, sFlag = false;\r
+ Pattern p;\r
+ Or o;\r
+ Rthings(Regex r) {\r
+ ignoreCase = r.ignoreCase;\r
+ dontMatchInQuotes = r.dontMatchInQuotes;\r
+ }\r
+ void set(Regex r) {\r
+ r.gFlag = gFlag;\r
+ r.mFlag = mFlag;\r
+ r.sFlag = sFlag;\r
+ r.ignoreCase = ignoreCase;\r
+ r.dontMatchInQuotes = dontMatchInQuotes;\r
+ if(optimizeMe) r.optimize();\r
+ }\r
+};\r