Differences between revisions 5 and 6
Revision 5 as of 2005-09-01 00:34:21
Size: 697
Editor: yakko
Comment:
Revision 6 as of 2005-09-01 00:34:40
Size: 689
Editor: yakko
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
[[latex2($A \rarrow aBa$)]]
[[latex2($B \rarrow \epsilon$)]]
latex2($A \rarrow aBa$)
latex2($B \rarrow \epsilon$)

Context Free Grammar

Def: For every ContextFreeLanguage there is a ContextFreeGrammar that generates it and a PushDownAutomata that recognizes it.

A context-free grammar is a 4-tuple latex2($(V,\Sigma,R,S)$), where

  1. Element latex2($V$) is a finite set called the variables,

  2. Element latex2($\Sigma$) is a finite set, disjoint from latex2($V$), called the terminals,

  3. Element latex2($R$) is a finite set of rules, with each rule being a variable and a string of variables and terminals, and

  4. Element latex2($S \in V$) is the start variable

An example of a rule is

latex2($A \rarrow aBa$)
latex2($B \rarrow \epsilon$)

ContexFreeGrammar (last edited 2020-01-26 17:53:59 by scot)