Misplaced Pages

META II

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

META II is a domain-specific programming language for writing compilers . It was created in 1963–1964 by Dewey Val Schorre at UCLA . META II uses what Schorre called syntax equations . Its operation is simply explained as:

#419580

27-472: Each syntax equation is translated into a recursive subroutine which tests the input string for a particular phrase structure, and deletes it if found. Meta II programs are compiled into an interpreted byte code language. VALGOL and SMALGOL compilers illustrating its capabilities were written in the META II language, VALGOL is a simple algebraic language designed for the purpose of illustrating META II. SMALGOL

54-452: A base from which other META "languages" may be developed. ALGOL 60 ALGOL 60 (short for Algorithmic Language 1960 ) is a member of the ALGOL family of computer programming languages . It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a key advance in the rise of structured programming . ALGOL 60

81-720: A format specification as used in FORTRAN, e.g. A simpler program using an inline format: An even simpler program using the Display statement: An alternative example, using Elliott Algol I/O is as follows. Elliott Algol used different characters for "open-string-quote" and "close-string-quote", represented here by   ‘   and   ’   . Here's a version for the Elliott 803 Algol (A104) The standard Elliott 803 used 5-hole paper tape and thus only had upper case. The code lacked any quote characters so £ (pound sign)

108-414: A naive recursive descent compiler it will also ensure that the associativity of arithmetic operations is correct: With the ability to express a sequence with a loop or right ("tail") recursion, the order of evaluation can be controlled. Syntax rules appear declarative, but are actually made imperative by their semantic specifications. META II outputs assembly code for a stack machine. Evaluating this

135-664: A point of departure from which a user may develop his own META " language ". Many META "languages" followed. Schorre went to work for System Development Corporation where he was a member of the Compiler for Writing and Implementing Compilers (CWIC) project. CWIC's SYNTAX language built on META II adding a backtrack alternative operator positive and negative look ahead operators and programmed token equations. The .OUT and .LABEL operations removed and stack transforming operations :<node> and !<number> added. The GENERATOR language based on LISP 2 processed

162-522: A profound effect on future language development. John Backus developed the Backus normal form method of describing programming languages specifically for ALGOL 58. It was revised and expanded by Peter Naur for ALGOL 60, and at Donald Knuth 's suggestion renamed Backus–Naur form . Peter Naur: "As editor of the ALGOL Bulletin I was drawn into the international discussions of the language and

189-477: A random function passed as actual argument. Call-by-name is known by many compiler designers for the interesting " thunks " that are used to implement it. Donald Knuth devised the " man or boy test " to separate compilers that correctly implemented " recursion and non-local references." This test contains an example of call-by-name. There are 35 such reserved words in the standard Burroughs Large Systems sub-language: There are 71 such restricted identifiers in

216-585: Is an analytical grammar. In the TREE-META document these languages were described as reductive grammars. For example, in BNF, an arithmetic expression may be defined as: BNF rules are today production rules describing how constituent parts may be assembled to form only valid language constructs. A parser does the opposite taking language constructs apart. META II is a stack-based functional parser programming language that includes output directive. In META II,

243-407: Is like using an RPN calculator. In the above .ID and .NUM are built-in token recognizers. * in the .OUT code production references the last token recognized. On recognizing a number with .NUM .OUT('LDL' *) outputs the load literal instruction followed the number. An expression: will generate: META II is the first documented version of a metacompiler , as it compiles to machine code for one of

270-510: Is no portable hello world program in ALGOL. The following program could (and still will) compile and run on an ALGOL implementation for a Unisys A-Series mainframe, and is a straightforward simplification of code taken from The Language Guide at the University of Michigan -Dearborn Computer and Information Science Department Hello world! ALGOL Example Program page. Where * etc. represented

297-449: The '=', term is the first thing that must be tested. If term returns failure expr fails. If successful a term was recognized we then enter the indefinite $ zero or more loop were we first test for a '+' if that fails the alternative '-' is attempted and finally if a '-' were not recognized the loop terminates with expr returning success having recognized a single term. If a '+' or '-' were successful then term would be called. And if successful

SECTION 10

#1732779723420

324-466: The CP/M User Group). The paper included a listing of the description of Meta II, this could in principle be processed manually to yield an interpretable program in virtual machine opcodes; if this ran and produced identical output then the implementation was correct. META II was basically a proof of concept. A base from which to work. META II is not presented as a standard language , but as

351-428: The actual parameters that are passed in are an integer variable and an array that is indexed by that same integer variable. Think of passing a pointer to swap(i, A[i]) in to a function. Now that every time swap is referenced, it's reevaluated. Say i := 1 and A[i] := 2, so every time swap is referenced it'll return the other combination of the values ([1,2], [2,1], [1,2] and so on). A similar situation occurs with

378-412: The bad ones of others. Nevertheless, diligence persisted during the entire period. The chemistry of the 13 was excellent." The language originally did not include recursion . It was inserted into the specification at the last minute, against the wishes of some of the committee. ALGOL 60 inspired many languages that followed it. Tony Hoare remarked: "Here is a language so far ahead of its time that it

