public class InfixTokenizer
extends java.lang.Object
Constructor and Description |
---|
InfixTokenizer(java.lang.String line) |
Modifier and Type | Method and Description |
---|---|
int |
getSize() |
Token[] |
getTokens() |
boolean |
isDecimalPoint(char ch) |
boolean |
isDigit(char ch) |
boolean |
isLeftParen(char ch) |
boolean |
isLetter(char ch) |
boolean |
isRightParen(char ch) |
static void |
main(java.lang.String[] args)
Test drive the InfixTokenizer.
|
boolean |
operator(char ch) |
Token[] |
parseLine()
parses the line and creates an array of Tokens.
|
public InfixTokenizer(java.lang.String line)
line
- is a string in proper infix form.public int getSize()
public Token[] getTokens()
public boolean operator(char ch)
ch
- public boolean isLetter(char ch)
ch
- public boolean isDigit(char ch)
ch
- public boolean isDecimalPoint(char ch)
ch
- public boolean isLeftParen(char ch)
ch
- public boolean isRightParen(char ch)
ch
- public Token[] parseLine()
public static void main(java.lang.String[] args)
args
-