Posts

Showing posts from August, 2025

TOC-UNIT III

Image
TOC   Unit-III Context free grammar (CFG) Definitions and Examples, Unions Concatenations And Kleene’s of Context free language, Regular Grammar for Regular Language, Derivations and Ambiguity , Unambiguous CFG and Algebraic Expressions, Backus Naur Form (BNF), Normal Form– CNF. 3.1)Context-Free Grammar (CFG) Definitions and Examples CFG stands for context-free grammar. It is is a formal grammar which is used to generate all possible patterns of strings in a given formal language. Context-free grammar G can be defined by four tuples as: G = (V, T, P, S)   Where, G  is the grammar, which consists of a set of the production rule. It is used to generate the string of a language. T  is the final set of a terminal symbol. It is denoted by lower case letters. V  is the final set of a non-terminal symbol. It is denoted by capital letters. P  is a set of production rules, which is used for replacing non-terminals sy...