0 votes 0 votes abhishekmehta4u asked Sep 10, 2018 abhishekmehta4u 338 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Shaik Masthan commented Sep 10, 2018 reply Follow Share i didn't get any lexical error. 0 votes 0 votes Mizuki commented Sep 10, 2018 reply Follow Share Lexical analyzer can identify tokens with the help of regular expressions and pattern rules.But a lexical analyzer cannot check the syntax of a given sentence due to the limitations of the regular expressions. Regular expressions cannot check balancing tokens, such as parenthesis. Therefore, this phase uses context-free grammar (CFG), which is recognized by push-down automata. 2 votes 2 votes Ashwani Kumar 2 commented Sep 10, 2018 reply Follow Share Lexical error came when lexical analyzer is not able to generate the tokens for the identifiers present in code. Here there is only a syntax error present which is identified in syntax analyzer phase. Tokens will be generated for the whole code 0 votes 0 votes Please log in or register to add a comment.