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

How swapping increase overheads of the operating systems, Does swapping inc...

Does swapping increase the Operating Systems' overheads? Justify your answer. A process can be swapped out temporarily of memory to a backing store and after that brought back

How client and server use same protocol port at same time, Can both client ...

Can both client and server use the same protocol port on the same computer at the same time? Explain. Client and server can't use similar port number on similar computer at ide

What do understand by the granularity of a parallel system, What do underst...

What do understand by the granularity of a parallel system ? Granularity refers to the quantity of computation complete in parallel relative to the size of the entire program. I

Manipulating logical expressions, Digital circuits also manipulate logicale...

Digital circuits also manipulate logicalexpressione.g. IF account is in credit THEN allow phoneto make calls.So a digital circuit must determine if somethingis TRUE or FALSE. Norma

Word puzzle, You are required to make a class of WordPuzzle, which is basic...

You are required to make a class of WordPuzzle, which is basically a game of finding words inside a 2d-array of characters. The class needs to take rows and columns as arguments an

Variable or compound expression - unification algorithm, Variable or compou...

Variable or compound expression - Unification algorithm: Here some things to note regarding this method are:  (i) There if really trying to match a constant to a different

Instruction cycle-flynn’s classification, Instruction Cycle The instruc...

Instruction Cycle The instruction cycle consists of a series of steps needed for the implementation of an instruction in a program. A typical instruction in a program is descri

Engineering and managerial economics, write a short note on good blend of e...

write a short note on good blend of engineering and managerial economics

In java system.out is an object of which type, In Java System.out is an obj...

In Java System.out is an object of type? In Java System.out is an object of form Print Stream.

Safety argument for good design, So far we have considered the problems of ...

So far we have considered the problems of poor ID in terms of the loss of productivity and efficiency to business. There is another important aspect to consider: the issue of safet

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