answersLogoWhite

0


Best Answer

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
This answer is:
User Avatar
More answers
User Avatar

AnswerBot

βˆ™ 7mo ago

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.

This answer is:
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
Related questions

What is the difference between a semantic field and a lexical field?

Semantic field is the meaning behind the words like 'oxygen' and 'catalyst' would have a semantic field of science and lexical field is just....the words i think....


What is lexical and semantic errors?

cars was


What is the grammatical difference between scientia and scientifica?

There is no grammatical difference between two nouns. If they have different meaning, then there is a lexical difference.


What are the Classification of tokens in lexical analysis?

the classification of token


Compare with lexical analysis and syntax analysis?

Lexical analysis involves breaking down the input into tokens, identifying keywords and operators, and removing whitespace and comments. Syntax analysis checks the structure of the tokens to ensure they conform to the grammar rules of the language. In summary, lexical analysis focuses on individual elements, while syntax analysis focuses on how these elements combine to form meaningful expressions.


What is difference between Lex and Yacc?

lex is lexical analyser whereas yacc is a parser generator


What has the author Anna Shymkiw written?

Anna Shymkiw has written: 'A study of the tendencies in the lexical semantic system of bilingual Canadian Ukrainians'


What is the word that links or relates to another word in the sentence?

The word you are looking for is "concordance" or "lexical relation." These terms refer to the relationship between words in a sentence based on their semantic or grammatical connections.


What is the difference between lexical and grammatical words?

Lexical words are nouns, verbs, adjectives, adverbs. Grammatical words are determiners, pronouns, auxiliaries and modals, prepositions, conjunctions. That's all I remember.


What has the author Cliff Goddard written?

Cliff Goddard has written: 'Pitjantjatjara/Yankunytjatjara Picture Dictionary' 'The Languages of East and Southeast Asia' 'Pitjantjatjara/Yankunytjatjara to English dictionary' -- subject(s): Dictionaries, English, Yankunytjatjara language, Pitjantjatjara language 'Aboriginal Bird Names' 'Semantic and Lexical Universals' 'Pitjantjatjara/Yankunytjatjara to English Dictiona' 'Semantic analysis' -- subject(s): Semantics, English language


What is the need for separating analysis phase into lexical analysis and parsing?

Separating the analysis phase into lexical analysis and parsing helps to break down the process of interpreting the structure of a source code into more manageable steps. Lexical analysis focuses on breaking the input into tokens, which are the smallest meaningful units, while parsing constructs a parse tree or syntax tree to represent the grammatical structure of the code. This separation allows for easier maintenance, testing, and implementation of new features in the compiler or interpreter.


What is lexical retrieval?

Lexical retrieval refers to the process of accessing and retrieving words from memory during language production. It involves selecting the appropriate words to express our thoughts and ideas. This process can be influenced by various factors such as word frequency, semantic relationships, and cognitive demands.