IMP (programming language): Difference between revisions

Content deleted Content added
Seedbot (talk | contribs)
Moving category per CFD , replaced: Category:Historical programming languages → Category:Programming languages
m Robot-assisted disambiguation (you can help!): Macro
Line 12:
Being an [[:Category:Extensible syntax programming languages|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 [[Backus–Naur form|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 [[macroMacro (programmingcomputer science)|macro]] to the casual user.
 
Basically, the syntax statement is an augmented BNF production with associated semantics added on the right: