1,537 views
2 votes
2 votes

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.

1 Answer

1 votes
1 votes
Compiler is all about impementation.

If an automata is already defined for your statement, then it will be counted as a valid token ,Otherwise it will show lexical error.

Here, mis-spelling of keywords or identifier means error while identifying lexemes(longest common sequence).

Related questions

2 votes
2 votes
4 answers
1
7 votes
7 votes
4 answers
2
itsvkp1 asked Nov 1, 2017
3,205 views
if there is miss spelling in some keyword in a program then this misspelled keyword will be treated as lexical errors or it will be treated as a new identifier and accept...
6 votes
6 votes
1 answer
3
junaid ahmad asked Jan 12, 2018
1,234 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...