405-430: The common call-by-value , and call-by-name . The procedure declaration specified, for each formal parameter, which was to be used: value specified for call-by-value, and omitted for call-by-name. Call-by-name has certain effects in contrast to call-by-reference . For example, without specifying the parameters as value or reference , it is impossible to develop a procedure that will swap the values of two parameters if

432-481: The earliest instances of a virtual machine . The paper itself is a wonderful gem which includes a number of excellent examples, including the bootstrapping of Meta II in itself (all this was done on an 8K (six bit byte) 1401!)."—Alan Kay The original paper is not freely available, but was reprinted in Doctor Dobb's Journal (April 1980). Transcribed source code has at various times been made available (possibly by

459-526: The first languages to seek standardization. ALGOL 60 was used mostly by research computer scientists in the United States and in Europe. Its use in commercial applications was hindered by the absence of standard input/output facilities in its description and the lack of interest in the language by large computer vendors. ALGOL 60 did however become the standard for the publication of algorithms and had

486-582: The loop would repeat. The expr equation can also be expressed using nested grouping as: The code production elements were left out to simplify the example. Due to the limited character set of early computers the character / was used as the alternative, or, operator. The $ , loop operator, is used to match zero or more of something: The above can be expressed in English: An expr is a term followed by zero or more of (plus term or minus term). Schorre describes this as being an aid to efficiency, but unlike

513-402: The order of testing is specified by the equation. META II like other programming languages would overflow its stack attempting left recursion. META II uses a $ (zero or more) sequence operator. The expr parsing equation written in META II is a conditional expression evaluated left to right: Above the expr equation is defined by the expression to the right of the '='. Evaluating left to right from

540-461: The standard Burroughs Large Systems sub-language: and also the names of all the intrinsic functions. Implementations differ in how the text in bold must be written. The word 'INTEGER', including the quotation marks, must be used in some implementations in place of integer , above, thereby designating it as a special keyword. Following is an example of how to produce a table using Elliott 803 ALGOL: Since ALGOL 60 had no I/O facilities, there

567-502: The trees produced by the SYNTAX parsing language. To generate code a call to a generator function was placed in a SYNTAX equation. These languages were developed by members of the L.A. ACM SIGPLAN sub-group on Syntax Directed Compilers. It is notable how Schorre thought of the META II language: The term META "language" with META in capital letters is used to denote any compiler-writing language so developed. Schorre explains META II as

SECTION 20

#1732779723420

594-463: Was a fairly large subset of ALGOL 60 . META II was first written in META I, a hand-compiled version of META II. The history is unclear as to whether META I was a full implementation of META II or a required subset of the META II language required to compile the full META II compiler. In its documentation, META II is described as resembling BNF , which today is explained as a production grammar. META II

621-436: Was intended to be the next generation ALGOL but the ALGOL 68 committee decided on a design that was more complex and advanced rather than a cleaned simplified ALGOL 60. The official ALGOL versions are named after the year they were first published. ALGOL 68 is substantially different from ALGOL 60 and was criticised partially for being so, so that in general "ALGOL" refers to dialects of ALGOL 60. ALGOL 60 – with COBOL – were

648-625: Was not only an improvement on its predecessors but also on nearly all its successors." To date there have been at least 70 augmentations, extensions, derivations and sublanguages of ALGOL 60. The Burroughs dialects included special system programming dialects such as ESPOL and NEWP . ALGOL 60 as officially defined had no I/O facilities; implementations defined their own in ways that were rarely compatible with each other. In contrast, ALGOL 68 offered an extensive library of transput (ALGOL 68 parlance for input/output) facilities. ALGOL 60 provided two evaluation strategies for parameter passing:

675-553: Was one of the first languages implementing function definitions (that could be invoked recursively). ALGOL 60 function definitions could be nested within one another (which was first introduced by any programming language), with lexical scope . It gave rise to many other languages, including CPL , PL/I , Simula , BCPL , B , Pascal , and C . Practically every computer of the era had a systems programming language based on ALGOL 60 concepts. Niklaus Wirth based his own ALGOL W on ALGOL 60 before moving to develop Pascal . Algol-W

702-699: Was selected to be member of the European language design group in November 1959. In this capacity I was the editor of the ALGOL 60 report, produced as the result of the ALGOL 60 meeting in Paris in January 1960." The following people attended the meeting in Paris (from January 11 to 16): Alan Perlis gave a vivid description of the meeting: "The meetings were exhausting, interminable, and exhilarating. One became aggravated when one's good ideas were discarded along with

729-489: Was used for open quote and ? (question mark) for close quote. Special sequences were placed in double quotes (e.g., £L?? produced a new line on the teleprinter). The ICT 1900 series Algol I/O version allowed input from paper tape or punched card. Paper tape 'full' mode allowed lower case. Output was to a line printer. Note use of '(', ')', and %. LEAP is an extension to the ALGOL 60 programming language which provides an associative memory of triples. The three items in

#419580