Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
* scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale.
* sources.am: Regenerated.
* gcj/javaprims.h: Regenerated.
* Makefile.in: Regenerated.
* gcj/Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* gnu/java/lang/VMInstrumentationImpl.java: New override.
* gnu/java/net/local/LocalSocketImpl.java: Likewise.
* gnu/classpath/jdwp/VMMethod.java: Likewise.
* gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest
interface.
* java/lang/Thread.java: Add UncaughtExceptionHandler.
* java/lang/reflect/Method.java: Implements GenericDeclaration and
isSynthetic(),
* java/lang/reflect/Field.java: Likewise.
* java/lang/reflect/Constructor.java
* java/lang/Class.java: Implements Type, GenericDeclaration,
getSimpleName() and getEnclosing*() methods.
* java/lang/Class.h: Add new public methods.
* java/lang/Math.java: Add signum(), ulp() and log10().
* java/lang/natMath.cc (log10): New function.
* java/security/VMSecureRandom.java: New override.
* java/util/logging/Logger.java: Updated to latest classpath
version.
* java/util/logging/LogManager.java: New override.
From-SVN: r113887
This commit is contained in:
@@ -105,24 +105,43 @@ final class RETokenNamedProperty extends REToken {
|
||||
return 1;
|
||||
}
|
||||
|
||||
boolean match(CharIndexed input, REMatch mymatch) {
|
||||
char ch = input.charAt(mymatch.index);
|
||||
REMatch matchThis(CharIndexed input, REMatch mymatch) {
|
||||
char ch = input.charAt(mymatch.index);
|
||||
boolean retval = matchOneChar(ch);
|
||||
if (retval) {
|
||||
++mymatch.index;
|
||||
return mymatch;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean matchOneChar(char ch) {
|
||||
if (ch == CharIndexed.OUT_OF_BOUNDS)
|
||||
return false;
|
||||
|
||||
boolean retval = handler.includes(ch);
|
||||
if (insens) {
|
||||
retval = retval ||
|
||||
handler.includes(Character.toUpperCase(ch)) ||
|
||||
handler.includes(Character.toLowerCase(ch));
|
||||
handler.includes(toUpperCase(ch, unicodeAware)) ||
|
||||
handler.includes(toLowerCase(ch, unicodeAware));
|
||||
}
|
||||
|
||||
if (negate) retval = !retval;
|
||||
if (retval) {
|
||||
++mymatch.index;
|
||||
return next(input, mymatch);
|
||||
return retval;
|
||||
}
|
||||
|
||||
boolean returnsFixedLengthMatches() { return true; }
|
||||
|
||||
int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) {
|
||||
int index = mymatch.index;
|
||||
int numRepeats = 0;
|
||||
while (true) {
|
||||
if (numRepeats >= max) break;
|
||||
char ch = input.charAt(index++);
|
||||
if (! matchOneChar(ch)) break;
|
||||
numRepeats++;
|
||||
}
|
||||
else return false;
|
||||
return numRepeats;
|
||||
}
|
||||
|
||||
void dump(StringBuffer os) {
|
||||
@@ -246,9 +265,6 @@ final class RETokenNamedProperty extends REToken {
|
||||
|
||||
private static class POSIXHandler extends Handler {
|
||||
private RETokenPOSIX retoken;
|
||||
private REMatch mymatch = new REMatch(0,0,0);
|
||||
private char[] chars = new char[1];
|
||||
private CharIndexedCharArray ca = new CharIndexedCharArray(chars, 0);
|
||||
public POSIXHandler(String name) {
|
||||
int posixId = RETokenPOSIX.intValue(name.toLowerCase());
|
||||
if (posixId != -1)
|
||||
@@ -257,9 +273,7 @@ final class RETokenNamedProperty extends REToken {
|
||||
throw new RuntimeException("Unknown posix ID: " + name);
|
||||
}
|
||||
public boolean includes(char c) {
|
||||
chars[0] = c;
|
||||
mymatch.index = 0;
|
||||
return retoken.match(ca, mymatch);
|
||||
return retoken.matchOneChar(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user