- Structure editor
A structure editor, also structured editor, is any document editor that is cognizant of the document’s underlying
structure . Structure editors can be used to edit hierarchical or marked uptext ,computer programs ,diagrams ,chemical formula s, and any other type of content with clear and well-defined structure. In contrast, atext editor is any document editor used for editing plaintext files .Typically, the benefits of text and structure editing are combined in the
user interface of a single hybrid tool. For example,Emacs is fundamentally a text editor, but supports the manipulation of words, sentences, and paragraphs as structures that are inferred from the text. Conversely,Dreamweaver is fundamentally a structure editor for marked up web documents, but supports the display and manipulation of rawHTML text as well. Similarly, molecule editors typically support both graphical and textual input. Structure editing predominates when content is graphical and textual representations are awkward, e.g.,CAD systems andPowerPoint . Text editing predominates when content is largely devoid of structure, e.g., text fields in web forms.WYSIWYG word processing systems such as Word, which appear to edit formatted text directly, are essentially structure editors for the underlying marked-up text.In linguistics,
syntax is the study of the structure of grammatical utterances, and accordingly syntax-directed editor is a synonym for structure editor. Language-based editor and language-sensitive editor are also synonyms. A language-based editor’s features may be implemented by ad hoc code or by aformal grammar . For example, language sensitivity in Emacs is implemented in theLisp definition of the edit mode for the given language. In contrast, language sensitivity in anXML editor is driven by a formal DTD schema for the given language.Structure editing has often been employed in
source code editor s. Eachprogramming language typically has a well-defined syntax given by acontext-free grammar , and accordingly the meaningful structural elements insource code written in the language correspond to the grammaticalphrases in the text. Early syntax-directed source code editors includedInterlisp-D (forLisp ’s limited syntax) and Emilycite conference | first = Wilfred J. | last = Hansen | title = User engineering principles for interactive systems | booktitle = Proceedings of the Fall Joint Computer Conference FJCC 39 | pages = 5623-532 | publisher = AFIPS | date = 1971] (forPL/I ’s rich syntax).A syntax-directed editor may treat grammar rules as generative (e.g., offering the user templates that correspond to one or more steps in a formal derivation of program text) or proscriptive (e.g., preventing a phrase of a given part of speech from being moved to a context where another part of speech is required) or analytic (e.g., parsing textual edits to create a structured representation). Structure editing features in source code editors make it harder to write programs with invalid syntax. Language-sensitive editors may impose syntactic correctness as an absolute requirement (e.g., as did Mentorcite conference | first = V. | last = Donzeau Gouge | coauthors = Huet, G., Kahn, G., and Lang, B. | title = Programming environments based on structured editors: The Mentor experience | booktitle =
INRIA Research report no. 26 | date = July, 1980] ), or may toleratesyntax error s after issuing a warning (e.g., as did the Cornell Program Synthesizercite journal |last = Teitelbaum | first = T. | coauthors = T. Reps | title = The Cornell Program Synthesizer: A syntax-directed programming environment | journal = Communications of the ACM | volume = 24 | issue = 9 | date = September, 1981 | pages=563–573 | doi = 10.1145/358746.358755] ).Some syntax-directed editors monitor compliance with the context-sensitive constraints of a language such as type correctness. Such static-semantic constraints may be specified imperatively by actions (e.g., as in Gandalfcite journal | last = Habermann | first = A. Nico | coauthors = Notkin, David | title = Gandalf: Software Development Environments | journal =IEEE Trans. Software Eng. 12 | volume = 12 | issue = 12 | pages =1117–1127 | date = 1986] cite book | last = Medina Mora | first = Raul | title = Syntax-directed editing--towards integrating programming environments | publisher = Carnegie Mellon University (PhD Dissertation) | date = 1982 | location = Pittsburgh, PA ] cite book | last = Kaiser | first = Gail Elaine | title = Semantics for structure editing environments | publisher = Carnegie Mellon University (PhD Dissertation) | date = 1985 | location = Pittsburgh, PA ] ), or declaratively by an
attribute grammar (e.g., as in the Synthesizer Generatorcite book | last = Reps | first = T. | title = Generating Language-Based Environments | publisher = The M.I.T. Press | date = 1984 | location = Cambridge, MA | id= (Awarded the 1983 ACM Doctoral Dissertation Award.)] cite book | last = Reps, Thomas W., and Teitelbaum, Tim | title = The Synthesizer Generator: A System for Constructing Language-Based Editors | publisher = Springer-Verlag | date = 1988 | location = Cambridge, MA ] ) or by unification in a many-sorted algebra (e.g., as in PAG cite conference | first = Gregor | last = Snelting | coauthors = Henhapl, Wolfgang | title = Unification in many-sorted algebras as a device for incremental semantic analysis | booktitle = Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages (POPL) | pages = 229-235 | date = 1986 | location = New York, NY | publisher = ACM Press] ) or a logic program (e.g., as in Centaurcite conference | first = P. | last = Borras | coauthors = Clement, D., Despeyrouz, Th., Incerpi, J., Kahn, G., Lang, B., and Pascual, V. | title = CENTAUR: The System | booktitle = "Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (PSDE) | volume = 24 | pages = 14-24 | date = 1989 | location = New York, NY | publisher = ACM Press] and Pancite conference | first = Robert A. | last = Ballance | coauthors = Graham, Susan L. and Van De Vanter, Michael L. | title = Pan language-based editing system for integrated development | booktitle = SDE 4: Proceedings of the fourth ACM SIGSOFT symposium on Software development environments | pages = 77-93 | date = 1990 | location = Irvine, CA | publisher = ACM Press] ), with compliance checked by the underlying editing machinery.It is common for a language sensitive editor to represent a document as a
parse tree with respect to language’s grammar, or as an abstract syntax tree (AST). For example, a DOM tree is essentially an AST with respect to a given DTD. Frequently, the textual view of that underlying tree is generated byprettyprinting the underlying tree. Editors associated withintentional programming cite book | last = Czarnecki, Krzysztof and Eisenecker, Ulrich | title = Generative Programming: Methods, Tools, and Applications, Chapter 11 (Intentional Programming) | publisher = Addison-Wesley | date = June 2000 | location = Reading, MA ] andlanguage oriented programming for general purpose languages anddomain specific languages share many of the features of language-sensitive editors, but aim for greater separation between the underlying representation (theintention ) and the surface representation (text in a programming language).References
External links
* [http://www.patentstorm.us/patents/5911145.html "Hierarchical structure editor for web sites", Samir Arora et al; Patent number: 5911145. Filing date: Jul 29, 1996. Issue date: Jun 8, 1999.]
* [http://www.osenkov.com/diplom Designing, implementing and integrating a structured C# code editor]
* [http://www.guilabs.net Research in structured editors]
* [http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.graPHIGS/doc/phigsund/StructEdit.htm The graPHIGS Programming Interface: Understanding Concepts]
* [http://www.cybertribe.com/mayer/wwweasel/node26.html Structure Editing of HTML]
* [http://mindprod.com/projects/scid.html Source Code in Database]
* [http://martinfowler.com/articles/languageWorkbench.html Martin Fowler: Language Workbenches]
* [http://lavape.sourceforge.net Lava programming language and environment]
* [http://www.onboard.jetbrains.com/is1/articles/04/10/lop Language oriented programming]
* [http://www.aisto.com/Roeder/Paper/SourceCodeDocuments.ppt Source code documents]
* [http://www.programtree.com ProgramTree]
* [http://www.subtextual.org SubText]
* [http://wesnerm.blogs.com/net_undocumented/2004/06/whidbey_may_mis.html Whidbey may miss the next coding revolution]
* [http://wesnerm.blogs.com/net_undocumented/2004/06/graphical_sourc.html Graphical source code editors]
Wikimedia Foundation. 2010.