First time here? Checkout the FAQ!
+1 vote


Given answer: D
Please explain

asked in Compiler Design by Boss (5.3k points)   | 591 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.9k 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
3 answers
asked in Compiler Design by prasitamukherjee Loyal (3.8k points)   | 409 views
+2 votes
2 answers

Top Users Jul 2017
  1. Bikram

    3782 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1832 Points

  4. joshi_nitish

    1494 Points

  5. Arnab Bhadra

    1096 Points

  6. Arjun

    1054 Points

  7. Hemant Parihar

    1050 Points

  8. Shubhanshu

    972 Points

  9. Ahwan

    876 Points

  10. akash.dinkar12

    642 Points

23,953 questions
30,895 answers
29,272 users