Explain their characteristics and limitations of grammar, Computer Engineering

Assignment Help:

Identify the different classes of grammar. Explain their characteristics and limitations.

As proposed through Noam Chomsky that Chomsky hierarchy contains the subsequent levels:

  • Type-0 grammars (unrestricted grammars) contain all formal grammars. They produce exactly all languages which can be recognized by a Turing machine. The language which is recognized by a Turing machine is termed as all the strings on which this halts. These languages are also termed as the recursively enumerable languages.
  • Type-1 grammars (context-sensitive grammars) produce the context- sensitive languages. These grammars include rules of the form αAβ → αγβ along with A a non terminal and α, β and γ strings of terminals and non-terminals. All strings α and β may be empty, but γ should be nonempty. The rule S → ε is permitted if S does not show on the right side of any rule. The languages described through these grammars are exactly all languages which can be recognized through a non-deterministic
  • Type-2 grammars (context-free grammars) make the context-free languages. These are defined through rules of the form A → γ along with A a non terminal and γ a string of terminals and non-terminals. Such languages are exactly all languages which can be recognized through a non-deterministic push-down automation. Context free languages are the theoretical basis for the syntax of main programming languages.
  • Type-3 grammars (regular grammars) produce the regular languages. A grammar restricts its rules to a single non-terminal on the left-hand side and a right-hand side having a single terminal, possibly followed through a single non terminal. Also the rule S → ε is here allowed if S does not show on the right side of any rule. Such languages are exactly all languages that can be decided through a finite state automaton. Moreover, this family of formal languages can be acquired by regular expressions. Regular languages are usually used to explain search patterns and the lexical structure of programming languages.

Related Discussions:- Explain their characteristics and limitations of grammar

JAVA, HOW WAS JAVA INVENTED?

HOW WAS JAVA INVENTED?

Write short note on digital audio segments, Problem: a) Authoring tools...

Problem: a) Authoring tools consist of two basic features. First, an authoring facility for creating and editing, and second, a presentation vehicle for delivery. The authorin

recycling from e-waste to resources , Make at least 6 web pages with good ...

Make at least 6 web pages with good formatting, color balance and presentation on any one of the following topics:- 1.    Recycling from E-waste to resources 2.    Light and So

Determine a ring counter that consisting of five flip-flops, A ring counter...

A ring counter consisting of five Flip-Flops will have ? Ans. A ring counter have 5 states while consisting of Five Flip-Flops.

Interpolation search, Interpolation Search The next task is to implemen...

Interpolation Search The next task is to implement a variable size decrease-and-conquer solution to search. See Levitin [2007] pp 190 for a detailed description of the interpol

How many bits must be decoded for 128 × 8 ram chips, How many bits must be ...

How many bits must be decoded for chip select? What is the size of decoder when 128 × 8 RAM chips are required to provide a memory capacity of 2048 bytes? Ans. All higher order l

Gui status in a program from the object browser, Can we create a gui status...

Can we create a gui status in a program from the object browser? Yes.  You can make a GUI STATUS in a program using SET PF-STATUS.

Interrupt and scanning method of keypad operation, INTERRUPT METHOD - USING...

INTERRUPT METHOD - USING PORTB CHANGE INTERRUPT By using 4 by 4 matrix keypad connected to PORTA and PORTB. The rows are connected to PORTA-Low (RA1-RA4) and the columns are co

How do you save data in bdc tables, How do you save data in BDC tables? ...

How do you save data in BDC tables? The data in BDC tables is saved by using the field name 'BDC_OKCODE' and field value of '/11'.

Virtual memory and organization of a cache memory, Described virtual memory...

Described virtual memory Ans: Data is to be stored in physical memory locations that have addresses different from those that specified by the program. The memory control circu

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd