Repleo: a syntax-safe template engine

  • Authors:
  • Jeroen Arnoldus;Jeanot Bijpost;Mark van den Brand

  • Affiliations:
  • Hogeschool van Amsterdam, Amsterdam, Netherlands;Mattic B. V., Almere, Netherlands;Eindhoven University of Technology, Eindhoven, Netherlands

  • Venue:
  • GPCE '07 Proceedings of the 6th international conference on Generative programming and component engineering
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Templates are a very common solution to generate code. They are used for different tasks like rendering webpages, creating Java Beans and so on. Most template systems have no notion of the object language and just generate text. The drawback of this approach is the possibility to generate syntactical incorrect code. This can lead to all kinds of annoying errors. In this paper we present an approach for a syntax safe template engine. Syntax safety guarantees that the generated code can be correctly parsed. To ensure this we use the object language grammar to evaluate the template.