Transcription of Context-FreeGrammars - Clemson University
{{id}} {{{paragraph}}}
context -Free GrammarsA grammar is a set of rules for putting stringstogether and so corresponds to a of: a set ofvariables(also called nonterminals),one of which is designated the start variable;It is customary to use upper-case letters forvariables; a set ofterminals(from the alphabet); and a list ofproductions(also called rules).Goddard 6a: 2 Example:0n1nHere is a grammar:S 0S1S Sis the only variable. The terminals are two 6a: 3 Using a GrammarA production allows one to take a string con-taining a variable and replace the variable bythe RHS of the terminals isgeneratedby the gram-mar if, starting with the start variable, one canapply productions and end up withw. The se-quence of strings so obtained is focus on a special version of grammars calledacontext-free grammar(CFG).
A context-free grammar (CFG) consists of a set of productions that you use to replace a vari-able by a string of variables and terminals. The language of a grammar is the set of strings it generates. A language is context-free if there is a CFG for it. Goddard 6a: 20
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}