Question: Consider the following lexical specification ( same as above ) . INT: ( 0 + 1 ) ( 0 + 1 ) * FLOAT: (

Consider the following lexical specification (same as above).
INT: (0+1)(0+1)*
FLOAT: (0+1)(0+1)*.(0+1)*+(0+1)*.(0+1)(0+1)*
KEYWORD: 1111
What would be the first two tokens produced by a scanner given the following input string? Use the scanning algorithm seen in class. List each token as an ordered pair without any spaces, like (lexeme,TYPE). For example (00.1,FLOAT).
11111111..1111

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!