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

14y ago
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
Continue Learning about Psychology

What is the lexical approach?

This shouldn't be accepted without looking around a little bit more, but from what I know, the lexical approach is typically applied in psychology as a way of studying the way humans format language and communicate. The basic idea is that humans store language information in clusters called "lexical chunks." These chunks are phrases with words that are very commonly found together. The word "odor," for example, is defined as the description of a smell, but people typically associate it with a negative smell. That is because odor is usually found in lexical chunks like foul odor, strong odor, disgusting odor, or rank odor. These are all associations that people make when they hear the word "odor." Another example of a lexical chunk is the term "figment of (pronoun) imagination." People rarely use the word figment except in reference to that lexical chunk. This should be cited because I took the figment example from a site I looked at a week ago: http://www.teachingenglish.org.uk/think/methodology/lexical_approach1.shtml


Is an IQ score of 172 high for a twelve year old?

Ideally, the IQ score is independent of the subject's age. 172 is a totally unbelievable IQ score for anybody; before it is accepted as fact, the test should probably be repeated. +++ Even if the figure was a misprint for 127, that would still be a high IQ BUT it is important to remember IQ is not everything. Standard IQ tests tend to be limited to testing skills with various numerical, lexical and pattern puzzles; and are not a reliable guide to the subject's learning ability or future academic results.


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 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.


1. What are three reasons why syntax analyzers are based on grammars?

Simplicity-Techniques for lexical analysis are less complex than those required for syntax analysis, so the lexical-analysis process can be sim- pler if it is separate. Also, removing the low-level details of lexical analy- sis from the syntax analyzer makes the syntax analyzer both smaller and less complex.Efficiency-Although it pays to optimize the lexical analyzer, because lexical analysis requires a significant portion of total compilation time, it is not fruitful to optimize the syntax analyzer. Separation facilitates this selective optimization.Portability-Because the lexical analyzer reads input program files and often includes buffering of that input, it is somewhat platform dependent. However, the syntax analyzer can be platform independent. It is always good to isolate machine-dependent parts of any software system.