Re: User-oriented BNF "walker"?

"Rodney M. Bates" <rodney.bates@wichita.edu>
11 Feb 2003 01:44:35 -0500

          From comp.compilers

Related articles
User-oriented BNF "walker"? Chuck.Lutz@telelogic.com (Chuck Lutz) (2003-01-17)
Re: User-oriented BNF "walker"? joachim_d@gmx.de (Joachim Durchholz) (2003-01-20)
Re: User-oriented BNF "walker"? andreas.gieriet@externsoft.ch (Andreas Gieriet) (2003-01-21)
Re: User-oriented BNF "walker"? andreas.gieriet@externsoft.ch (Andreas Gieriet) (2003-01-21)
Re: User-oriented BNF "walker"? anw@maths.nott.ac.uk (2003-02-06)
Re: User-oriented BNF "walker"? rodney.bates@wichita.edu (Rodney M. Bates) (2003-02-11)
| List of all articles for this month |
From: "Rodney M. Bates" <rodney.bates@wichita.edu>
Newsgroups: comp.compilers
Date: 11 Feb 2003 01:44:35 -0500
Organization: EarthLink Inc. -- http://www.EarthLink.net
References: 03-01-089 03-01-099 03-02-016
Keywords: parse, tools
Posted-Date: 11 Feb 2003 01:44:35 EST

"Dr A. N. Walker" wrote:
>> 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.


FWIW, one of my projects (actually, it's been a long tangent to
another project) is an editor that keeps something AST-like
internally, but presents a text-editor style user interface.
Fragments that are syntactically correct can be view, through a
suitable interface, as an AST. The rest is embedded in there too, but
can be ignored by partial analysis code. It's complicated, but it's
starting to work on many cases. See:




          "Text Editing, Syntax-Directed Editing", with R. Bagai,
          International Conference on Advances in Infrastructure
          for Electronic Business, Science, and Education on the
          Internet, L'Aquila Italy, Aug. 2001.


          "Text Editor Interfaces for Semantic Editors", SBLP2002,
          VI Simposio Brasileiro do Linguagens de Programmacao,
          Rio de Janeiro, Brazil, June 2002.


--
Rodney M. Bates


Post a followup to this message

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