public class Parser
extends java.lang.Object
Constructor and Description |
---|
Parser()
Create a new Parser object.
|
Modifier and Type | Method and Description |
---|---|
CommandWords |
commandWords()
Access the set of valid command words.
|
Command |
getCommand(java.lang.String inputLine)
Get the next command based on the specified input.
|
public Command getCommand(java.lang.String inputLine)
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.inputLine
- the input line to be parsedpublic CommandWords commandWords()