General purpose macroprocessor

A general-purpose macro processor or general purpose preprocessor is a macro processor that is not tied to or integrated with a particular language or piece of software.

A macro processor is a program that copies a stream of text from one place to another, making a systematic set of replacements as it does so. Macro processors are often embedded in other programs, such as assemblers and compilers. Sometimes they are standalone programs that can be used to process any kind of text.

Macro processors have been used for language expansion (defining new language constructs that can be expressed in terms of existing language components), for systematic text replacements that require decision making, and for text reformatting (e.g. conditional extraction of material from an HTML file).

Examples of general purpose macro processors

Name Year Description
GPM 1960s One of the earliest macro processors was GPM (the General Purpose Macrogenerator).[1] This was developed at the University of Cambridge, UK, in the mid 1960s, under the direction of Christopher Strachey.
ML/I 1960s One particularly important general purpose macro processor was (and still is) ML/I (Macro Language One). This was developed as part of PhD research by a Cambridge postgraduate, Peter J. Brown. ML/I operates on a character stream, and requires no special format for its input, nor any special flag characters to introduce macros.
STAGE2 1960s A contemporary of ML/I was STAGE2,[2] part of William Waite's Mobile Programming System. This too is a general purpose macro processor, but it processes input a line at a time, matching each line against specified patterns.
TTM 1968 TTM is a recursive, interpretive language designed primarily for string manipulation, text editing, macro definition and expansion, and other applications generally classified as systems programming. It was developed in 1968 by Steven Caine and E. Kent Gordon at the California Institute of Technology. It is derived, primarily, from GAP[3] and GPM.[1]
GMP 1970s Another attempt was the GMP (General Macro Processor) developed in the mid-1970s by M Boule in the DLB/GC department of the CII Company along ideas from R.J. Chevance. Tested in association with the Bordeaux I University the first version ran the SIRIS8/IRIS80 System. It was ported to mini6 systems and was the main component involved in the system generation for this family of computers. The GMP processor used C2-Chomsky grammars to define the syntax of macros and used and imperative language to execute computations and proceed to macro expansion.
gema 1995 EBNF description.
GPP 1996 Prolog-like scripts are definable).
pyexpander 2011 Turing complete.
XPOP XPOP was another attempt at a general macro processing language by Mark Halpern at IBM in the 1960s.
M4 m4 was designed for Unix by Brian Kernighan and Dennis Ritchie.
minimac Forth language).
SNOBOL 1960s SNOBOL is a string processing language which is capable of doing most of the pre-processing which can be done by a macro processor.
ELENA Software: Practice and Experience, Vol. 14, pp. 519–531, Jun. 1984

See also

References

External links

  • ML/I web site
  • Gema homepage
  • GPP's homepage
  • minimac's page on freshmeat.net
  • pyexpander's homepage
  • minimac's page on freshmeat.net
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.