retagged by
701 views
0 votes
0 votes

Consider the following issues

  1. Simplifies the phases.
  2. Compiler efficiency is improved.
  3. Compiler works faster.
  4. Does not require a stack.

Which is/are true in context of lexical analysis?

pls provide an explanation as well..

retagged by

1 Answer

Best answer
2 votes
2 votes
1. True. By scanning the program and breaking it into tokens, it reduces the work of the parser.

2. True. Lexical Analyser scans through the symbol table in a sequential manner and replaces the identifiers present in the code with their location. This helps the rest of the phases to directly access the required identifier in a random manner and so saves time. Hence, efficiency is improved.

3. True. For the same reason as above, the rest of the phases are able to complete their function in less time. Though during lexical analyser phase, it surely takes the required time.

4. True. Lexical analyser is implemented through a DFA.
selected by

Related questions

2 votes
2 votes
4 answers
1
0 votes
0 votes
1 answer
3
Ebrahim asked Jan 12
175 views
Q1. For the following grammar N - AB | BA A - a | CAC B - b | CBC C - a | b Find the FIRST and FOLLOW
0 votes
0 votes
1 answer
4
Ebrahim asked Dec 18, 2023
283 views
Like Example Above please answer this questionQ5. Implement a+b*(c+d)-e/finto: a). Quadruples.b). Triples.c). Indirect triples.