Grammars Quality

Assessing the Quality of Context-Free Grammars and Attribute Grammars

The GQE - Grammar Quality Evaluator tool is an attribute grammar compiler(processor) written in Java, and generated by ANTLR.

This system come to give support to an automatic grammar quality assessment, by performing automatic evaliuation of a large set of metrics.

The tool reads any ANTLR Grammar(any grammar written in ANTLR meta-language) and outputs the value for each one of the metrics. Then reasoning about the value of each metric over the grammars quality factors, an quality assessment Report is exposed, regarding the input grammar file (*.g4 file)


Innovative Set of Grammar Metrics

Size, Style and Lexicographic metrics are considered.

While and after validating the grammar correct format, a brand new set of grammar metrics are evaluated: size, style(form) and unique lexicographic metrics.


Grammar Quality Evaluator System

System is presented through a standalone tool.

All the results are displayed through a simple, beautiful and intuitive interface. This include the evaluated metrics values, some important elements presented in the grammar, such as Terminals, Non-Terminals or Attributes, and the Graphs regarding the syntatic and semantic complexity.


About this project

Here we present some of the features of GQE

Automatic Metrics Evaluation

All calculations are automatic and efficient.

Type of comments metric

Check if the existence of lexer rules for block, line or meta-info comments.

Clear Identifiers

Check if the identifiers used for grammar symbols are clear and expand to the most probable concept name.

Visual Elements

Some grammar elements are displayed for the User, allowing a more concise vision about what happens in the grammar.

Quality Reports

Provide quality reports over the grammar. In the future will also provide reports over the language generated by that grammar.

Future Work

The idea is to create a knowledge-base of grammars quality to improve the reports results specificity. Also implement a mechanism to improve automatically the quality of the input grammar.

Interact with Us

If you have any question or suggestion, please contact us!