Re: User-oriented BNF "walker"? (Dr A. N. Walker)
6 Feb 2003 00:02:02 -0500

          From comp.compilers

Related articles
User-oriented BNF "walker"? (Chuck Lutz) (2003-01-17)
Re: User-oriented BNF "walker"? (Joachim Durchholz) (2003-01-20)
Re: User-oriented BNF "walker"? (Andreas Gieriet) (2003-01-21)
Re: User-oriented BNF "walker"? (Andreas Gieriet) (2003-01-21)
Re: User-oriented BNF "walker"? (2003-02-06)
Re: User-oriented BNF "walker"? (Rodney M. Bates) (2003-02-11)
| List of all articles for this month |

From: (Dr A. N. Walker)
Newsgroups: comp.compilers
Date: 6 Feb 2003 00:02:02 -0500
Organization: School of Mathematical Sciences, Nottingham University, UK.
References: 03-01-089 03-01-099
Keywords: parse, tools
Posted-Date: 06 Feb 2003 00:02:02 EST

Joachim Durchholz <> wrote:
>If I'm correctly informed, what failed were syntax-directed editors.
>From my perspective, the failure was because a lot of programming
>activity is restructuring code and moving code snippets across the
>boundaries of constructs, and in a syntax-directed editor, you have
>navigate into and out of constructs where a text editor lets you move
>the code just a handful of lines up or down.

We designed and [briefly] used some of our own here, based on
a "tree editor". In ours, at least, restructuring and snippet-moving
were fine, but it took us a long time to produce decent syntaxes to
direct. If you're trying to produce "x := 1", then the last thing you
want to do as a program writer is to have to go through "statement ::=
assignation, assignation ::= expression ':=' expression, expression
::= factor", terms. primaries, blah, down to identifiers and
constants, you want "statement ::= identifier ':=' constant". It
doesn't matter if the syntax is highly ambiguous, as it's directed
rather than parsed. But you do want to be able to parse strings [as
the moderator almost noted], and you also want to be able to re-parse
[eg from "id ':=' const' to "expr ':=' expr" and back] in order for
the snippet-moving to work smoothly.

>[I used some of the 1970s syntax directed editors which were indeed
>awful. [...] -John]

Right. One problem then, of course, was that getting screens
to draw and re-draw menus and select among them using only keyboards
and "glass teletypes" was rather painful. It's just possible that
some of them might work better now, and even reclaim some territory
from "Visual Basic/C/...".

Andy Walker, School of MathSci., Univ. of Nott'm, UK.
[ Redrawing was fine. The problem was that the edits you want to make
rarely map well onto changes in the syntax tree, e.g. changing (a+b)*c*d
into (a+b*c)*d by tree mutations is vastly harder than moving a paren in
the source code. -John]

Post a followup to this message

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