Experience of XML-Based Source Code Representation with Parsing Actions

  • Authors:
  • Kazuaki Maeda

  • Affiliations:
  • Department of Business Administration and Information Science, Chubu University, Japan

  • Venue:
  • Proceedings of the 2007 conference on New Trends in Software Methodologies, Tools and Techniques: Proceedings of the sixth SoMeT_07
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes PALEX, a new source code representation in XML which contains parsing actions and lexical formatting information. Once a compiler finishes analyzing source code, it can record a list of parsing actions (shift, reduce and reading a token) during a compiling process. PALEX contains the recorded parsing actions and also lexical formatting information, white spaces and comments. It has two features as a source code representation in XML. The first is that it is independent of programming languages. The second is that the original source code can be restored from the PALEX code. For a prototype implementation, the Java compiler GCJ was modified. Syntax rules and lexical definitions are prepared for development of software tools which read the PALEX code and play back the parsing actions. An experiment was designed and the result shows that the size of the generated PALEX code is very large. However, the XML-based source code representation together with parsing actions offsets the cost of the large storage space.