Question: Due Date: February 2 5 Objective: Learn programming language implementation systems that includes lexical and syntax analysis. Practice conducting lexical and syntax analysis on given

Due Date: February 25
Objective: Learn programming language implementation systems that includes lexical and syntax
analysis. Practice conducting lexical and syntax analysis on given program components.
Assignment: Language implementation systems must input a file, identify substrings, and find
all syntax errors, regardless of the specific implementation approach. For an input program a
lexical analyzer will break a file into lexemes and tokens. A parser will find all syntax errors. For
each error the parser will produce an appropriate diagnostic message and recover quickly.
For the Simple Function defined as follows, choose a programming language C++ or Java that
you are familiar with, to implement a lexical analyzer and a top-down parser. The lexical analyzer
will read the test program and generate lexemes with token types. The parser must use the
recursive-descent parsing to implement the syntax analysis. The project must implement the
following functions:
Input the test program.
Use the Lexical Analyzer to generate lexemes and corresponding tokens, then display them.
Use the recursive-descent parser to check the syntax of the test program.
If the test program is generated by the EBNF grammar for Simple Function, your program
should display "The test program is generated by the EBNF grammar for Simple Function".
otherwise identify the first syntax error and display "The test program cannot be generated
by the EBNF Grammar for Simple Function. The first syntax error is (Give identified
error)".
Requirements:
This is a two-person team project.
Your team must use department programming standards.
The program must be executed correctly.
Email your program to
zliu2@aggies.ncat.edu.
EBNF grammar for Simple Function:
Test your program using the following test programs as input files.
while )
n=n-10
}
Second test program
void test 2(int m){
m=m-1;
}
 Due Date: February 25 Objective: Learn programming language implementation systems that

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!