a test program for your parser. The program takes zero or one command line argument. If zero command line arguments are specified, the program should take input from the standard input. If one command line argument is specified, the program should use the argument as a file name and take input from that file. If the file cannot be opened, the program should print COULD NOT OPEN followed by the name of the file, and should then stop. If more than one command line argument is specified, the program should print TOO MANY FILENAMES, and should then stop. The result of an unsuccessful parse is a set of error messages printed by the parse functions. If the parse fails, the program should stop after the parse function returns. The assignment does not specify the exact error messages that should be printed out by the parse; however the format of the message should be the line number, followed by a colon and a space, followed by some descriptive text. Suggested messages might include “No statements in program”, “Missing semicolon”, “Missing identifier after set”, etc. The result of a successful parse is a parse tree. Assignment 3 is meant to test that you can properly detect poorly formed programs, and that you can traverse the parse tree for well formed programs. If a parse tree has been generated, it should be traversed to perform various tests.
The following information must be printed out for the parse tree:
1. Number of leaves (Format is LEAF COUNT: N, where N is the number of leaves)
2. Number of string constants (Format is STRING COUNT: N)
3. Number of identifiers (Format is IDENT COUNT: N, where N is the number of identifiers)
4. Comma separated list of the most frequently used identifiers If there are no identifiers, steps 3 and 4 can be skipped NOTE that your program might be graded using different input file names and error cases.
SOLVE THE GENERAL PROBLEM and DO NOT HARDCODE output for test cases.
If there are no identifiers, steps 3 and 4 can be skipped NOTE that your program might be graded using different input file names and error cases. SOLVE THE GENERAL PROBLEM and DO NOT HARDCODE output for test cases.
PART 1: ● Compiles ● Argument error cases ● Files that cannot be opened ● Too many filenames
PART 2: ● Statement lists, statements, and all primaries
PART 3 ● Everything else
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor's, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.
Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.
You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.
The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.
PLACE THIS ORDER OR A SIMILAR ORDER WITH NERDY ASSIGNMENT HELP TODAY AND GET AN AMAZING DISCOUNT