recategorized
4,481 views
2 votes
2 votes

Consider the following statements related to compiler construction:

  1. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata.
  1. Syntax Analysis is specified by regular expressions and implemented by finite-state machine.

Which of the above statement(s) is/are correct?

  1. Only I
  2. Only II
  3. Both I and II
  4. Neither I nor II
recategorized

8 Answers

Best answer
2 votes
2 votes
both statement are wrong becoz lexical analyser uses finite autometa so it uses regular grammer ,whose expression will be for example letter(letter + digit )*  , where as syntax tree uses context free grammer which uses pda
selected by
5 votes
5 votes

option D is ryt bcoz

1) Lexical Analysis is specified by regular expressions and implemented by finite-automata.

http://user.it.uu.se/~kostis/Teaching/KT1-11/Slides/handout03.pdf

for more info go above link

2) Syntax Analysis is specified by context-free grammars and implemented by pushdown automata.

https://www.tutorialspoint.com/compiler_design/compiler_design_syntax_analysis.htm

go for it.

2 votes
2 votes

And undoubtedly answer is option d) Mam. :).. Opposite takes place. Lexical Analysis is implemented by Regular Expressions and implemented by Finite State Machine. 

Syntax Analysis is specified by Context Free Grammar and implemented by Push Down Automata. 

Refer d link below for more information Mam. :)

https://www.tutorialspoint.com/compiler_design/compiler_design_quick_guide.htm

Mam read full length explanation and I hope the descp which is perfeclty given helps you. :)

1 votes
1 votes

Both statement are wrong because lexical analyser uses finite automata so it uses regular grammer.

Syntax Analysis is specified by context-free grammars and implemented by pushdown automata.

Option is D

Answer:

Related questions

3.0k
views
6 answers
0 votes
go_editor asked Mar 24, 2020
3,010 views
Which of the following statement(s) regarding a linker software is/are true ?A function of a linker is to combine several object modules into a single load ... to locations in other modules.Only IOnly IIBoth I and IINeither I nor II
2.3k
views
3 answers
0 votes
go_editor asked Mar 24, 2020
2,285 views
Consider a sequence $F_{00}$ defined as :$F_{00}\left ( 0 \right )= 1, F_{00}\left ( 1 \right )= 1\\$F_{00}\left ( n \right )= \frac{10 * F_{00}\left ( n-1 \ ... ( 1, 2, 55, 110, 600, 1200 \right )$\left ( 1, 55, 110, 600, 1200 \right )$
1.2k
views
4 answers
0 votes
go_editor asked Mar 24, 2020
1,182 views
Match the following : ...
1.0k
views
3 answers
1 votes
go_editor asked Mar 24, 2020
1,043 views
The functions mapping $R$ into $R$ are defined as :$f\left(x \right)=x^{3} - 4x, g\left(x \right)=\frac{1}{x^{2}+1}$ and $h\left(x \right)=x^{4}.$Then find the value of ... $\left [ \left ( x^{3}-4x \right )^{2}+1 \right ]^{-4}$