TokenStream.
| Modifier and Type | Field and Description |
|---|---|
| private String | docComment
The optional JAVADOC comment preceding the |
| private Token | |
| private Token | |
| private Token | |
| private final Scanner | |
| private WarningHandler |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final CompileException | |
| public String | Returns: null if the next token is not preceded by a doc commentGets the text of the doc comment (a.k.a. "JAVADOC comment") preceding the next token. |
| private static int | |
| private static int | |
| private static String | |
| public Location | |
| public Token | |
| public boolean | |
| public int | peek(String... suspected)
Implements org. |
| public boolean | |
| public int | peek(TokenType... suspected)
Implements org. |
| public Token | |
| public boolean | |
| public boolean | peekRead(String suspected)
Implements org. |
| public int | peekRead(String... suspected)
Implements org. |
| public String | peekRead(TokenType suspected)
Implements org. |
| public int | peekRead(TokenType... suspected)
Implements org. |
| private Token | |
| public Token | |
| public void | read(String expected)
Implements org. |
| public int | read(String... expected)
Implements org. |
| public String | read(TokenType expected)
Implements org. |
| public int | read(TokenType... expected)
Implements org. |
| public void | setWarningHandler(WarningHandler
null to indicate that no warnings be issuedImplements org. WarningHandler.
|
| public String | |
| private void |
| docComment | back to summary |
|---|---|
| private String docComment The optional JAVADOC comment preceding the | |
| nextButOneToken | back to summary |
|---|---|
| private Token nextButOneToken
| |
| nextToken | back to summary |
|---|---|
| private Token nextToken
| |
| previousToken | back to summary |
|---|---|
| private Token previousToken
| |
| scanner | back to summary |
|---|---|
| private final Scanner scanner | |
| warningHandler | back to summary |
|---|---|
| private WarningHandler warningHandler
| |
| TokenStreamImpl | back to summary |
|---|---|
| public TokenStreamImpl(Scanner scanner) | |
| compileException | back to summary |
|---|---|
| protected final CompileException compileException(String message) Convenience method for throwing a | |
| doc | back to summary |
|---|---|
| public String doc() Gets the text of the doc comment (a.k.a. "JAVADOC comment") preceding the next token. | |
| indexOf | back to summary |
|---|---|
| private static int indexOf(String[] strings, String subject) | |
| indexOf | back to summary |
|---|---|
| private static int indexOf(TokenType[] tta, TokenType subject) | |
| join | back to summary |
|---|---|
| private static String join(Object[] oa, String glue) | |
| location | back to summary |
|---|---|
| public Location location() Implements org.
| |
| peek | back to summary |
|---|---|
| public Token peek() throws CompileException, IOException Implements org.
| |
| peek | back to summary |
|---|---|
| public boolean peek(String suspected) throws CompileException, IOException Implements org.
| |
| peek | back to summary |
|---|---|
| public int peek(String... suspected) throws CompileException, IOException Implements org. Doc from org. Checks whether the value of the next token equals any of the suspected; does not consume the next token.
| |
| peek | back to summary |
|---|---|
| public boolean peek(TokenType suspected) throws CompileException, IOException Implements org.
| |
| peek | back to summary |
|---|---|
| public int peek(TokenType... suspected) throws CompileException, IOException Implements org. Doc from org. Checks whether the type of the next token is any of the suspected; does not consume the next token.
| |
| peekNextButOne | back to summary |
|---|---|
| public Token peekNextButOne() throws CompileException, IOException Implements org.
| |
| peekNextButOne | back to summary |
|---|---|
| public boolean peekNextButOne(String suspected) throws CompileException, IOException Implements org.
| |
| peekRead | back to summary |
|---|---|
| public boolean peekRead(String suspected) throws CompileException, IOException Implements org. Doc from org. Checks whether the value of the next token equals the suspected; if so, consumes the token.
| |
| peekRead | back to summary |
|---|---|
| public int peekRead(String... suspected) throws CompileException, IOException Implements org. Doc from org. Checks whether the value of the next token is one of the suspected; if so, consumes the token.
| |
| peekRead | back to summary |
|---|---|
| public String peekRead(TokenType suspected) throws CompileException, IOException Implements org. Doc from org. Checks whether the type of the next token is the suspected; if so, consumes the token. | |
| peekRead | back to summary |
|---|---|
| public int peekRead(TokenType... suspected) throws CompileException, IOException Implements org. Doc from org. Checks whether the type of the next token is one of the suspected; if so, consumes the token.
| |
| produceToken | back to summary |
|---|---|
| private Token produceToken() throws CompileException, IOException | |
| read | back to summary |
|---|---|
| public Token read() throws CompileException, IOException Implements org.
| |
| read | back to summary |
|---|---|
| public void read(String expected) throws CompileException, IOException Implements org. Doc from org. Verifies that the value of the next token equals expected, and consumes the token.
| |
| read | back to summary |
|---|---|
| public int read(String... expected) throws CompileException, IOException Implements org. Doc from org. Verifies that the value of the next token equals one of the expected, and consumes the token.
| |
| read | back to summary |
|---|---|
| public String read(TokenType expected) throws CompileException, IOException Implements org. Doc from org. Verifies that the type of the next token is the expected, and consumes the token.
| |
| read | back to summary |
|---|---|
| public int read(TokenType... expected) throws CompileException, IOException Implements org. Doc from org. Verifies that the type of the next token is one of the expected, and consumes the token.
| |
| setWarningHandler | back to summary |
|---|---|
| public void setWarningHandler(WarningHandler warningHandler) Implements org. Doc from org. By default, warnings are discarded, but an application my install a
Notice that there is no
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| warning | back to summary |
|---|---|
| private void warning(String handle, String message, Location location) throws CompileException Issues a warning with the given message and location and returns. This is done through
a
The
| |