bison-patches
[Top][All Lists]
Advanced

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

Re: Interactive parsing with Bison


From: Hans Aberg
Subject: Re: Interactive parsing with Bison
Date: Thu, 29 Jun 2006 09:14:55 +0200

On 28 Jun 2006, at 20:52, Richard Stallman wrote:

If the GUI outputs a Bison parser, you can then build it under the
control of make.  You could think of this kind of interface as an
alternate editor for .y files.

The kind of GUI that Satya (and I) are thinking of, is the one that
    one drops in some source files into the GUI, and it does the rest,
    computing the dependicies.

I do not understand what "dependencies" refers to in the context of
Bison.  Are we talking about the same thing?

Oh, sorry, it should have been "file dependencies", i.e., how the file modification dates relate among files calling each other. When using 'make', these file dependencies are written down explicitly by giving the filesystem location of the files in the 'make' file, and 'make' then checks the file modification dates, and if a dependent file has been modified, the associated action (like a compile) is initiated.

Now, the IDE's typically allows one to not having to write down these file dependencies explicitly, but merely indicating the source file. The IDE will then scan the source file for constructs such as '#include <filename>", identifying the file with file name 'filename', adding it to the list of file dependencies of the source file, and also doing this recursively in the included file. This way, one only has to drop the source file into the IDE, and the IDE takes care of computing the files it is dependent on, and then also making sure the right compiles are taking place. This is very useful, but should not be viewed as a replacement of the explicit 'make' style, as the latter gives more control.

But 'make' could easily be extended to include such a feature: One needs a way to indicate that the source files should be scanned for file dependencies, the syntax for finding those files, whether the found files should be rescanned, etc.

In the case of a program like Bison, which produces files which should be compiled, such an IDE may have a way to indicate that some types files should be compiled before the others. After the compile, file dependancies must be recomputed. But I think 'make' already' has this capacity.

  Hans Aberg






reply via email to

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