--- old/src/share/classes/java/io/StreamTokenizer.java 2012-01-23 00:18:51.000000000 -0800
+++ new/src/share/classes/java/io/StreamTokenizer.java 2012-01-23 00:18:50.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
import java.util.Arrays;
/**
- * The StreamTokenizer
class takes an input stream and
+ * The {@code StreamTokenizer} class takes an input stream and
* parses it into "tokens", allowing the tokens to be
* read one at a time. The parsing process is controlled by a table
* and a number of flags that can be set to various states. The
@@ -36,7 +36,7 @@
* strings, and various comment styles.
*
* Each byte read from the input stream is regarded as a character
- * in the range '\u0000'
through '\u00FF'
.
+ * in the range {@code '\u005Cu0000'} through {@code '\u005Cu00FF'}.
* The character value is used to look up five possible attributes of
* the character: white space, alphabetic,
* numeric, string quote, and comment character.
@@ -53,8 +53,8 @@
*
* A typical application first constructs an instance of this class,
* sets up the syntax tables, and then repeatedly loops calling the
- * nextToken
method in each iteration of the loop until
- * it returns the value TT_EOF
.
+ * {@code nextToken} method in each iteration of the loop until
+ * it returns the value {@code TT_EOF}.
*
* @author James Gosling
* @see java.io.StreamTokenizer#nextToken()
@@ -99,19 +99,19 @@
private static final byte CT_COMMENT = 16;
/**
- * After a call to the nextToken
method, this field
+ * After a call to the {@code nextToken} method, this field
* contains the type of the token just read. For a single character
* token, its value is the single character, converted to an integer.
* For a quoted string token, its value is the quote character.
* Otherwise, its value is one of the following:
*
TT_WORD
indicates that the token is a word.
- * TT_NUMBER
indicates that the token is a number.
- * TT_EOL
indicates that the end of line has been read.
+ * eolIsSignificant
method has been called with the
- * argument true
.
- * TT_EOF
indicates that the end of the input stream
+ * {@code eolIsSignificant} method has been called with the
+ * argument {@code true}.
+ * @@ -160,8 +160,8 @@ * the string. *
* The current token is a word when the value of the
- * ttype
field is TT_WORD
. The current token is
- * a quoted string token when the value of the ttype
field is
+ * {@code ttype} field is {@code TT_WORD}. The current token is
+ * a quoted string token when the value of the {@code ttype} field is
* a quote character.
*
* The initial value of this field is null.
@@ -175,7 +175,7 @@
/**
* If the current token is a number, this field contains the value
* of that number. The current token is a number when the value of
- * the ttype
field is TT_NUMBER
.
+ * the {@code ttype} field is {@code TT_NUMBER}.
*
* The initial value of this field is 0.0. * @@ -201,14 +201,14 @@ * stream. The stream tokenizer is initialized to the following * default state: *
'A'
through 'Z'
,
- * 'a'
through 'z'
, and
- * '\u00A0'
through '\u00FF'
are
+ * '\u0000'
through
- * '\u0020'
are considered to be white space.
- * '/'
is a comment character.
- * '\''
and double quote '"'
+ * ordinaryChar
method
+ * "ordinary." See the {@code ordinaryChar} method
* for more information on a character being ordinary.
*
* @see java.io.StreamTokenizer#ordinaryChar(int)
@@ -305,7 +305,7 @@
* Specifies that all characters c in the range
* low <= c <= high
* are "ordinary" in this tokenizer. See the
- * ordinaryChar
method for more information on a
+ * {@code ordinaryChar} method for more information on a
* character being ordinary.
*
* @param low the low end of the range.
@@ -327,12 +327,12 @@
* character has as a comment character, word component, string
* delimiter, white space, or number character. When such a character
* is encountered by the parser, the parser treats it as a
- * single-character token and sets ttype
field to the
+ * single-character token and sets {@code ttype} field to the
* character value.
*
* Making a line terminator character "ordinary" may interfere
- * with the ability of a StreamTokenizer
to count
- * lines. The lineno
method may no longer reflect
+ * with the ability of a {@code StreamTokenizer} to count
+ * lines. The {@code lineno} method may no longer reflect
* the presence of such terminator characters in its line count.
*
* @param ch the character.
@@ -361,9 +361,9 @@
* Specifies that matching pairs of this character delimit string
* constants in this tokenizer.
*
- * When the nextToken
method encounters a string
- * constant, the ttype
field is set to the string
- * delimiter and the sval
field is set to the body of
+ * When the {@code nextToken} method encounters a string
+ * constant, the {@code ttype} field is set to the string
+ * delimiter and the {@code sval} field is set to the body of
* the string.
*
* If a string quote character is encountered, then a string is
@@ -371,7 +371,7 @@
* the string quote character, up to (but not including) the next
* occurrence of that same string quote character, or a line
* terminator, or end of file. The usual escape sequences such as
- * "\n"
and "\t"
are recognized and
+ * {@code "\u005Cn"} and {@code "\u005Ct"} are recognized and
* converted to single characters as the string is parsed.
*
*
Any other attribute settings for the specified character are cleared. @@ -398,9 +398,9 @@ *
* When the parser encounters a word token that has the format of a
* double precision floating-point number, it treats the token as a
- * number rather than a word, by setting the ttype
- * field to the value TT_NUMBER
and putting the numeric
- * value of the token into the nval
field.
+ * number rather than a word, by setting the {@code ttype}
+ * field to the value {@code TT_NUMBER} and putting the numeric
+ * value of the token into the {@code nval} field.
*
* @see java.io.StreamTokenizer#nval
* @see java.io.StreamTokenizer#TT_NUMBER
@@ -416,21 +416,21 @@
/**
* Determines whether or not ends of line are treated as tokens.
* If the flag argument is true, this tokenizer treats end of lines
- * as tokens; the nextToken
method returns
- * TT_EOL
and also sets the ttype
field to
+ * as tokens; the {@code nextToken} method returns
+ * {@code TT_EOL} and also sets the {@code ttype} field to
* this value when an end of line is read.
*
* A line is a sequence of characters ending with either a
- * carriage-return character ('\r'
) or a newline
- * character ('\n'
). In addition, a carriage-return
+ * carriage-return character ({@code '\u005Cr'}) or a newline
+ * character ({@code '\u005Cn'}). In addition, a carriage-return
* character followed immediately by a newline character is treated
* as a single end-of-line token.
*
- * If the flag
is false, end-of-line characters are
+ * If the {@code flag} is false, end-of-line characters are
* treated as white space and serve only to separate tokens.
*
- * @param flag true
indicates that end-of-line characters
- * are separate tokens; false
indicates that
+ * @param flag {@code true} indicates that end-of-line characters
+ * are separate tokens; {@code false} indicates that
* end-of-line characters are white space.
* @see java.io.StreamTokenizer#nextToken()
* @see java.io.StreamTokenizer#ttype
@@ -442,14 +442,14 @@
/**
* Determines whether or not the tokenizer recognizes C-style comments.
- * If the flag argument is true
, this stream tokenizer
+ * If the flag argument is {@code true}, this stream tokenizer
* recognizes C-style comments. All text between successive
- * occurrences of /*
and */
are discarded.
+ * occurrences of {@code /*} and */
are discarded.
*
- * If the flag argument is false
, then C-style comments
+ * If the flag argument is {@code false}, then C-style comments
* are not treated specially.
*
- * @param flag true
indicates to recognize and ignore
+ * @param flag {@code true} indicates to recognize and ignore
* C-style comments.
*/
public void slashStarComments(boolean flag) {
@@ -458,15 +458,15 @@
/**
* Determines whether or not the tokenizer recognizes C++-style comments.
- * If the flag argument is true
, this stream tokenizer
+ * If the flag argument is {@code true}, this stream tokenizer
* recognizes C++-style comments. Any occurrence of two consecutive
- * slash characters ('/'
) is treated as the beginning of
+ * slash characters ({@code '/'}) is treated as the beginning of
* a comment that extends to the end of the line.
*
- * If the flag argument is false
, then C++-style
+ * If the flag argument is {@code false}, then C++-style
* comments are not treated specially.
*
- * @param flag true
indicates to recognize and ignore
+ * @param flag {@code true} indicates to recognize and ignore
* C++-style comments.
*/
public void slashSlashComments(boolean flag) {
@@ -475,16 +475,16 @@
/**
* Determines whether or not word token are automatically lowercased.
- * If the flag argument is true
, then the value in the
- * sval
field is lowercased whenever a word token is
- * returned (the ttype
field has the
- * value TT_WORD
by the nextToken
method
+ * If the flag argument is {@code true}, then the value in the
+ * {@code sval} field is lowercased whenever a word token is
+ * returned (the {@code ttype} field has the
+ * value {@code TT_WORD} by the {@code nextToken} method
* of this tokenizer.
*
- * If the flag argument is false
, then the
- * sval
field is not modified.
+ * If the flag argument is {@code false}, then the
+ * {@code sval} field is not modified.
*
- * @param fl true
indicates that all word tokens should
+ * @param fl {@code true} indicates that all word tokens should
* be lowercased.
* @see java.io.StreamTokenizer#nextToken()
* @see java.io.StreamTokenizer#ttype
@@ -506,9 +506,9 @@
/**
* Parses the next token from the input stream of this tokenizer.
- * The type of the next token is returned in the ttype
+ * The type of the next token is returned in the {@code ttype}
* field. Additional information about the token may be in the
- * nval
field or the sval
field of this
+ * {@code nval} field or the {@code sval} field of this
* tokenizer.
*
* Typical clients of this
@@ -516,7 +516,7 @@
* calling nextToken to parse successive tokens until TT_EOF
* is returned.
*
- * @return the value of the ttype
field.
+ * @return the value of the {@code ttype} field.
* @exception IOException if an I/O error occurs.
* @see java.io.StreamTokenizer#nval
* @see java.io.StreamTokenizer#sval
@@ -752,10 +752,10 @@
}
/**
- * Causes the next call to the nextToken
method of this
- * tokenizer to return the current value in the ttype
- * field, and not to modify the value in the nval
or
- * sval
field.
+ * Causes the next call to the {@code nextToken} method of this
+ * tokenizer to return the current value in the {@code ttype}
+ * field, and not to modify the value in the {@code nval} or
+ * {@code sval} field.
*
* @see java.io.StreamTokenizer#nextToken()
* @see java.io.StreamTokenizer#nval