Assignment: The first phase of compilation is called scanning or lexical analysis. This phase interprets the input program as a sequence of characters and produces a sequence of tokens, which will be used by the parser. Your job is to write (in C++) a simple scanner for source code that obeys the language described below. You may assume that the input is syntactically correct. Your program simply needs to read each token and then print out what type it is, based on the following language rules: keyword if I then I else I begin l end I function I return identifier character I character identifier integer digit I digit integer real integer.integer special I I I I digit 0111213 41516171819 character alblc… IzlAlBIC… IZ More details: Case is not used to distinguish keywords or identifiers. The delimiters are space, tab, and newline The token classes that should be recognized are keyword, identifier, integer, and real Your final program must compile and run using a C++ compiler (your choice) Submitting your work Submit your code via Blackboard. Do not submit a ZIP or archive file, submit each file independently. In the past, archives etc. have been problematic.
Tags: academicwriting, assignment, assignmentday, assignmentdue, assignmenthelp, assignmenthelper, assignmenthelpers, assignments, assignmentsdue, assignmentssuck, assignmentstress, assignmenttime, assignmentwriting, college, dissertation, essay, essayhelp, essaywriting, essaywritingservice, homework, homeworkhelp, researchpaper, student, studentlife, students, thesis, thesiswriting, university, universityassignment, writing