[kaffe] Bug report (java.io.StreamTokenizer)
Ito Kazumitsu
ito.kazumitsu at hitachi-cable.co.jp
Mon Jun 30 17:10:01 PDT 2003
Hi,
In message "Re: [kaffe] Bug report (java.io.StreamTokenizer)"
on 03/06/30, Hermanni Hyytiälä <hemppah at cc.jyu.fi> writes:
> > (1) Kaffe's java.io.StreamTokenizer.java has this comment:
> >
> > /* Contrary to the description in JLS 1.ed,
> > C & C++ comments seem to be checked
> > before other comments. That actually
> > make sense, since the default comment
> > character is '/'.
> > */
>
>
> Do you know what this comment is based on?
Dalibor answered about this.
> > (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.
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.
More information about the kaffe
mailing list