J
JVarsoke
Okay, this seems really silly, so I must be missing it. For the
StreamTokenizer class how do I turn off parserNumbers()? The function
does not accept a boolean. Apparently it's a one way switch and the
default is "on".
The only way I can see around it is to call resetSyntax(). But then I
need to re-set all the words, whitespace and ordinary characters.
Does anyone have a list of what the default for these is?
would this do it?
StreamTokenizer st = new StreamTokenizer(stream);
st.resetSyntax();
st.wordChars('\u0000', '\uFFFF');
st.whitespaceChars(' ', ' ');
st.whitespaceChars('\t', '\t');
st.ordinaryChar(delim1);
st.ordinaryChar(delim2); //etc
st.eolIsSignificant(true);
would the above be equal to the mythical:
st = new StreamTokenizer(stream);
st.parseNumbers(false);
st.ordinaryChar(delim1);
st.ordinaryChar(delim2);
st.eolIsSignificant(true);
?
Seems odd you can't just set parseNumbers(false);
thanks for the help,
-j
StreamTokenizer class how do I turn off parserNumbers()? The function
does not accept a boolean. Apparently it's a one way switch and the
default is "on".
The only way I can see around it is to call resetSyntax(). But then I
need to re-set all the words, whitespace and ordinary characters.
Does anyone have a list of what the default for these is?
would this do it?
StreamTokenizer st = new StreamTokenizer(stream);
st.resetSyntax();
st.wordChars('\u0000', '\uFFFF');
st.whitespaceChars(' ', ' ');
st.whitespaceChars('\t', '\t');
st.ordinaryChar(delim1);
st.ordinaryChar(delim2); //etc
st.eolIsSignificant(true);
would the above be equal to the mythical:
st = new StreamTokenizer(stream);
st.parseNumbers(false);
st.ordinaryChar(delim1);
st.ordinaryChar(delim2);
st.eolIsSignificant(true);
?
Seems odd you can't just set parseNumbers(false);
thanks for the help,
-j