HELP : Algorithm to generate context free grammar

Nitin Shah <lnustoc.cztmb9@eds.com>
26 Feb 1996 10:42:40 -0500

          From comp.compilers

Related articles
HELP : Algorithm to generate context free grammar lnustoc.cztmb9@eds.com (Nitin Shah) (1996-02-26)
Re: HELP : Algorithm to generate context free grammar torbenm@diku.dk (1996-02-27)
Re: HELP : Algorithm to generate context free grammar chrisbr@cogsci.ed.ac.uk (1996-02-27)
| List of all articles for this month |

From: Nitin Shah <lnustoc.cztmb9@eds.com>
Newsgroups: comp.theory,comp.compilers
Date: 26 Feb 1996 10:42:40 -0500
Organization: Manufacturing Service Center
Distribution: inet
Keywords: parse, question, comment

I am looking for an algorithm that will generate context-free grammar
from given set of strings.


For example,
Given a language set L = {aaabbbbb,aab}.


One of the grammar is


G -> AB
A -> aA|a
B -> b|bB


So, I am looking for an algorithm that takes set of strings of the
language as input and gives its context-free grammar.


Thanks
--
Nitin Shah
EDS Manufacturing Service Center
lnustoc.cztmb9@eds.com
[It's easy enough to generage a CFG for any finite set of strings, by
enumerating them, but I doubt that's what you want. I've seen some
efforts to guess a grammar from examples of valid strings, but they
don't seem to have been very successful. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.