Question: Create a lexical analyzer that validates a user - supplied string. the program must identify the next Token and assign it its corresponding category 0
Create a lexical analyzer that validates a usersupplied string.
the program must identify the next Token and assign it its corresponding category
Data type Identifier constant ;
if while returns else for
opSum opMultiplication opLogical opRelational $
Be:
opAdision
opMultiplication
opLogic &&
operational
constant any number # and pi
data type int float char empty string
Remember to show at the end the number of tokens found in each category or if you found any errors.
It can be implemented in any language, as long as it meets the aforementioned requirements.
I share the codes seen in class in case you want to use them as a base or support.
Attached are the source codes, the activity development report and a short video demonstrating its operation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
