codemodels

codemodels is a library to represent and manipulate homogeneously Abstract Syntax Trees of different languages models.

It is based on RGen and RGen-Ext.

There are different gems which transform source code in models of the code. Currently they are:

DSLs based on EMF are planned to by supported using emf_jruby.

Codemodels can be used to perform analysis on different languages.

Features

It handles also the case in which different languages are hosted in the same file (for example a Javascript script inside an HTML page).

Most of the parsers permit also to associate each node with a precise point in the source code, so thath they could be used to implement layout-preserving refactoring.