Making an NFA from a grammar

meson@cyber.net.pk (compiler)
2 Aug 2001 02:31:55 -0400

          From comp.compilers

Related articles
Making an NFA from a grammar meson@cyber.net.pk (2001-08-02)
Re: Making an NFA from a grammar martijn@shop.com (Martijn de Vries) (2001-08-15)
Re: Making an NFA from a grammar joachim_d@gmx.de (Joachim Durchholz) (2001-08-17)
Re: Making an NFA from a grammar vannoord@let.rug.nl (2001-08-18)
| List of all articles for this month |

From: meson@cyber.net.pk (compiler)
Newsgroups: comp.compilers
Date: 2 Aug 2001 02:31:55 -0400
Organization: http://groups.google.com/
Keywords: lex
Posted-Date: 02 Aug 2001 02:31:54 EDT

In Sec 4.3 of Compilers Principles, Techniques, and Tools, the authors
give an algorithm for converting an NFA into a grammar that generates
the same language as recognized by the NFA. Is there any algorithm,
which when given a grammar, converts it back to an NFA, IFF the
grammar represents a regular language. I know it is easy for grammars
of the sort A -> a B since this is the kind of grammar which the above
mentioned algorithm generates, but is there an algorithm that does
this for the general case? Where the grammar productions might not be
in the for A -> a B but the grammar represents a regular language?


Post a followup to this message

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