You have to design and implement a lexical analyzer/scanner for the following set of tokens.
– Unsigned integer constant
– Unsigned floating point constant in e-format iiiii.fffffeSEE
where ,There is at least one integral digit (may be zero), at most five fraction digits, 'e' is for the exponent, S is the sign of the exponent, '+' or '-' (absence of S indicates a '+'), one or two digit of exponent (base 10). The pattern {eSEE} is optional.
– Identifier: letter followed by letters, digits or underscore
– Reserved words - {array, begin, const, do, else, end, for, func, if, proc, prog, repeat, set, then, to, until, var}
– Types - {int, float, bool}
– Operators - {:=, +, -, *, /, div, mod, <, <=, >, >=, =, <>}
– Delimiters - { ( ) , [ ] ; .. : . }
• Your scanner should go for longest possible match i.e. a string
'<=' is to be identified as 'less-equal' and not as '<' ('less') and '='('equal')