IMP (programming language): Difference between revisions

Content deleted Content added
Danakil (talk | contribs)
no longer a stub
Danakil (talk | contribs)
fix links
Line 1:
'''IMP''' is a defunct family of [[programming language]]s intended primarily for [[systems programming]], although at least one IMP was extended enough to be a [[general-purpose programming language]]. Expressively, IMP is similar to [[FORTRAN II]], while syntactically it looks more like [[ALGOL (programming language)|ALGOL]], although it lacks [[block structure]], [[reserved keyword]]s, and [[datatype]]s (it does support both integer and floating-point numbers). IMP allows the programmer to embed [[machine language]] instructions into the IMP source code.
 
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. IMP was used to implement the [[EMAS]] [[operating system]].
 
==Extensible syntax==
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.
 
Basically, the syntax statement is an augmented BNF production. For example, to add the construct described by the following BNF: