Question: Given the following rules in lex, state whether there is any rule that cannot be matched and explain why, if there is any. letter [a-zA-Z]
Given the following rules in lex, state whether there is any rule that cannot be matched and explain why, if there is any.
letter [a-zA-Z]
digit [0-9]
%%
{letter}({letter}|{digit})* printf("VARIABLE ");
{digit}+ printf("NUMBER ");
"while" printf("WHILE ");
%%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
