Building XML-driven application generators with compiler construction tools

This paper describes how to use conventional compiler construction tools, and parser generators in particular, to build XML driven application generators. In our approach, the document interface is provided by a standard stream-oriented XML processing framework (e.g., SAX or StAX). This framework is used to program a generic, customizable XML scanner that transforms documents into streams of suitable tokens (opening and closing tags, character data, etc.). The next step is to characterize the syntactic structure of these streams in terms of generation-specific context-free grammars. By adding suitable semantic attributes and semantic actions to these grammars, developers obtain generation-oriented translation schemes: high-level specifications of the generation tasks. These specifications are then turned into working application generators by using standard parser generation technology. We illustrate the approach with , an XML-driven generator of shortest-route search applications in subway networks.

[1]  J. Craig Cleaveland,et al.  Building application generators , 1988, IEEE Software.

[2]  Aruna Raja,et al.  Domain Specific Languages , 2010 .

[3]  Keisuke Nakano,et al.  XML stream transformer generation through program composition and dependency analysis , 2005, Sci. Comput. Program..

[4]  Jorge J. Gómez-Sanz,et al.  Requirements Elicitation and Analysis of Multiagent Systems Using Activity Theory , 2009, IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans.

[5]  Baltasar Fernández-Manjón,et al.  From Documents to Applications Using Markup Languages , 2008, IEEE Software.

[6]  Iván Martínez-Ortiz,et al.  A documental approach to adventure game development , 2007, Sci. Comput. Program..

[7]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[8]  Baltasar Fernández-Manjón,et al.  ADDS: A Document-Oriented Approach for Application Development , 2004, J. Univers. Comput. Sci..

[9]  Jyh-Charn Liu,et al.  XML Document Parsing: Operational and Performance Characteristics , 2008, Computer.

[10]  Eric van der Vlist,et al.  Relax NG , 2003 .

[11]  Andrew W. Appel,et al.  Modern Compiler Implementation in Java , 1997 .

[12]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[13]  Keisuke Nakano An Implementation Scheme for XML Transformation Languages Through Derivation of Stream Processors , 2004, APLAS.

[14]  José Luis Sierra,et al.  XML Language-Oriented Processing with XLOP , 2009, 2009 International Conference on Advanced Information Networking and Applications Workshops.

[15]  Toshiro Wakayama,et al.  SIMON: A Grammar-based Transformation System for Structured Documents , 1993, Electron. Publ..

[16]  Stefanie Scherzinger,et al.  Attribute grammars for scalable query processing on XML streams , 2005, The VLDB Journal.

[18]  Justin Edelson,et al.  Java & XML , 2001 .

[19]  José Luis Sierra,et al.  Building an Enhanced Syntax-Directed Processing Environment for XML Documents by Combining StAX and CUP , 2009, 2009 20th International Workshop on Database and Expert Systems Application.

[20]  Daniel Rodriguez-Cerezo,et al.  Implementing attribute grammars using conventional compiler construction tools , 2011, 2011 Federated Conference on Computer Science and Information Systems (FedCSIS).

[21]  Frank Neven,et al.  Attribute grammars for unranked trees as a query language for structured documents , 2005, J. Comput. Syst. Sci..

[22]  J. Craig Cleaveland Program Generators with XML and Java , 2001 .

[23]  Alda Lopes Gançarski,et al.  Attribute grammar-based interactive system to retrieve information from XML documents , 2006, IEE Proc. Softw..

[24]  José Carlos Ramalho Anotação estrutural de documentos e sua semântica : especificação da sintaxe, semântica e estilo para documentos , 2000 .

[25]  Terence Parr The Definitive ANTLR Reference: Building Domain-Specific Languages , 2007 .

[26]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[27]  Baltasar Fernández-Manjón,et al.  A Document-Oriented Paradigm for the Construction of Content-Intensive Applications , 2006, Comput. J..

[28]  Frank Neven,et al.  Extensions of Attribute Grammars for Structured Document Queries , 1999, DBPL.

[29]  Jukka Paakki,et al.  Attribute grammar paradigms—a high-level methodology in language implementation , 1995, CSUR.

[30]  José Luis Sierra,et al.  A Generative Approach to the Construction of Application-Specific XML Processing Components , 2009, 2009 35th Euromicro Conference on Software Engineering and Advanced Applications.

[31]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools (2nd Edition) , 2006 .

[32]  Joe Marini,et al.  Document Object Model , 2002, Encyclopedia of GIS.

[33]  Viswanathan Kodaganallur,et al.  Incorporating language processing into Java applications: a JavaCC tutorial , 2004, IEEE Software.

[34]  Thomas Schwentick,et al.  Automata for XML - A survey , 2007, J. Comput. Syst. Sci..

[35]  José Luis Sierra,et al.  Building a Syntax Directed Processing Environment for XML Documents by Combining SAX and JavaCC , 2008, 2008 19th International Workshop on Database and Expert Systems Applications.