1
Due Date: Saturday, November 22, 2020, 11:59PM
CSC3201
Fall 2020
MID EXAM (SZABIST)
Construction of Lexical Analyzer
Problem Statement:
For this assignment you will write a lexical analyzer, also called a scanner, using a lexical
analyzer generator. The set of possible tokens for Fall20Lang (Fall20 Language) are given in
following tokens.
Valid Tokens in Fall20Lang
Instruction for possible inputs:
Fall20Lang only supports four bytes signed float data types. A float value may be stored in an
identifier. An identifier is not needed to be defined before being used. The valid name of
identifier could have letters followed by some optional digits (Example: temp12 and temp are
valid identifiers but temp1z is not valid). All identifiers have global access. That means an
identifier used inside a loop for the first time may be reused outside of that loop too. There is
no semicolon (;) in the language and a newline is taken as an end of a statement. A comment
starts with two front slashes like in Java and C.
Format of Float:
The Fall20Lang support 4 byte long signed float identifiers. The format of a float is optional
sign, followed by some digits, followed by an optional "." and some more digits. For example:
7, 7.3 and 789.23 are valid float values.