This is the mail archive of the mauve-discuss@sources.redhat.com mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: StreamTokenizer


Daryl Lee <dlee@altaregos.com> writes:

> I believe the following patch might be useful in
> gnu/testlet/java/io/StreamTokenizer/Test.java.
> 
> 69c69
> <     tokenize (harness, "(a).(b)", x1);
> ---
> >     tokenize (harness, "(a)5(b)", x1);
> 
> (This is a straight diff, not a CVS diff; I've never submitted a
> patch, so someone tell me if this is the wrong protocol.)
> 
> The original string causes classpath's number parser to fail, trying
> to parse a bare '.'.  (See 3.10.2 of the Java Language
> Specification.)  I believe a better solution is to make
> StreamTokenizer handle the NumberFormatException thrown by Double,
> but that is an argument for others to conduct.

Daryl, is how Sun's 1.4 implementation behaves?  I see that
StreamTokenizer.parseNumbers() would have '.' treated as a 'numeric'
value.

Brian
-- 
Brian Jones <cbj@gnu.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]