![](/common/images/spacer.gif)
![Wolfram Library Archive](/images/database/subheader.gif)
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![Downloads](/images/database/downloads-top.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) Context-Free Grammars
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/grey-line.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif)
Organization: | Case Western Reserve University |
Department: | Department of Mathematics |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/grey-line.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) 0205-456
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/grey-line.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) 1996-11-19
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/grey-line.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) The Mathematica notebook, ContextFreeGrammar.nb, contains a command AcceptQ that takes a context-free grammar and a string as arguments and determines whether the string is generated by the grammar. As a side effect, it prints successively a list of strings that derive to the given string in n steps. It stops and accepts when it finds the start symbol in that list. If it comes up with the empty list, it rejects.
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/grey-line.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif)
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/grey-line.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) context-free grammars, context free grammars, parser, backward exhaustive search, forward breadth first search, derivation tree, formal languages, rewrite
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/images/database/download-cdf-player.gif) |
![](/images/database/grey-line.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif)
| ContextFreeGrammar.nb (9.1 KB) - Mathematica notebook | ![](/common/images/spacer.gif) Files specific to Mathematica 2.2 version:
![](/common/images/spacer.gif) | | ContextFreeGrammar.ma (5.7 KB) - Mathematica notebook |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
|
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
![](/common/images/spacer.gif) |
| | | | ![](/common/images/spacer.gif) | |
|