Source code metrics help to evaluate the quality of the code, for example, to detect the most complex parts of the program. When writing a system which calculates metrics, especially when it has to support multiple source code languages, the biggest problem which arises is the creation of parsers for each supported language. In this paper we suggest an unusual Open Source solution, that avoids creating such parsers from scratch. We suggest and explain how to use parsers contained in the Eclipse IDE as parsers that support contemporary language features, are actively maintained, can recover from errors, and provide not just the abstract syntax tree, but the whole type information of the source program. The findings described in this paper provide to practitioners a way to use Open Source parsers without the need to deal with parser generators, or to write a parser from scratch.

How to calculate software metrics for multiple languages using Open Source parsers / Janes A; Piatov D; Sillitti A; Succi G. - STAMPA. - (2013), pp. 264-270. (Intervento presentato al convegno Open Source Software: Quality Verification: 9th IFIP WG 2.13 International Conference, OSS 2013 tenutosi a Koper-Capodistria, Slovenia nel June) [10.1007/978-3-642-38928-3_20].

How to calculate software metrics for multiple languages using Open Source parsers

Succi G
2013

Abstract

Source code metrics help to evaluate the quality of the code, for example, to detect the most complex parts of the program. When writing a system which calculates metrics, especially when it has to support multiple source code languages, the biggest problem which arises is the creation of parsers for each supported language. In this paper we suggest an unusual Open Source solution, that avoids creating such parsers from scratch. We suggest and explain how to use parsers contained in the Eclipse IDE as parsers that support contemporary language features, are actively maintained, can recover from errors, and provide not just the abstract syntax tree, but the whole type information of the source program. The findings described in this paper provide to practitioners a way to use Open Source parsers without the need to deal with parser generators, or to write a parser from scratch.
2013
IFIP International Conference on Open Source Systems
264
270
How to calculate software metrics for multiple languages using Open Source parsers / Janes A; Piatov D; Sillitti A; Succi G. - STAMPA. - (2013), pp. 264-270. (Intervento presentato al convegno Open Source Software: Quality Verification: 9th IFIP WG 2.13 International Conference, OSS 2013 tenutosi a Koper-Capodistria, Slovenia nel June) [10.1007/978-3-642-38928-3_20].
Janes A; Piatov D; Sillitti A; Succi G
File in questo prodotto:
Eventuali allegati, non sono esposti

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/907136
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 10
  • ???jsp.display-item.citation.isi??? ND
social impact