3,254 views

4 Answers

4 votes
4 votes

No lexical error, because lexeme "whiel" matches with the pattern of "identifier" hence a token will be created and stored in the symbol table.

0 votes
0 votes
whiel will be treated as a function name ,hence a token is generated.
0 votes
0 votes
Lexical analyzer do not show any error because it just compare the tokens with identifiers it does not check the spelling .
The lexical analyzer matches the tokens with identifiers and stores it into symbol table . spelling checking is done by semantic analyzer.
0 votes
0 votes
No lexical error, since it's syntax errow which will identify by semantic not lexical analyser.

Related questions

2 votes
2 votes
1 answer
1
Manu Thakur asked Sep 26, 2017
1,562 views
This screenshot is token from the book Ullman,How can following be a lexical error? because "elipseSize" should have a token recorded as an identifier.
6 votes
6 votes
1 answer
2
junaid ahmad asked Jan 12, 2018
1,267 views
Is this line a/*b successfully generating the token's or it give lexical error ? if it is given the lexical error then why so ?I think it will give lexical error because...
2 votes
2 votes
5 answers
4
Mizuki asked Nov 11, 2018
1,834 views
What it the number of tokens in the following line?printf("%d numbers.", &x);