The Gateway to Computer Science Excellence
+3 votes
1.5k views

Which phase of compiler generates stream of atoms?

  1. Syntax Analysis
  2. Lexical Analysis
  3. Code Generation
  4. Code Optimization
in Compiler Design by Veteran (105k points)
recategorized by | 1.5k views

6 Answers

+1 vote
Best answer

Answer-->B

 

by (259 points)
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'.
by (455 points)
0 votes
by Boss (48.8k points)
+2
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
by Junior (643 points)
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
by (59 points)
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".

by (53 points)

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
50,647 questions
56,491 answers
195,436 comments
100,669 users