|
From: | Hans Aberg |
Subject: | Re: Interactive parsing with Bison |
Date: | Sun, 25 Jun 2006 14:10:15 +0200 |
On 23 Jun 2006, at 16:20, Satya wrote:
I am considering the possibility of building a free IDE for Bison
A few years ago, I made plugins (DLL's) of Bison and Flex for a commercial IDE (CodeWarrior for MAC OS 9). It was not difficult to make these plugins and get them work, but I encountered the following problems:
* Bison, at least then, leaked memory, and when run as a DLL, the memory was not released, as when run as a program. So, after a couple of runs, memory of the IDE (which was fixed for programs under Mac OS 9) ran out. An IDE would have to cope with this problem - the simplest would be to run Bison and Flex not as DLL's, but as programs.
* The IDE was not smart enough to compute the file dependencies, so although one could set the .y and .l files to compile before the C/C+ + source code files, the IDE would not recompute file dependencies after Bison and Flex had been run, causing the output C/C++ parser/ lexer that these produce to not be compiled.
* I wanted to go ahead to put Bison/Flex info into the debugger, but then it turned out that the format was proprietary. So finding a public such debugging format seems to be an important issue.
with at least the following abilities : 1. Single step through a test input file and obtain a trace (like the one produced by a %debug directive. But now it will break after each step and wait for user input) 2. Alter input before proceeding to the next step.3. Set breakpoints in the input and parse until break point is reached.4. Watch the stack, current state, look-aheads at each state.
Otherwise, I think that these thing might not be so difficult to achieve with an already existing IDE, as it already can do such equivalents for ordinary programming language source code. - Though one must try, to find out.
Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |