ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
General purpose macro processor - Wikipedia, the free encyclopedia

General purpose macro processor

From Wikipedia, the free encyclopedia

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

In its simplest form, a macro processor is a program that copies a stream of text from one place to another, making some kind of systematic set of replacements as it does so. Macro processors are often embedded in other programs (for example, many assembler programs incorporate a macro processor, and the C language mandates the presence of a preprocessor which incorporates some crude macro processing facilities).

However, macro processors may also be stand alone programs, which means that it is easy to use them for processing any kind of text at all.

General purpose macro processors can be used for many tasks; they have been used for language expansion (defining new language constructs that can be expressed in terms of existing language components), for systematic textual replacements that require some kind of decision making (where a global edit would be insufficient), and for textual reformatting (e.g. conditional extraction of material from an HTML file).

[edit] Examples of general purpose macro processors

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.

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.

A contemporary of ML/I was STAGE2, 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.

gema is a contextual macro processor, which is based on pattern matching. It replaces/enhances the concept of regular expressions by contexts. Contexts roughly corresponds to named sets of patterns. As a consequence, macros in gema closely resemble an EBNF description.

XPOP was another attempt at a general macro processing language by Mark Halpern at IBM in the 60's.

m4 was designed for Unix by Brian Kernighan and Dennis Ritchie.

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 Macro definition

header: a sequence of keywords and parameter markers (%) at least one of the first two tokens in a macro header must be a keyword, not a parameter marker

body: the character & identifies a local label macro time instruction (.SET, .IF .JUMP, .E) macro time variables or labels (.)

[edit] External links

[edit] References

  1. ^ Strachey, Christopher (October 1965). "A General Purpose Macrogenerator". Computer Journal 8 (3): 225–241. doi:10.1093/comjnl/8.3.225. 


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -