- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain about left linear regular grammar in TOC
Regular grammar describes a regular language. It consists of four components, which are as follows −
G = (N, E, P, S)
Where,
N − finite set of non-terminal symbols,
E − a finite set of terminal symbols,
P − a set of production rules, each of one is in the forms
S → aB
S → a
S → ∈,
S ∈ N is the start symbol.
The above grammar can be of two forms −
Right Linear Regular Grammar
Left Linear Regular Grammar
Linear Grammar
When the right side of the Grammar part has only one terminal then it's linear else nonv linear.
Left linear grammar
In a left-regular grammar (also called left-linear grammar), the rules are of the form as given below −
L → a, {L is a non-terminal in N and a is a terminal in Σ}
L → Ma, {L and M are in N and a is in Σ}
L → ∈, {∈ is the empty string}.
The left linear grammar means that the non-terminal symbol will be at the left side.
Example
Consider a language {bnabma| n>=2, m>=2}
The left linear grammar that is generated based on given language is −
S → Bbba ⇒ last 3 symbols bba B → Bb| Dbba ⇒ for bm and bba are for bn followed by a. D → Db|e ⇒ for bn-2
- Related Articles
- Explain about right linear regular grammars in TOC
- Explain about regular expressions in TOC?
- How to convert FA to Left Linear Grammar in TOC?
- Explain Type-0 grammar in TOC
- Explain Type-1 grammar in TOC
- How to convert right linear grammar to left linear grammar?
- How to convert left linear grammar to right linear grammar?
- Explain the concept of grammar in TOC
- Explain Operator grammar and precedence parser in TOC
- Explain the relationship between grammar and language in TOC
- Explain the simplification of context free grammar in TOC
- Explain Type-2 and Type-3 Grammar in TOC?
- How to convert FA to Right Linear Regular Grammar?
- Explain the different operations on Regular language in TOC.
- What is unambiguous grammar in TOC?
