help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question


From: Hans Aberg
Subject: Re: question
Date: Sun, 14 Aug 2005 18:35:47 +0200


On 14 Aug 2005, at 06:15, David Ja wrote:

 I
been trying to adapted bison to my own purpose but after a month of trying I can't seem to figure out a way to make it work. All I wanted to do was to
take advantage of bison's parser which generates the DFA,

Bison does not generate a DFA, but uses the LALR(1) algorithm to generate a push-down automaton. Flex does generate a DFA.

which in turn,
allows me to step through the DFA in sequence generating a sample string that fits the grammar input. For example if the grammar is the grammar for
an web address. My program will be able to generate
http://www.abc.org<http://www.abc.org>.

It seems that you attempt to do some kind of pretty-printing, which is the opposite of what tools like Bison and Flex do. A parser translates one computer language to another. So if you feed it with one string, it will produce another (which might be some binary code).

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]