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
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final cs350s22.component.ui.parser.A_ParserHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidparse()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.
-