Question: The assignment is to write a lexical analyzer (scanner) for PASCAL programming language, taking in consideration the following: (*) You will be a given a

The assignment is to write a lexical analyzer (scanner) for PASCAL programmingThe assignment is to write a lexical analyzer (scanner) for PASCAL programming language, taking in consideration the following: (*) You will be a given a list of the reserved words, standard identifiers(names), and a set of special symbols. 1. Every reserved word is given a unique id-number. 2. Every standard identifier(name) also have a unique id-number. 3. Identifiers ; variable names, procedure names, function names , ...etc. are given the same id. number. 4. Integers have an id-number. 5. Real numbers have an id-number. 6. Every special symbol has an id-number. .... and so on so forth. (*) The input to your program is the users program written in PASCAL. (*) The output of your program is : A list of tokens in the program showing: Token Id-Number (*) Your program should handle the lexical errors encountered. (*) Use C programming language only.

Special Symbols Reserved Words Pascal Standard Reserved Words andfile repeat set then to type nil for forwardnot function of begin or packeduntil procedure var programwhile div if do downto label else with Pascal Pre-declared Standard Identifiers false sin page pred booleanut arctan get sqr integer readsucc In maxint a true readlntext disposenew reset trunc rewniteite roundwritel odd ord output eof eoln Comments: This is a commento This is a comment Special Symbols Reserved Words Pascal Standard Reserved Words andfile repeat set then to type nil for forwardnot function of begin or packeduntil procedure var programwhile div if do downto label else with Pascal Pre-declared Standard Identifiers false sin page pred booleanut arctan get sqr integer readsucc In maxint a true readlntext disposenew reset trunc rewniteite roundwritel odd ord output eof eoln Comments: This is a commento This is a comment

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!