[Top][All Lists]

[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: Mon, 26 Jun 2006 08:49:53 +0200

On 26 Jun 2006, at 06:03, Richard Stallman wrote:

Second, IDE's are often limited at displaying only one position per
    input source code line.

I don't understand that sentence.

Perhaps things have changed, but the visual debuggers I used only displayed an arrow at the margin of the source code (like the .c files), indicating that the program counter is on that line, but with no further indication where it is within that line. If one would want to step through the code and see where the program counter is in such program code, one would have to break up the source code on several input lines, and recompile, so that the debugger can display it.

Now, with a .y grammar, this would be rather bothersome, as very often, each rule has several grammar symbols per line. So there, one wants, in addition to the arrows at the margin pointing out which rules are in the active state, an arrow within each line, indicating the parser position (as described in the .output file, in the state information).

                            This would be insufficient for displaying a
parsing position in each grammar rule of the .y file, which normally
    has several symbols on the same line. So here, one needs an arrow
    pointing between the grammar symbols of each active rule.

We could surely modify GDB and gdb-ui.el to do that.

It could be that this feature is useful for C/C++ debugging as well. If the debugger is extended (if it does not already have the feature) to be able to display positions within each line as well, I think it is just the question of putting the right information in the debugger file format. In the past, perhaps debugger files would have been viewed as becoming to large, but computer space is nowadays is ample: It seems me one should ideally not have to change the source code, in order to do debugging.

  Hans Aberg

reply via email to

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