Question: I want you to implement the scanner using the details which are given in above image and Code (Pre Lex and Lexical Analysis). 1. Source

 I want you to implement the scanner using the details which

I want you to implement the scanner using the details which are given in above image and Code (Pre Lex and Lexical Analysis).

1. Source code should reflect the detail given in above table.

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.

5. In case of invalid source code tool must generate error list.

1 Reserve words Detail CONST, FLOAT, INT, BREAK CONTINUE, ELSE, FOR, SWITCH VOID, CASE, ENUM , SIZEOF TYPEDEF,CHAR,DO, IF, RETURN UNION, WHILE, GIFT, DEAN, HOD, Note #DEFINE // define is keyword DEFINE // Nothing and, or Identifiers examples (vallue, r2ate, Clo_unter, 2test123, etc #INCLUDE // include is keyword INCLUDE // Nothing _" cannot be an identifier cannot be last symbol of id. Must have one or more digit. Can start with Digit. 3 4 Numbers example (123,223, 23.5, 0.45 etc) Operators ,!",,,*+,,>>>,>>, output> *

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!