Content deleted Content added
fix links |
No edit summary |
||
Line 3:
IMP is [[expression-oriented (programming)|expression-oriented]]: there is no distinction between common expressions and [[statement (programming)|statement]]s, even though sometimes an expression is only needed for its [[side-effect(programming)|]]s. For example, a read statement's value indicates whether and [[EOL]] (end-of-line) or an [[EOF]] (end-of-file) was encountered, although what's typically used is the expression's side effect of performing input.
IMP compilers were developed for the [[CDC-6600]], [[PDP-10]] and [[PDP-11]] computers. Important IMP versions were IMP65, IMP70, and IMP72. IMP was used to implement the [[EMAS]] [[operating system]].
==Extensible syntax in IMP72==
Being an [[:Category:Extensible syntax programming languages|extensible syntax programming language]], IMP it 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 (programming)|macro]] to the casual user.
Basically, the syntax statement is an augmented BNF production. For example, to add the construct described by the following BNF:
Line 16 ⟶ 18:
<EXP> ::= INCREMENT <VBL,A> ::= "A←A+1"
==References==
* ''Syntax Extension and the IMP72 Programming Language'', Walter Bilofsky, Yale University, SIGPLAN Notices, May 1974.
[[Category:Historical programming languages]]
[[Category:Extensible
[[Category:Systems programming languages]]
|