Question: The main() function is provided for you, and you should only need to modify the body of the parseLine() function in FlightPlanParse.cpp. Some of

The main() function is provided for you, and you should only need 

The main() function is provided for you, and you should only need to modify the body of the parseLine() function in FlightPlanParse.cpp. Some of the code is provided, and you need to insert code where there is a "TODO:" comment. The program should print each input line on the console, followed by the 0 to 3 (string) tokens contained on that line. For example, if the input line is: int x 0 1 x coordinate then your program should write: int x 8 token: "int" token: "x" token: "8" If the input line is: loop_check: x coordinate then your program should write: loop_check: token: "loop_check:" If the input line is: cmd then your program should write: cnd token: "cmd" token: " " Test your code with the parse_test1.txt file provided, and one other test file named parse_test2.txt that you create. One of the major themes of this course is that the software developer is primarily responsible for creating comprehensive tests for their code. The goal is coverage, so it would be good to include at least every opcode and every operand variation (both variable and constant operands). See Flight Plan Language syntax.pdf Sprinkle white space (both spaces and tabs) and comments all over the place. The code doesn't have to "make sense" since the only concern right now is correct parsing rather than execution. One doesn't want to still be dealing with parse errors in project 4. Bonus points will be awarded for an exceptionally thorough parse_test2.txt. The parse_test1.txt file's white space contains both blank and tab ("\t') characters. Wherever you check for a blank you should also check for a tab. As in the state machine, you don't have to handle syntax errors in the input file (e.g. no matching '>' for a '

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!