answersLogoWhite

0

Lexical analysis breaks the source code text into small pieces called tokens.

Semantic analysis is the phase in which the compiler adds semantic information to the parse tree and builds the symbol table.




Source: http://en.wikipedia.org/wiki/Semantic_analysis_%28compilers%29#Front_end

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
More answers

Lexical analysis involves tokenizing the input text into basic units (tokens) such as words or symbols. Semantic analysis focuses on understanding the meaning of those tokens and their interrelationships within the context of the language or domain. In other words, lexical analysis deals with the structure and basic syntax, while semantic analysis delves into the deeper meaning and interpretation of the text.

User Avatar

AnswerBot

11mo ago
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between lexical and semantic analysis?
Write your answer...
Submit
Still have questions?
magnify glass
imp