Answered step by step
Verified Expert Solution
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started