[kaffe] Bug report (java.io.StreamTokenizer)

Hermanni Hyytiälä hemppah at cc.jyu.fi
Tue Jul 1 00:57:02 PDT 2003


On Tue, 2003-07-01 at 03:11, Ito Kazumitsu wrote:
> Hi,
> 
> In message "Re: [kaffe] Bug report (java.io.StreamTokenizer)"
>     on 03/06/30, Hermanni Hyytiälä <hemppah at cc.jyu.fi> writes:
> 
> > > (2) Comment characters must be checked before alphabetic characters
> > >     and Sun's java.io.StreamTokenizer seems to do so.  Otherwise,
> > >     NBIO you mentioned cannot run properly.
> 
> > Hm, have you tested and if so how? Or does literature mentions about
> > this? After a quick thought, I don't see any problem in the lexical
> > order which is defined in nextToken-method of java.io.StreamTokenizer
> > (JLS, 1st edition).
> 
> As I said before,  the program from NBIO defines '#' not only as
> a comment character but also as a word character.  So if
> java.io.StreamTokenizer follows the rule of JLS 1st ed.,
> as kaffe's does,  '#' is treated as the begining of a word
> before it is treated as the begining of a comment.

Yes. Exactly. I forgot that, and I apologize :).

> 
> The fact that Sun's treats '#' as the begining of a comment
> shows that Sun's java.io.StreamTokenizer does not respect
> the rule of JLS 1st ed.

As said, this *is* very interesting. Btw, I decided to test IBM's JDK
1.4.1 also and it runs similary the original NBIO's install test as
Sun's JDK 1.4.

So, the fundamental question seems to be that do we want that Kaffe
respects JLS's (obsolete?) defintions, or non-open source implementions'
functionality (i.e. a "standard" functionality, not only Sun, IBM also)?

Also, I think it's a unfortunate that Java language doesn't have a
standard which would compel non-open source communities to respect the
standard. IMO, if there was a Java standard, it's possible that we never
had this discussion ;).

Finally, are you aware of this:
http://linuxtoday.com/it_management/2003062301226NWDTRH
?


-Hermanni







More information about the kaffe mailing list