diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 4f32feffb2..34fe1bb6e9 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -119,7 +119,7 @@ The `Parser` component is responsible for interpreting the user's input and retu Below is the sequence diagram of a parser which shows how `Parser` parses user input: -![Parser Parsing User Input Sequence Diagram](images/sequence/Parser.png) +![Parser Parsing User Input Sequence Diagram](images/sequence/Parser_execute_command.svg)
*Figure 5: Parser Parsing User Input Sequence Diagram* When user input a string to `Main`, it passes the full user input to `Parser` via `parseCommand`. In `parseCommand`, it finds the matching keyword for different command from the user input, it calls the respective `prepareCommand` method within itself. `prepareCommand` then generates the corresponding command class and return it to `parseCommand`, which returns the `Command` back to `Main` for execution. diff --git a/docs/images/sequence/Parser_execute_command.svg b/docs/images/sequence/Parser_execute_command.svg new file mode 100644 index 0000000000..53e7bac823 --- /dev/null +++ b/docs/images/sequence/Parser_execute_command.svg @@ -0,0 +1 @@ +UserUser:Main:Main:Parser:Parser:XYZCommand:XYZCommandfullUserInput: StringparseCommand(fullUserInput: String)alt[XYZCOMMAND_WORD]prepareXYZCommand(requiredArguments)XYZCommand(requiredArguments)XYZCommandXYZCommandexecute() \ No newline at end of file