Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a subset of C+ language. Description of the language as follow: Detail Note #DEFINE // define is keyword DEFINE / Nothing Reserve

This is a subset of C+ language. Description of the language as follow: Detail Note #DEFINE // define is keyword DEFINE / Nothing Reserve words CONST, FLOAT , INT, BREAK, CONTINUE , ELSE , FOR , SWITCH, VOID, CASE, ENUM , SIZEOF, TYPEDEF ,CHAR ,DO, IF, RETURN, UNION, WHILE, GIFT, DEAN, HOD, and, #INCLUDE // include is keyword INCLUDE // Nothing " cannot be an identifier. cannot be last symbol of id. Must have one or more digit. or Identifiers examples (vallu e, r2ate, Clo_unter, 2test123, etc Can start with Digit. Numbers example (123,223, 23.5, 0.45 etc) ,!=,,=, =,*, +,1,, >>>, < >>, output use instead of >> 6. " < Project Description: For this assignment, you have to implement a lexical analyzer, also called a scanner. This assignment includes following parts: PARTS Output Marks Define Lexical Specification (Regular Expressions) for all 1 token types. Document 2 Generate NFA for each regular expression or complete DFA Document 10 4 Code (Pre Lex and Lexical Analysis) Source Code Files 85 Total 100 Absolute 10 Evaluating Criteria: 1. Source code should reflect the detail given in documents (other parts). 2. A text file with valid source code will be input of the scanner and Token file will be output of the scanner tool. 3. All points discussed in the class related to scanner implementation should reflect in the assignment. 4. Application should not do which is not supposed to do. SCANNER Sourcecode.txt Token.txt Error.txt 5. In case of invalid source code tool must generate error list.

Step by Step Solution

3.25 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

Answer1 Lexial Analysis is the first phase of the compiler also known as scanner It converts the hig... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability And Statistics For Engineering And The Sciences

Authors: Jay L. Devore

9th Edition

1305251806, 978-1305251809

More Books

Students also viewed these Programming questions

Question

How to resolve these 2 questions

Answered: 1 week ago

Question

Distinguish between prejudice and discrimination.

Answered: 1 week ago