public class Parser extends Object
Constructor and Description |
---|
Parser()
Create a new Parser object connected to
System.in . |
Modifier and Type | Method and Description |
---|---|
CommandWords |
commandWords()
Access the set of valid command words.
|
Command |
getCommand()
Get the next command from the input sequence.
|
String |
promptString()
Get the prompt string printed before reading each command.
|
public Parser()
System.in
.public Command getCommand()
commandWords()
, and
pushing the second word into the resulting command (if there was
a second word). Any words on the line past the first two are
ignored.public String promptString()
public CommandWords commandWords()