GATE CSE
First time here? Checkout the FAQ!
x
+5 votes
448 views

The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?

(A) Finite state automata

(B) Deterministic pushdown automata

(C) Non-deterministic pushdown automata

(D) Turing machine

asked in Compiler Design by Veteran (73.3k points)  
edited | 448 views

2 Answers

+12 votes
Best answer
Answer - A

In compiler lexical analyzer categorizes character sequence into lexemes and produces tokens as output for parser. And tokens are expressed in regular expressions so a simple Finite Automata is sufficient for it.
answered by Boss (8.9k points)  
selected by
+1 vote
During Lexical analysis,the tokens are recognized by FA.So a FA is necessary and sufficient
answered by Boss (5.7k points)  
Top Users Jan 2017
  1. Debashish Deka

    7906 Points

  2. Habibkhan

    4736 Points

  3. Vijay Thakur

    4474 Points

  4. sudsho

    4318 Points

  5. saurabh rai

    4200 Points

  6. Arjun

    3638 Points

  7. Bikram

    3500 Points

  8. santhoshdevulapally

    3480 Points

  9. GateSet

    3228 Points

  10. Sushant Gokhale

    3116 Points

Monthly Topper: Rs. 500 gift card

18,944 questions
23,897 answers
52,119 comments
20,213 users