Department of Computer Science
EXTRA INFORMATION FOR PROF. PETER BROWN

The ML/I macro processor

ML/I was created as part of my PhD thesis in 1967. It was developed a bit during the succeeding years (e.g. it has been converted to run under Unix), but essentially it has maintained its original 1967 form. Bob Eager, my colleague when I was at the University of Kent, played a major part in this development, and in keeping ML/I alive all these years.

ML/I's age is obvious from its syntax and some of its documentation. However many people are still using it, and I still get requests for it. I think its main use is for doing systematic changes on text files. In ML/I you define a pattern (macro) saying what is to be replaced, and define the repacement in terms of what matches the patter. Of course other tools can do this too, e.g. Awk, Perl, etc., but ML/I has advantages in some applications:

  • it works in tokens, not individual characters; thus if you want to match READ, you do not get a match with DREADED or READER.
  • it automatically deals with nesting; thus if you are patching a pattern starting with a left bracket and closing withe a right bracket, it automatically matches the brackets correctly in nested situations.
  • it is not line based, and can deal with multi-line patterns -- indeed a newline token can be part of a pattern.

The following materials are available:

Recently my colleague at the University of Kent, Bob Eager, has created a really excellent and comprehensive web site for ML/I.

Peter Brown