Package cs350s22.component.ui.parser
Class Parser
java.lang.Object
cs350s22.component.ui.parser.Parser
The main parser class used to interpret commands.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final cs350s22.component.ui.parser.A_ParserHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
parse()
Parse the first one or two commands/arguments passed by the calling object (set via the constructor), then initialize and execute the appropriate subParser.
-
Field Details
-
commandText
-
parserHelper
private final cs350s22.component.ui.parser.A_ParserHelper parserHelper
-
-
Constructor Details
-
Parser
Constructor.- Parameters:
parserHelper
- Object to be used be each sub parser.commandText
- The string of commands to be parsed.
-
-
Method Details
-
parse
Parse the first one or two commands/arguments passed by the calling object (set via the constructor), then initialize and execute the appropriate subParser.- Throws:
IOException
- Invalid input.
-