The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+1 vote


Given answer: D
Please explain

asked in Compiler Design by Boss (5.9k points) | 721 views

3 Answers

0 votes
There are two types of regular grammers.

1) regular right linear :  S->aA

2) regular left linear : S->Aa

Both can easily generate regular languages , hence can easily implement lexical  phase.

D is not correct.
answered by (63 points)
0 votes
i think none of the answers are right option a it can be included by finite automata but not by a regular expression (regular expressions is an important notation for specifying a pattern each pattern matches a set of strings so regular expressions serve as names for a set of strings tokens can be described using regular languages )

option b if it can be modeled by ndfa then it can also be modeled by dfa also this statement is wrong

option cif it can be modeled by E-NDFA then it can be modeled by DFA also if it can be modeled by dfe it can be modeled in right linear grammar

option d option a explanation
answered by Active (2.2k points)
–1 vote
Regular expressions, Finite Automata and NFA with e-moves have the same power of lexical analyser. See the equivalance of automata and regular expressions in ullman text.But grammars have higher power than the previous 2 models.Hence D.
answered by Junior (525 points)
I didn't get u r explanation  why did u say option d it can't be modeled using regular expressions in lexical analysis everything is defined in terms of regular expressions  explanation in detail plz

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

28,947 questions
36,793 answers
34,690 users