Metre v2.2 now available (Paul Long)
Sat, 11 Mar 1995 20:12:22 GMT

          From comp.compilers

Related articles
Metre v2.2 now available (1995-03-11)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Paul Long)
Keywords: C, parse, available, FTP, tools
Organization: Oregon Telcom
Date: Sat, 11 Mar 1995 20:12:22 GMT

                              A N N O U N C E M E N T O F M E T R E v 2 . 2

Metre is a freely-distributable ANSI/ISO Standard C parser whos behavior is
determined by a set of rules. Sets are provided for a metrics tool and a
call-tree tool. Written in Standard C, lex, and yacc, it is source-code
portable across operating systems, Standard C compilers, and the various
flavors of lex and yacc. The documentation includes man pages.

Availability - Metre v2.2 is now available for anonymous FTP from the
comp.compilers archive,, and from CompuServe
in the Software Engineering library [5] of the CASE forum as The
C-metrics home page,, has an
older version of Metre. I do not know when the maintainer will make the new
version available.

Building Tools - Compile the two parser files and one of the rules files with
a Standard C compiler and then link their objects together. UNIX and MS-DOS
makefiles are included. I provide the parser files that were generated by MKS
lex/yacc, but if you want to modify the parser and have a lex/yacc, you can
regenerate them. Rules files are provided for a tool that prints call trees,
Mtree, and a metrics tool, which is called Metre ("Metre" is the name of the
entire package and the metrics tool--it is overloaded). You can modify these
rules or write your own.

Metre Metrics Tool - Reports the minimum, maximum, average, and total of the
following metrics at the function, module, and project level. Metre also
warns about dubious programming practices, such as using the goto statement.
This and other behavior can be easily changed, however, by modifying the
rules to reflect your own concept of what good programming is.

      McCabe's cyclomatic complexity and Myers' extended complexity
      Halstead's length, vocabulary, volume, level, effort, intelligence
            programming time, and language level
      Number of source, code, comment, and blank lines
      Number of executable, declaration, and preprocessor statements
      Backfired function points
      Maximum control depth
      Identifier count and length
      Number of functions and modules

Mtree Call-Tree Tool - Mtree prints a call graph as an annotated, indented
tree of function names. From the command line, you can name the root
function, suppress tree lines, select alternate line characters, specify
indention and width of file-name margin, and specify whether to print the
table of contents and whether to ignore library calls.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.