I have the project requirements and solution document. I just need test cases documents created for this.
You are to submit two files.
The first is a .zip file that contains all the source code for the project. The .zip file should contain the flex input file, which should be a .l file, all .cc and .h files, and a makefile that builds the project.
The second is a Word document (PDF or RTF is also acceptable) that contains the documentation for the project, which should include the following:
A discussion of how you approached the project
A test plan that includes test cases that you have created indicating what aspects of the program each one is testing and a screenshot of your compiler run on that test case
A discussion of lessons learned from the project and any improvements that could be made
This part of the project.
Requirements: NA | .doc file
CMSC 430 Project 1
The first project involves modifying the attached lexical analyzer and the compilation listing generator code. You need to make the following modifications to the lexical analyzer, scanner.l:
1. A new token ARROW should be added for the two character punctuation symbol =>.
2. The following reserved words should be added:
case, else, endcase, endif, if, others, real, then, when
Each reserved words should be a separate token. The token name should be the same as the lexeme, but in all upper case.
3. Two additional logical operators should be added. The lexeme for the first should be or and its token should be OROP. The second logical operator added should be not and its token should be NOTOP.
4. Five relational operators should be added. They are =, /=, >, >= and <=. All of the lexemes should be represented by the single token RELOP.
5. One additional lexeme should be added for the ADDOP token. It is binary -.
6. One additional lexeme should be added for the MULOP token. It is/.
7. A new token REMOP should be added for the remainder operator. Its lexeme should be rem.
8. A new token EXPOP should be added for the exponentiation operator. Its lexeme should be **.
9. A second type of comment should be added that begins with // and ends with the end of line. As with the existing comment, no token should be returned.
10. The definition for the identifiers should be modified so that underscores can be included, however, consecutive underscores, leading and trailing underscores should not be permitted.
11. A real literal token should be added. It should begin with a sequence of one or more digits following by a decimal point followed by zero or more additional digits. It may optionally end with an exponent. If present, the exponent should begin with an e or E, followed by an optional plus or minus sign followed by one or more digits. The token should be named REAL_LITERAL.
12. A Boolean literal token should be added. It should have two lexemes, which are true and false. The token should be named BOOL_LITERAL.
You must also modify the header file tokens.h to include each the new tokens mentioned above.
The compilation listing generator code should be modified as follows:
1. The lastLine function should be modified to compute the total number of errors. If any errors occurred the number of lexical, syntactic and semantic errors should be displayed.
If no errors occurred, it should display Compiled Successfully. It should return the
total number of errors.
2. The appendError function should be modified to count the number of lexical, syntactic
and semantic errors. The error message passed to it should be added to a queue of
messages that occurred on that line.
3. The displayErrors function should be modified to display all the error messages that
have occurred on the previous line and then clear the queue of messages.
An example of the output of a program with no lexical errors is shown below:
1 (* Program with no errors *)
2
3 function test1 returns boolean;
4 begin
5 7 + 2 > 6 and 8 = 5 * (7 – 4);
6 end;
Compiled Successfully
Here is the required output for a program that contains more than one lexical error on the same
line:
1 — Function with two lexical errors
2
3 function test2 returns integer;
4 begin
5 7 $ 2 ^ (2 + 4);
Lexical Error, Invalid Character $
Lexical Error, Invalid Character ^
6 end;
Lexical Errors 2
Syntax Errors 0
Semantic Errors 0
You are to submit two files.
1. The first is a .zip file that contains all the source code for the project. The .zip file
should contain the flex input file, which should be a .l file, all .cc and .h files and a
makefile that builds the project.
2. The second is a Word document (PDF or RTF is also acceptable) that contains the
documentation for the project, which should include the following:
a. A discussion of how you approached the project
b. A test plan that includes test cases that you have created indicating what aspects
of the program each one is testing and a screen shot of your compiler run on that
test case
c. A discussion of lessons learned from the project and any improvements that could
be made
Grading Rubric
Criteria Meets Does Not Meet
Functionality
70 points 0 points
Defines new comment lexeme (5) Does not define new comment lexeme
(0)
Correctly modifies identifier definition
to include underscores (5)
Does not correctly modify identifier
definition to include underscores (0)
Adds real and Boolean tokens (5) Does not add real and Boolean tokens
(0)
Defines additional logical operators (5) Does not define additional logical
operators (0)
Defines additional relational operators
(5)
Does not define additional relational
operators (0)
Defines additional arithmetic operators
(5)
Does not define additional arithmetic
operators (0)
Defines additional reserved words and
arrow symbol(5)
Does not define additional reserved
words and arrow symbol (0)
Adds new tokens to the token header
file (5)
Does not add new tokens to the token
header file (0)
Implements modifications to display
multiple errors on the same line (15)
Does not implement modifications to
display multiple errors on the same line
(0)
Implements modifications to count and
display each type of compilation error
(15)
Does not Implement modifications to
count and display each type of
compilation error (0)
Test Cases
15 points 0 points
Includes test case containing all
lexemes (5)
Does not include test case containing
all lexemes (0)
Includes test case with multiple errors
on one line (5)
Does not include test case with
multiple errors on one line (0)
Includes test case with no errors (5) Does not include test case with no
errors (0)
Documentation
15 points 0 points
Discussion of approach included (5) Discussion of approach not included (0)
Lessons learned included (5) Lessons learned not included (0)
Comment blocks with student name,
project, date and code description
included in each file (5)
Comment blocks with student name,
project, date and code description not
included in each file (0)
Order any type of Service We Provide
We are the best assignment service that can satisfy student’s demands in different scientific fields. We perform tasks of any kind. Our specialists provide diverse custom assignment writing services to students from all over the world every day. You can contact us for assistance with:
The list is far from complete!
Representatives of our student assignment service are connoisseurs of the peculiarities of presentation in regards to academics. Your college assignment will never turn out an untoward surprise! Whether you need research for high school, an undergraduate program, or a Master’s or Doctoral degree, you will get exactly what you are looking for to sound smart and well-informed.
If you are pressed for time, request our experts!
We are your academic saver. It is a perfect solution for people who need academic help but has no professionals nearby to provide it. Just redirect your home tasks to us and forget about any educational issues. With us, you will get 100% plagiarism-free content delivered on time by an experienced specialist in a particular field.
When you order professional assignments here, you will get:
Original custom papers. We value your academic reputation. Just as well, we value the years of thorough work on our reputation for reliability and never compromise the originality of delivered papers. We will never endanger both. Every custom assignment is written from zero – the only possible first stage of work on the order is research. We apply the latest plagiary checking tools on the final stage, so plagiarism has no chance to emerge in your college assignment writing.
Control over the order completion. To make the process of collaboration comfortable and efficient, we offer our clients to choose the writer themselves taking into account all the requirements and the budget. For you to save nerves, having entrusted your fateful task to some qualified “stranger”, we enable communication with the assigned writer in the process of order completion.
Affordable assistance. We are eager to contribute to the academic achievements of students in need of help with college assignments. We are eager to help you start investing in your career growth today. That is why our service is so affordable. We don’t charge to pay for the latest marketing tricks or advertisements – we choose the best experts in the labor market who write great custom papers in any area, level of complexity, and time frame. Our client’s grateful feedback is a top advertising trick.
On-time delivery. The quality of a paper is only valued when it is delivered within the determined time frame – you will get your custom assignment writing service in time and have a couple of days to revise it and ask for changes in case they are needed. And you will still have time to learn the material.
Protection. We value your trust and take all measures needed to keep your private and banking details safe. We offer only well-tested payment methods. Due to the system of encryption and protected servers, no third party can have access to your data.
Custom support 24/7. We do our best to make the process of collaboration comfortable for the customer. Our “write my assignment” help is always here for you to provide a solution to your problems, give you a prompt answer to any question, and offer clarification as to any issue related to the services. Feel free to contact us anytime!
If you feel that your dissatisfaction with student life is growing every day and you just feel exhausted, don’t hesitate to change the situation for the better today. Order your first assignment from reliable custom assignment services today to evaluate the advantages.
Having seen the difference once, you won’t want to go back to your previous lifestyle. You deserve to find fulfilment in other spheres of your life, have hobbies, spend time with close people but continue making progress. It is possible when you have a professional helper. Don’t put off your life for someday after graduation!
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more