Java Reference
In-Depth Information
public void slashStarComments(boolean flag)
If flag is true , the tokenizer recognizes /*...*/ comments.
This occurs independently of settings for any comment char-
acters. The default is false .
public void slashSlashComments(boolean flag)
If flag is true , the tokenizer recognizes // to end-of-line com-
ments. This occurs independently of the settings for any com-
ment characters. The default is false .
public void lowerCaseMode(boolean flag)
If flag is TRue , all characters in TT_WORD tokens are converted
to their lowercase equivalent if they have one (using
String.toLowerCase ). The default is false . Because of the case
issues described in " Character " on page 192 , you cannot reli-
ably use this for Unicode string equivalencetwo tokens might
be equivalent but have different lowercase representations.
Use String.equalsIgnoreCase for reliable case-insensitive com-
parison.
There are three miscellaneous methods:
public void pushBack()
Pushes the previously returned token back into the stream.
The next invocation of nextToken returns the same token again
instead of proceeding to the next token. There is only a one-
token pushback; multiple consecutive invocations to pushBack
are equivalent to one invocation.
public int lineno()
Returns the current line number. Usually used for reporting
errors you detect.
 
Search WWH ::




Custom Search