Simple syntax

Benefit


Syntax designed for Acceleo is the result of many years of experience in code generation field. This syntax was created with the following goals in mind :

  • To be simple and natural
  • To be short and easy-to-learn
  • To be close to developers / architects habits
  • To be dedicated to code generation from models
  • To be strict and well formated
  • To be open and extensible

Number of keywords was reduced to the minimum in order to get a generation tool as transparent as possible and to focus on targetted code and metamodel browsing.

How does it work ?


A model is a data tree : each element is nested in a higher element. This particular charactistic is used by Acceleo to make transparent the complexity of tree navigation. Then, all complex cases of model tree browsing vanish :

  • automatic list management
  • automatic null or empty elements management
  • automatic dynamic associations management

Syntax provides simple control elements such as conditional statements, loops, imports declaration, ...

Use case


Example of simple template using Acceleo syntax

syntaxe
Webdesign : www.katrinet.com - Realisation : Obeo