Question
Draw an FSA for each of the 5 categories of Lexemes identified in project one, plus another to identify Comments. 1. An Identifier (or Reserved
Draw an FSA for each of the 5 categories of Lexemes identified in project one, plus another to identify Comments. 1. An Identifier (or Reserved Word) a. Starts with an alpha (a-z or A-Z) b. The remainder may be alpha or digit (0-9) c. Delimited by any character not alpha or digit 2. A recognized Symbol + - * / = < > [ ] . , : ; ^ ( ) <> <= >= := .. 3. An Integer Literal a. 1 or more digits with no decimal point b. Delimited by any character not a digit 4. A Real (Float) Literal a. 1 or more digits, followed by a decimal point, followed by one or more digits. b. Delimited by any character not a digit. c. Error: following digit expected when the character after the decimal point is not a digit. Ex: 3. 3. 0 5. A Character (String) Literal a. Begins with a single quote and contains all characters up until the next single quote. b. Inside a character literal, two consecutive single quotes are interpreted as one single quote. Ex: Shes a nice person is interpreted as Shes a nice person. c. The begin and end quotes should be stripped from the lexeme name/value. d. Error: end of character literal expected when an end of line/file is encountered before the ending single quote. The column/line numbers should be adjusted to refer to the decimal point itself.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started