You are here:
(08 Mar 2010, MartijnSchrage)
To build an editor, we need to provide a number of sheets, two modules =Main= and =Settings=, and a =Proxima.cabal= file and the =Makefile=, which can be copied from any of the example instantiations. The =Main= module does not need to be modified, but in =Settings= we can define the name of the editor, the HTTP port it should use, and a number of other settings. The =src= directory of the instantiation should also contain the =proxima= project directory from Subversion (in the example instantiations, this is done automatically by using the Subversion externals mechanism). The sheets may be created from scratch, but when building an editor, it is probably wise to copy the =declarationForm= instance (which contains four editors), and modify the sheets to get the desired editor. Before attempting to build an editor, it is wise to read the SBLP paper on parsing graphical presentations in Proxima ([[http://www.cs.uu.nl/~martijn/docs/BeyondASCII.pdf][pdf]]), as it explains the different ways of parsing and presenting used in Proxima. The editors document type and behavior is defined with the following: * [[Document type definition]]: A datatype declaration of the document type and the enriched document type. The formalism is similar to a monomorphic Haskell data type, with support for lists. * [[Presentation Sheet]]: An attribute grammar that specifies for each language construct how it is presented. Simple computations, such as section counters, or static checks on the document (e.g. whether a reference is defined or not) can be implemented here as well. * [[Scanner Sheet]]: A set of regular expressions for the tokens in the textual parts of the presentation. * [[Parsing Sheet]]: A module that contains the parsers for each part of the presentation that is presented textually. For most editors, the computations can be specified in the presentation sheet. However, for more complex editors, two extra sheets can be provided to deal with derived structures and values: the [[Evaluation and reduction sheets]]. The evaluation and reduction sheets are plain Haskell, the presentation sheet is an attribute grammar for the [[http://hackage.haskell.org/package/uuagc][uuagc]] system, the parser sheet is written with [[http://hackage.haskell.org/package/uulib][uulib]] parsing combinators, and the scanner uses [[http://hackage.haskell.org/package/alex][Alex]]. ---+++ Documents about Proxima instantiations A small manual that describes what needs to be done to build an editor with Proxima was written by [[Students.JoostVerhoog][Joost Verhoog]] as part of the course [[Esdx.WebHome][Editing Structured Documents and XML]]: [[%ATTACHURL%/ProximaExtensionManual.pdf][Proxima Extension Manual]] (pdf) Other sources of information are the master's thesis of Gerbo Engels ([[%ATTACHURL%/Thesis_Gerbo_Engles.pdf][pdf]]) about building a Haskell editor with Proxima, and a colloquium report by Gideon Smeding ([[%ATTACHURL%/Report_Gideon_Smeding.pdf][pdf]]) that discussed the construction of a slide show editor. -- Main.MartijnSchrage - 25 Feb 2010
ore topic actions
Topic revision: r10 - 08 Mar 2010, MartijnSchrage
Building an editor
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding UUCS?