• edited by
20,649 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
81 81 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.5k
22.5k views
go_editor asked Sep 29, 2014
22,499 views
In a compiler, keywords of a language are recognized duringparsing of the programthe code generationthe lexical analysis of the programdataflow analysis
75 75 votes
4 answers 4 answers
24.6k
24.6k views
go_editor asked Sep 29, 2014
24,637 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...
49 49 votes
2 answers 2 answers
16.9k
16.9k views
akash asked Oct 29, 2014
16,850 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.6k
8.6k views
go_editor asked Sep 29, 2014
8,619 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...