- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is type 3 grammar? Explain its properties
Type 3 grammars are regular grammars that describe regular / formal languages.
These grammars contain production rules consisting of the following −
Only one non-terminal at the left hand side,
The right hand side has a single terminal and may or may not be followed by non terminals.
A → ε , A → a, A → b, A → aA etc.
There are two types of regular grammars namely −
Right linear / Right regular grammar
Left linear / Left regular grammar
Let us learn about these two types of grammar in detail.
Right linear grammar
This is a regular grammar with the production rules of the form
A → α (or) A → α B
Where, A, B → non terminal symbols α → terminal symbol
These grammars are right-branching in nature, since the substitution is done for the right most non terminal, if available.
Left linear grammar
This is a regular grammar with the production rules of the form −
A → α (or) A → B α
Where, A and B are non terminals and α is a terminal symbol.
Since the substitution is done for the leftmost non-terminal, these grammars are left branching in nature.
Properties of Regular grammars
The regular grammars generates regular languages which are closed under the following −
- Explain type 2 grammar with properties
- Explain Type-2 and Type-3 Grammar in TOC?
- Explain Type-0 grammar in TOC
- Explain Type-1 grammar in TOC
- What is context free grammar? Explain with examples
- What is MySQL Cursor? What are its main properties?
- What is RDBMS? Explain its major functions
- What is OLAP? Explain its advantages and disadvantages
- What is Ambiguous Grammar?
- What do you mean by a transaction in MySQL? Explain along with its properties?
- What is Context-sensitive Grammar?
- What is Context-Free Grammar?
- What is definition of business finance and explain its types?