The main() function is provided for you, and you should only need to modify the body...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 ' 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 '
Expert Answer:
Related Book For
Business Communication Essentials a skill based approach
ISBN: 978-0132971324
6th edition
Authors: Courtland L. Bovee, John V. Thill
Posted Date:
Students also viewed these databases questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Construct a multilevel bill of material for product Z. How many Us are needed to make each Z? How many Ws are needed to make eachZ? Z. (2) (3) (2) (1) (1) (4)
-
Two companies called Blur plc and Oasis plc are considering a merger. Financial data for the two companies are given below: Blur Oasis Number of shares issued............. 3m..................6m...
-
Prove the following special case of Theorem 12.29i. Suppose that E and E0 are a Jordan regions in Rn, and that f: E R is bounded. If f is continuous on E \ E0, then f is integrable on E.
-
Summarize different theories offered to explain the existence of gender hierarchies.
-
Hovak Company has credit sales of $ 4.5 million for year 2013. At December 31, 2013, the companys Allowance for Doubtful Accounts has an unadjusted debit balance of $ 3,400. Hovak prepares a schedule...
-
Compare and contrast containerization technologies (e.g., Docker, Kubernetes) with traditional virtualization approaches. What are the key differences in terms of resource isolation, performance, and...
-
Write a Python program that verifies the formula with the help of the Python Math library. Note that the library trigonometric functions act on the angles in radians. Your program should perform the...
-
Police set up a sobriety checkpoint at which every fifth driver is stopped and interviewed. Identify which of the following applies: simple random sample, systematic sample, convenience sample,...
-
Weights of the cola in cans of Diet Coke. Identify the level of measurement (nominal, ordinal, interval, or ratio).
-
Identify three stories from the past week that involve statistics in some way. In each case, write a brief statement describing the role of statistics in the story.
-
The white blood cell counts of different people, consisting of the numbers of white blood cells per microliter of blood. Determine whether the data described are qualitative or quantitative and...
-
Distances traveled by college students as they drive from their homes to their colleges. Identify the level of measurement (nominal, ordinal, interval, or ratio).
-
Amelia is 28 and an Australian resident, who is single and employed as an engineer at an engineering firm in the city. During the 2020/21 income year, she earned salary of $150,000 from which her...
-
Place a tick in the appropriate grid to identify the balance that would be brought down in each of the following named accounts, in the books of Rizwy Mohamed: (a) In the Cash account: if Rizwy...
-
What steps can you take to ensure success with online presentations?
-
You are president of the Friends of the Library, a not-for-profit group that raises funds and provides volunteers to support your local library. Every February, you send a report of the previous...
-
Select a product you are familiar with and imagine you are the manufacturer, trying to get a local retail outlet to carry it. Use the Internet and other resources to gather information about the...
-
How could bottleneck management's recommendations concerning the distinction between activation and utilization relate to personal time management?
-
Line balancing is a technique for scheduling for a system that produces at what level of volume?
-
Give an example in which more than one priority rule is used simultaneously to create a sequence.
Study smarter with the SolutionInn App