Question: (C/C++ Programming) Command Parser and Tokenizer Design and implement C/C++ program (myshell.c or myshell.cpp, and its executable named myshell) to process command (to tokenize and

 (C/C++ Programming) Command Parser and Tokenizer Design and implement C/C++ program

(C/C++ Programming) Command Parser and Tokenizer Design and implement C/C++ program (myshell.c or myshell.cpp, and its executable named myshell) to process command (to tokenize and parse the command, and print its components correctly). Your C/C++ program starts and runs in a loop (to input a line of command at a time, to parse it, and to output the parsed tokens, and back to a loop). For each input, your program should be able to parse each command from user (to process one command after the other in a loop) and print the result of the parsing, until the user's input is "exit" to terminate the program. Examples (You may create your own output format or template to show the command s) being parsed.) Run your program for each of the following examples, to show that it is working correctly. #1. One command with arguments and options. For example (for the input), Is - Ia /cs3376 Your program should output: Command: Is Options: -Ia Arguments: /cs3376 #2. One command with IO redirection symbol ( > >) For example, Is output.txt Command: Is File Redirection: File: output.txt #3. Two commands with pipe. For example, Is | we should be parsed and display Command: Is Pipe Command: we #4. Three commands with pipe. For example, Is | sort | we should be parsed and display Command: Is Pipe Command: sort Command: we Copy and Paste (1) your program listing, and (2) steps of "compile and run" and Output here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!