First time here? Checkout the FAQ!
+1 vote


Given answer: D
Please explain

asked in Compiler Design by Boss (5.2k points)   | 532 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 (53 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 (1.1k 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 (483 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

Related questions

0 votes
2 answers
asked in Compiler Design by prasitamukherjee Loyal (3.8k points)   | 340 views
+2 votes
2 answers

Top Users May 2017
  1. akash.dinkar12

    3338 Points

  2. pawan kumarln

    2066 Points

  3. Bikram

    1922 Points

  4. sh!va

    1672 Points

  5. Arjun

    1614 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1174 Points

  8. Angkit

    1056 Points

  9. LeenSharma

    1018 Points

  10. Arunav Khare

    758 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    1008 Points

  2. pawan kumarln

    692 Points

  3. Arnab Bhadra

    632 Points

  4. Arjun

    342 Points

  5. bharti

    328 Points

22,888 questions
29,193 answers
27,691 users