vgritsenko 2003/12/20 09:59:14 Modified: docs changes.html src/java/org/apache/regexp RECompiler.java xdocs changes.xml Log: Bug #3303: Unicode 3.0 character \\uFFFD Revision Changes Path 1.17 +3 -0 jakarta-regexp/docs/changes.html Index: changes.html =================================================================== RCS file: /home/cvs/jakarta-regexp/docs/changes.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- changes.html 20 Dec 2003 17:52:10 -0000 1.16 +++ changes.html 20 Dec 2003 17:59:14 -0000 1.17 @@ -85,6 +85,9 @@ <h3>Version 1.4-dev</h3> <ul> <li>Applied patches for Bug + <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3303">3303</a>: + Unicode 3.0 character \\uFFFD (VG)</li> +<li>Applied patches for Bug <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3773">3773</a>: Problem with parsing greedy match modifiers (VG)</li> <li>Applied patches for Bug 1.13 +12 -12 jakarta-regexp/src/java/org/apache/regexp/RECompiler.java Index: RECompiler.java =================================================================== RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RECompiler.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- RECompiler.java 20 Dec 2003 17:52:10 -0000 1.12 +++ RECompiler.java 20 Dec 2003 17:59:14 -0000 1.13 @@ -92,10 +92,10 @@ static final int NODE_TOPLEVEL = 2; // True if top level expr // Special types of 'escapes' - static final char ESC_MASK = 0xfff0; // Escape complexity mask - static final char ESC_BACKREF = 0xffff; // Escape is really a backreference - static final char ESC_COMPLEX = 0xfffe; // Escape isn't really a true character - static final char ESC_CLASS = 0xfffd; // Escape represents a whole class of characters + static final int ESC_MASK = 0xffff0; // Escape complexity mask + static final int ESC_BACKREF = 0xfffff; // Escape is really a backreference + static final int ESC_COMPLEX = 0xffffe; // Escape isn't really a true character + static final int ESC_CLASS = 0xffffd; // Escape represents a whole class of characters // {m,n} stacks int maxBrackets = 10; // Maximum number of bracket pairs @@ -427,7 +427,7 @@ * @return ESC_* code or character if simple escape * @exception RESyntaxException Thrown if the regular expression has invalid syntax. */ - char escape() throws RESyntaxException + int escape() throws RESyntaxException { // "Shouldn't" happen if (pattern.charAt(idx) != '\\') @@ -494,7 +494,7 @@ } } } - return (char)val; + return val; } case 't': @@ -533,7 +533,7 @@ val = ((val << 3) + (pattern.charAt(idx++) - '0')); } } - return (char)val; + return val; } // It's actually a backreference (\[1-9]), not an escape @@ -632,7 +632,7 @@ case '\\': { // Escape always advances the stream - char c; + int c; switch (c = escape ()) { case ESC_COMPLEX: @@ -685,7 +685,7 @@ default: // Escape is simple so treat as a simple char - simpleChar = c; + simpleChar = (char) c; break switchOnCharacter; } } @@ -850,7 +850,7 @@ { // Get the escaped character (advances input automatically) int idxBeforeEscape = idx; - char c = escape(); + int c = escape(); // Check if it's a simple escape (as opposed to, say, a backreference) if ((c & ESC_MASK) == ESC_MASK) @@ -861,7 +861,7 @@ } // Add escaped char to atom - emit(c); + emit((char) c); lenAtom++; } break; 1.17 +3 -0 jakarta-regexp/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/jakarta-regexp/xdocs/changes.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- changes.xml 20 Dec 2003 17:52:10 -0000 1.16 +++ changes.xml 20 Dec 2003 17:59:14 -0000 1.17 @@ -18,6 +18,9 @@ <h3>Version 1.4-dev</h3> <ul> <li>Applied patches for Bug + <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3303">3303</a>: + Unicode 3.0 character \\uFFFD (VG)</li> +<li>Applied patches for Bug <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3773">3773</a>: Problem with parsing greedy match modifiers (VG)</li> <li>Applied patches for Bug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]