edited by
20,343 views
55 55 votes

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?

  1. Finite state automata
  2. Deterministic pushdown automata
  3. Non-deterministic pushdown automata
  4. Turing machine

5 Answers

Best answer
80 80 votes

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.

edited by
5 5 votes
During Lexical analysis,the tokens are recognized by FA.So a FA is necessary and sufficient
0 0 votes
IN lexical phase we use dfa

soo dfa = finite automata
Answer:
Position:
Show:

Related questions

58 58 votes
4 answers 4 answers
22.3k
22.3k views
go_editor asked Sep 29, 2014
22,342 views
In a compiler, keywords of a language are recognized duringparsing of the programthe code generationthe lexical analysis of the programdataflow analysis
74 74 votes
4 answers 4 answers
24.1k
24.1k views
go_editor asked Sep 29, 2014
24,109 views
On a non-pipelined sequential processor, a program segment, which is the part of the interrupt service routine, is given to transfer $500$ bytes from an I/O device to mem...
47 47 votes
2 answers 2 answers
16.4k
16.4k views
akash asked Oct 29, 2014
16,437 views
Let $P$ be a regular language and $Q$ be a context-free language such that $Q \subseteq P$. (For example, let $P$ be the language represented by the regular expression $p...
23 23 votes
2 answers 2 answers
8.5k
8.5k views
go_editor asked Sep 29, 2014
8,458 views
Choose the most appropriate word(s) from the options given below to complete the following sentence.I contemplated _________ Singapore for my vacation but decided against...