Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C++ Undergraduate Requirements:You are to write a lexical scanner for the language SIMPL. The scanner will be written as a class

Write a program in C++ image text in transcribed
Undergraduate Requirements:You are to write a lexical scanner for the language SIMPL. The scanner will be written as a class with a function that returns a token structure containing an identification number, and the string value of the token. Also write a driver program, which continually calls the scanner, until the end of file is reached. For each token it gets, the driver should print the token identification number, and the token string. You will also document your scanner with some supplemental material. You should turn in a list of all of your token types, and their identification numbers, and a DFA for your scanner. Your lexical scanner should read its input from standard input, and output to standard output. Any error messages should be output to standard error. If the scanner encounters an unexpected character, no error message should be printed by the scanner, but the current incomplete token, together with the unexpected character, should be returned as an error token. There is no limit on the length of an identifier, or number. Your scanner should take this into account. You will turn in a listing of your code, and supporting materials. You will also demonstrate your program to me. The test files used in the demonstration are available for your inspection on the tests directory of your SIMPL distribution. The following is a list of SIMPLE token types

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions