|
IMP was a systems programming language developed by Ned Irons in the late 1960s through early 1970s. Unlike most other systems programming languages, IMP was an extensible syntax programming language. Even though its designer refers to the language as "being based on ALGOL", IMP excludes many defining features of that language, while supporting a very non-ALGOL-like one: syntax extensibility. A compiler for IMP existed as early as 1965 and was used for programming the CDC 6600 time-sharing system, which was in use at the Institute for Defense Analyses since 1967. Although the compiler is slower than comparable ones for non-extensible languages, it has been used for practical production work. IMP compilers were developed for the CDC-6600, PDP-10 and PDP-11 computers. Important IMP versions were IMP65, IMP70, and IMP72. IMP is unrelated to the Edinburgh IMP programming language. Extensible syntax in IMP72Being an extensible syntax programming language, IMP allows the programmer to extend its syntax, although no specific means are provided to add new datatypes or structures to it. To achieve its syntax-extensibility, IMP uses a powerful parse algorithm based on a syntax graph and several connectivity matrices. The programmer may add new BNF productions to the graph. IMP72's syntax is extended by means of extended-BNF syntax statements included in a source program. The mechanism is so powerful, that it allowed the implementation of the language by itself, i.e., by an IMP72 source file consisting entirely of syntax statements, which was input to a trivial compiler which was initially able to translate the simplest case of the syntax statement. There is also a simple form of the syntax statement which looks like a macro to the casual user. Basically, the syntax statement is an augmented BNF production with associated semantics added on the right: <class> ::= syntax-part ::= semantic-part For example, to add the construct described by the following BNF: <EXP> ::= INCREMENT <VBL> with the semantics that <EXP> ::= INCREMENT <VBL,A> ::= "A←A+1" The semantic-part can also contain calls to semantic routines, as in the following syntax statement: <ATOM> ::= ABS ( <ATOM,A> ) ::= DEWOP(214B,AREG1(1,13),A) The semantic part of this statement consists of a call on the semantic routine See also
References
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net