m3format, pretty printing or checking the indentation of Modula-3 units

This program is useful to check if Modula-3 units adhere to the usual programming conventions (indentation, lower/upper case in identifiers), and as an example of an application traversing every type of node contained in the abstract syntax tree.

It accepts the usual m3tk options for specifying the location of units (modules, interfaces, generic modules...) and the name of units to process. Then, options specific to "m3format" specify the mode of operation, check versus pretty print, and the amount of information to print. The options are the following:

-Tfile
Read the unit location map from "file". Typically the location map generated by m3build, .M3IMPTAB, is used.
file1 file2...
Process the units in the named files. By default the abstract syntax tree content is printed after the semantic analysis.
-format .ext
Pretty print the named files and write the output to file1.ext, file2.ext...
-check
Check if the named files follow the programming conventions (default) even if pretty printing is requested with -format.
-verbose
Print the list of units processed.
-underscore
Do not complain about underscore characters being used in identifiers.

Here is a sample usage executed from within the m3format package on a LINUXELF machine.

LINUXELF/m3format -TLINUXELF/.M3IMPTAB -format .new -check src/Main.m3


Glimpse HTTP Search (In string, use ";" for AND and "," for OR between keywords)

String to search for:
Case sensitive Partial match, Misspellings allowed:
Return only files modified within the last days.
Maximum number of files returned: Maximum number of matches per file returned:
Glimpse and GlimpseHTTP, Copyright © 1996, University of Arizona



Download /m3/pkg/pm3-1.1.11/language/modula3/m3tools/m3tk/tutorial/m3format (6 files, 70795 bytes)

Download format for tar file: compressed uuencoded base64
split into several chunks, Split size: Split part:



Michel Dagenais, 1997. For comments, updates and suggestions michel.dagenais@polymtl.ca