The Gateway to Computer Science Excellence
+3 votes

Which phase of compiler generates stream of atoms?

  1. Syntax Analysis
  2. Lexical Analysis
  3. Code Generation
  4. Code Optimization
in Compiler Design by
recategorized by | 1.7k views

6 Answers

+2 votes
Best answer



edited by
+1 vote
Answer is b) A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams. The parser analyzes the source code (token stream) against the production rules to detect any errors in the code.
So, we'r concerned with the entities not the production or any for that case 'rule'.
0 votes
what is atom in compiler?? and will the answer be B
0 votes
. Syntax analysis generates stream of token

. Lexical analysis is the first phase of compiler also known as scanner .it convert the input program into a sequence of token

So answer is A
0 votes
Ans is B only

Stream of tokens are same as stream of atoms which are generated by Mexican analyser

The output of syntax analysis is parse tree
0 votes

Answer is Lexical Analysis (source)

According to the given source,

Syntax analysis comprises of tokenizing and parsing.

Tokenizing (Lexical Analysis): Creating a stream of "atoms".


Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,519 answers
95,368 users