|
trassare.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.trassare.calculator.engine.ExpressionScanner
public class ExpressionScanner
A scanner class used for arithmetic expressions.
CS 152, Fall, 2005
Programming Assignment #1
| Nested Class Summary | |
|---|---|
static class |
ExpressionScanner.ScanException
An exception to indicate an IO error in the scanner. Useful to avoid the checked exception IOException. CS 152, Fall, 2005 Programming Assignment #1 |
| Constructor Summary | |
|---|---|
ExpressionScanner(PushbackReader stream)
Constructs an ExpressionScanner object and reads a line of input. |
|
| Method Summary | |
|---|---|
Token |
getToken()
Recognize and return the next token in the input, be it an operator, variable, or number. |
void |
resetScanner(PushbackReader stream)
Supply the calculator with a new input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExpressionScanner(PushbackReader stream)
stream - the stream from which to read the input| Method Detail |
|---|
public final Token getToken()
public final void resetScanner(PushbackReader stream)
stream - the stream from which to read the input
|
trassare.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||