No More Worries!

image Our orders are delivered strictly on time without delay

Paper Formatting

  • Double or single-spaced
  • 1-inch margin
  • 12 Font Arial or Times New Roman
  • 300 words per page

No Lateness!

image Our orders are delivered strictly on time without delay

Our Guarantees


  • Free Unlimited revisions
  • Guaranteed Privacy
  • Money Return guarantee
  • Plagiarism Free Writing

Theory and design

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.

  1. 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.
  2. Five relational operators should be added. They are =, /=, >, >= and <=. All of the lexemes should be represented by the single token RELOP.
  3. One additional lexeme should be added for the ADDOP token. It is binary -.
  4. One additional lexeme should be added for the MULOP token. It is/.
  5. A new token REMOP should be added for the remainder operator. Its lexeme should be rem.
  6. A new token EXPOP should be added for the exponentiation operator. Its lexeme should be **.
  7. 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.
  8. 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.
  9. 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.
  10. 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.

  1. 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.
  2. 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 *)


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


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

Sample Solution

laska, 2008), and Fraser (2000) warned about the need for a reliable methodology behind self-assessment in teaching pronunciation. The impact of such a method on learners’ pronunciation, whether negative or positive, needs further investigation. Because students are the center-part in their own learning and need to be more proactive (Salimi, Asghar Kargar, & Zareian, 2014), it is also necessary to examine students’ awareness of their own learning progress. This paper proposes to look at self-evaluations as a tool in the acquisition of French pronunciation as an L2 and test self-evaluations’ reliability and validity by doing an item analysis. It will analyze the data from a beta-pilot test of the two instruments created (sentences to record and self-evaluations). This paper will also assess whether the use of self-evaluations by college-level learners of French enrolled in a phonetics course, will improve their pronunciation over the course of a semester. The aspects of French pronunciation studied here, have been carefully selected because they represent segmental (/y/ vs /u/) and segmental/suprasegmental (schwa) features in French, and they are particularly critical for comprehensibility. This paper seeks to answer the following questions: RQ1: Are the instruments created valid and reliable tools to assess pronunciation? RQ2: Is there a difference between control and treatment groups overall and on both aspects: segmental and segmental/suprasegmental? RQ3: To what extent do the students’ self-evaluations compare with evaluations by the expert rater overall and on both aspects: segmental and segmental/suprasegmental? Literature Review Self-assessment is described as a type of formative assessment. Formative assessment is student-centered and differs from summative assessment which is teacher-centered. Formative assessment occurs during the learning process, and not at the end of the learning period. According to Fulcher (2016), formative assessment’s purpose is to “inform and improve learning, rather than simply to assess whether the learners have mastered the learning objectives”. Summative assessments are made of criteria set by the instructor while formative assessments are types of assessment that provide feedback on learner’s performance in order to improve this performance. In an article published in 2006, Nicol & Macfarlane-Dick argue that “formative assessment and feedback should be used to empower students as self-regulated learners” (p.199). Ross (2005) praises the use of

Price Calculator

Single spaced
approx 275 words per page
Total Cost:

12% Discount


  • Research Paper Writing
  • Essay Writing
  • Dissertation Writing
  • Thesis Writing

Why Choose Us


  • Money Return guarantee
  • Guaranteed Privacy
  • Written by Professionals
  • Paper Written from Scratch
  • Timely Deliveries
  • Free Amendments