This project rises as the result of the work deveploped during a Master Thesis in Software Engineering, focused in the Language/Grammar Engineering field of study, accomplished at Universidade do Minho in Braga, Portugal. Initial the proposal was to develop an Attribute Grammar based System to assess Grammars Quality.
Grammar Engineering is a field in Software Engineering that involves the application of well studied software techniques to grammars, just as they are applied on another software product. The development, maintenance and implementation of grammars could lead to better results in terms of eficiency and quality. It is an uprising subject in software development and it is a common practice in today's software companies. Unfortunately for those which depend on grammars, the engineering method behind is not yet implemented on its full potential.
Being able to evaluate the quality of grammars in Grammar Engineering is very important, as it is in all software fields. This allows us to verify the grammar's behaviour regarding the purpose that it was designed to. On the other hand, it serves as an indicator to compare differents grammars. Quality can be assessed by the quantification of a subset of software metrics relying on static analysis. In most author's opinion, quantification is a powerful and essential tool. With it we can understand and control the grammar evolution which will improve some aspects such as performance and reliability.
Measuring metrics is an old and well used habit in software systems for all those you cares about it maintenance because is related to the quality of the source code system. This effort has been short when applied to the maintenance of grammar-based software applications. Just few authors mentioned software metrics to evaluate grammars, so it is motivating to select and implement a set of metrics to be possible to assess and discuss grammars quality.
You cannot control what you cannot measure. DeMarco, 1982
Another motivating issue, is the relation that exists between a Grammar and the Language that is defined by that Grammar. From the results obtained by evaluating the quality of a grammar, we can reason and take some elations about the quality of the language that is defined by that grammar. Now we can look at grammars not only as a tool that defines a language and its processing, but also as a tool for its evaluation.