Meta II by Val Schorre

10 Mar 2016

This is an elaboration (analysis, close reading) of a particular paper, “META II: A syntax-oriented compiler writing language”.

The section “Syntax Notation” references the notation used in the ALGOL 60 report, and very briefly introduces these concepts:

  1. Symbols in the target language.
  2. Metalinguistic variables.
  3. Concatenation.
  4. Alternation.
  5. Syntax equations.

At this point it gives an example of a syntax equation:

LOGICALVALUE = '.TRUE' / '.FALSE' .,

It then introduces .EMPTY and explains that it can be used to indicate that a syntactic element is optional. Then it gives another example:

SUBSECONDARY = '*' PRIMARY / .EMPTY .,
SECONDARY = PRIMARY SUBSECONDARY .,

And third example described as equivalent:

SECONDARY = PRIMARY('*' PRIMARY / .EMPTY) .,

It introduces three more basic symbols:

  1. Identifiers – represented by .ID,
  2. Strings – represented by .STRING,
  3. Numbers – represented by .NUMBER

Then describes a very simple language, of algebraic expressions, and gives a few examples:

  1. A
  2. A + B
  3. A + B * C
  4. (A + B) * C

Then it gives an example of the set of syntax equations which define that language:

EX3 = .ID / '(' EX1 ')' .,
EX2 = EX3 ('*' EX2 / .EMPTY) .,
EX1 = EX2 ('+' EX1 / .EMPTY) .,

There is an explanation of how these expressions are to be “read”: “An expression of order 3 is defined as an identifier or an open parentheses followed by an expression of order 1 followed by a closed parentheses. An expression of order 2 is defined as an expression of order 3, which may be followed by a star which is followed by an expression of order 2. An expression of order 1 is defined as an expression of order 2, which may be followed by a plus which is followed by an expression of order 1.”

At the end of this section, Val Shorre introduces a special operator for sequences, and illustrates it with two examples.

A sequence of the letter A:

SEQA = $ 'A' .,

The equations given previously rewritten using the sequence operator:

EX3 = .ID / '(' EX1 ')' .,
EX2 = EX3 $ ('*' EX3) .,
EX1 = EX2 $ ('+' EX2) .,

The section “Output” expands the syntax notation from simply a description of languages, to include output commands, output commands for an interpreter.

To produce output, we write .OUT and then surround the information to be written out with parentheses. A string is used for literal output, and an asterisk is used to output the special symbol just found in the input.

Then there is an example:

EX3 = .ID .OUT('LD ' *) / '(' EX1 ')' .,
EX2 = EX3 $ ('*' EX3 .OUT('MLT')) .,
EX1 = EX2 $ ('+' EX2 .OUT('AND')) .,

The last three META II constructs introduced are .LABEL, *1 and *2.

.LABEL is used to “cause output in the label field”, and there is an example given:

.ID .LABEL *

There is an explanation of *1 and *2, but I don’t completely understand it. A typical example is given, however.

IFSTATEMENT = '.IF' EXP '.THEN' .OUT('BFP' *1)
    STATEMENT '.ELSE' .OUT('B ' *2) .LABEL *1
    STATEMENT .LABEL *2 .,

The section “VALGOL I - A Simple Compiler Written in META II” contains four examples:

Figure 1 is described as “The VALGOL I compiler written in META II”.

.SYNTAX PROGRAM

PRIMARY = .ID .OUT('LD ' *) /
    .NUMBER .OUT('LDL' *) /
    '(' EXP ')' .,

TERM = PRIMARY $('*' PRIMARY .OUT('MLT') ) .,

EXP1 = TERM $('+' TERM .OUT('ADD') /
    '-' TERM .OUT('SUB') ) .,

EXP = EXP1 ( '.=' EXP1 .OUT('EQU') / .EMPTY) .,

ASSIGNST = EXP '=' .ID .OUT('ST ' *) .,

UNTILST = '.UNTIL' .LABEL *1 EXP '.DO' .OUT('BTP' *2)
    ST .OUT('B  ' *1) .LABEL *2 .,

CONTITIONALST = '.IF' EXP '.THEN' .OUT('BFP' *1)
    ST '.ELSE' .OUT('B  ' *2) .LABEL *1
    ST .LABEL *2 .,

IOST = 'EDIT' '(' EXP ',' .STRING
    .OUT('EDT' *) ')' /
    'PRINT' .OUT('PNT') .,

IDSEQ1 = .ID .LABEL * .OUT('BLK 1') .,

IDSEQ = IDSEQ1 $(',' IDSEQ1) .,

DEC = '.REAL' .OUT('B  ' *1) IDSEQ .LABEL *1 .,

BLOCK = 'BEGIN' (DEC '.,' / .EMPTY)
    ST $('.,' ST) '.END' .,

ST = IOST / ASSIGNST / UNTILST /
    CONDITIONALST / BLOCK .,

PROGRAM = BLOCK .OUT('HLT')
    .OUT('SP  1') .OUT('END') .,

.END

Figure 2 is described as “order list of the VALGOL I machine”.

? ?? ???
LD AAA LOAD PUT THE CONTENTS OF THE ADDRESS AAA ON TOP OF THE STACK.
LDL NUMBER LOAD LITERAL PUT THE GIVEN NUMBER ON TOP OF THE STACK.
ST AAA STORE STORE THE NUMBER WHICH IS ON TOP OF THE STACK INTO THE ADDRESS AAA AND POP UP THE STACK.
ADD ADD REPLACE THE TWO NUMBERS WHICH ARE ON TOP OF THE STACK WITH THEIR SUM.
SUB SUBTRACT SUBTRACT THE NUMBER WHICH IS ON TOP OF THE STACK FROM THE NUMBER WHICH IS NEXT TO THE TOP, THEN REPLACE THEM BY THIS DIFFERENCE.
MLT MULTIPLY REPLACE THE TWO NUMBERS WHICH ARE ON TOP OF THE STACK WITH THEIR PRODUCT.
EQU EQUAL COMPARE THE TWO NUMBERS ON TOP OF THE STACK. REPLACE THEM BY THE INTEGER 1, IF THEY ARE EQUAL, oR BY THE INTEGER 0, IF THEY ARE UNEQUAL.
B AAA BRANCH BRANCH TO THE ADDRESS AAA.
BFP AAA BRANCH FALSE AND POP BRANCH TO THE ADDRESS AAA IF THE TOP TERM IN THE STACK IS THE INTEGER 0. OTHERWISE, CONTINUE IN SEQUENCE. IN EITHER CASE, POP UP THE STACK.
BTP AAA BRANCH TRUE AND POP BRANCH TO THE ADDRESS AAA IF THE TOP TERM IN THE STACK IS NOT THE INTEGER 0. OTHERWISE, CONTINUE IN SEQUENCE. IN EITHER CASE, POP UP THE STACK.
EDT STRING EDIT ROUND THE NUMBER WHICH IS ON TOP OF THE STACK TO THE NEAREST INTEGER N. MOVE THE GIVEN STRING INTO THE PRINT AREA SO THAT ITS FIRST CHARACTER FALLS ON PRINT POSITION N. IN CASE THIS WOULD CAUSE CHARACTERS TO FALL OUTSIDE THE PRINT AREA, NO MOVEMENT TAKES PLACE.
PNT PRINT PRINT A LINE, THEN SPACE AND CLEAR THE PRINT AREA.
HLT HALT HALT
SP N SPACE N = 1–9. CONSTANT CODE PRODUCING N BLANK SPACES.
BLK NNN BLOCK PRODUCES A BLOCK OF NNN EIGHT CHARACTER WORDS.
END END DENOTES THE END OF THE PROGRAM.

Figure 3 is described as “a program as compiled for the valgol I machine”.

.BEGIN
.REAL X ., 0 = X .,
        B A1
    X
        BLK 001
    A01
        LDL0
        ST X
.UNTIL X .= 3 .DO .BEGIN
    A02
        LD X
        LDL 3
        EQU
        BTP A03
    EDIT( X*X * 10 + 1, '*' ., PRINT ., X + 0.1 = X
        LD X
        LD X
        MLT
        LDL 10
        MLT
        LDL 1
        ADD
        EDT 01'*'
        PNT
        LD X
        LDL 0.1
        ADD
        ST X
    .END
        B A02
    A03
.END
        HLT
        SP 1
        END

Figure 4 is described as “output from the VALGOL I program given in figure 3”. It consists of a rough parabola of asterisks.

There is a lot more description of VALGOL I (omitted).

Possibly there is a subtype of argument, where an anticipated objection is addressed: “The omission of statement labels from the VALGOL I and VALGOL II seems strange to most programmers. This was done because…”

There is a little argument, that within the definition of statement, the test of an IOST mecessarily precedes that for an ASSIGNST.

  1. Suppose the test for IOST did not precede the test for ASSIGNST.
  2. Then the words PRINT and EDIT would be mistaken as identifiers.
  3. The compiler would try to translate input/output statements as if they were assignment statements.

The section “How the META II Compiler Was Written” consists primarily of description, but there might also be another kind of thing, a narration or a story.

The paper gives an example (or definition?) in Figure 6 “the order list of the META II machine”.

? ?? ???
TST STRING TEST AFTER DELETING INITIAL BLANKS IN THE INPUT STRING, COMPARE IT TO THE STRING GIVEN AS ARGUMENT. IF THE COMPARISON IS MET, DELETE THE MATCHED PORTION FROM THE INPUT AND SET SWITCH. IF NOT MET, RESET SWITCH.
ID IDENTIFIER AFTER DELETING INITIAL BLANKS IN THE INPUT STRING, TEST IF IT BEGINS WITH AN IDENTIFIER, IE., A LETTER FOLLOWED BY A SEQUENCE OF LETTERS AND/OR DIGITS. IF SO, DELETE THE IDENTIFIER AND SET SWITCH. IF NOT, RESET SWITCH.
NUM NUMBER AFTER DELETING INITIAL BLANKS IN THE INPUT STRING, TEST IF IT BEGINS WITH A NUMBER. A NUMBER IS A STRING OF DIGITS WHICH MAY CONTAIN IMBEDED PERIODS, BUT MAY NOT BEGIN OR END WITH A PERIOD. MOREOVER, NO TWO PERIODS MAY BE NEXT TO ONE ANOTHER. IF A NUMBER IS FOUND, DELETE IT AND SET SWITCH. IF NOT, RESET SWITCH.
SR STRING AFTER DELETING INITIAL BLANKS IN THE INPUT STRING, TEST IF IT BEGINS WITH A STRING, IE. A SINGLE QUOTE FOLLOWED BY A SEQUENCE OF ANY CHARACTERS OTHER THAN SINGLE QUOTE FOLLOWED BY ANOTHER SINGLE QUOTE. IF A STRING IS FOUND, DELETE IT AND SET SWITCH. IF NOT, RESET SWITCH.
CLL AAA CALL ENTER THE SUBROUTINE BEGINNING IN LOCATION AAA. IF THE TOP TWO TERMS OF THE STACK ARE BLANK, PUSH THE STACK DOWN BY ONE CELL. OTHERWISE, PUSH IT DOWN BY THREE CELLS. SET A FLAG IN THE STACK TO INDICATE WHETHER IT HAS BEEN PUSHED BY ONE OR THREE CELLS. THIS FLAG AND THE EXIT ADDRESS GO INTO THE THIRD CELL. CLEAR THE TOP TWO CELLS TO BLANKS TO INDICATE THAT THEY CAN ACCEPT ADDRESSES WHICH MAY BE GENERATED WITHIN THE SUBROUTINE.
R RETURN RETURN TO THE EXIT ADDRESS. POPPING UP THE STACK BY ONE OR THREE CELLS ACCORDING TO THE FLAG. IF THE STACK IS POPPED BY ONLY ONE CELL< THEN CLEAR THE TOP TWO CELLS TO BLANKS, BECAUSE THEY WERE BLANK WHEN THE SUBROUTINE WAS ENTERED.
SET SET SET BRANCH SWITCH ON.
B AAA BRANCH BRANCH UNCONDITIONALLY TO LOCATION AAA.
BT AAA BRANCH IF TRUE BRANCH TO LOCATION AAA IF SWITCH IS ON. OTHERWISE, CONTINUE IN SEQUENCE.
BF AAA BRANCH IF FALSE BRANCH TO LOCATION AAA IF SWITCH IS OFF. OTHERWISE, CONTINUE IN SEQUENCE.
CL STRING COPY LITERAL OUTPUT THE VARIABLE LENGTH STRING GIVEN AS THE ARGUMENT. A BLANK CHARACTER WILL BE INSERTED IN THE OUTPUT FOLLOWING THE STRING.
CI COPY INPUT OUTPUT THE LAST SEQUENCE OF CHARACTERS DELETED FROM THE INPUT STRING. THIS COMMAND MAY NOT FUNCTION PROPERLY IF THE LAST COMMAND WHICH COULD CAUSE DELETION FAILED TO DO SO.
GN1 GENERATE 1 THIS CONCERNS THE CURRENT LABEL 1 CELL, IE., THE NEXT TO TOP CELL IN THE STACK, WHICH IS EITHER CLEAR OR CONTAINS A GENERATED LABEL. IF CLEAR, GENERATE A LABEL AND PUT IT INTO THAT CELL. WHETHER THE LABEL HAS JUST BEEN PUT INTO THE CELL OR WAS ALREADY THERE, OUTPUT IT. FINALLY, INSERT A BLANK CHARACTER IN THE OUTPUT FOLLOWING THE LABEL.
GN2 GENERATE 2 SAME AS GN1, EXCEPT THAT IT CONCERNS THE CURRENT LABEL 2 CELL, IE., THE TOP CELL IN THE STACK.
LB LABEL SET THE OUTPUT COUNTER TO CARD COLUMN 1.
OUT OUTPUT PUNCH CARD AND RESET OUTPUT COUNTER TO CARD COLUMN 8.
ADR IDENT ADDRESS PRODUCES THE ADDRESS WHICH IS ASSIGNED TO THE GIVEN IDENTIFIER AS A CONSTANT.
END END DENOTES THE END OF THE PROGRAM.

The paper introduces VALGOL II as an illustration of a fairly elaborate programming language implemented in META II. That is, VALGOL II is an example. The VALGOL II machine is described in some detail (omitted).

There is a description of the library function WHOLE; it truncates a real number.

There is an argument that the WHOLE function can be substituted for the ENTIER function, which goes like this:

  1. Truncation takes fewer machine instructions to implement.
  2. Truncation seems to be used more frequently.
  3. The procedure ENTIER can be defined using WHOLE.

(Note: Possibly there is a variant of a citation, the reference - where a named foreign concept is used as if the reader is familiar with it. VALGOL’s for statement is contrasted with ALGOL’s for statement. So “ALGOL” is a reference?)

It describes the for statement in VALGOL II as “Exactly one list element is required. The ‘step .. until’ portion of the element is mandatory, but the ‘while’ portion may be added to terminate the loop immediately upon some condition. The iteration continues so long as the value of the variable is less than or equal to the maximum, irrespective of the sign of the increment.”

It gives an example (Illustration 3), described as “compilation of a typical for statement”. It also describes Illustration 3 with a flow chart (not translated). Illustration 3 looks something like this:

FOR I = 0 STEP 1 .UNTIL N .DO
    <statement>




    SET // Set switch to indicate first time through.
A91
    LD I
    FLP
    BFP A92  // Test for the first time through
    LDL 0
    SST
    B A93  // Initialize variable.
A92
    LDL 1
    ADS  // Increment variable.
A93
    RSR
    LD N
    LEQ
    BFP A94  // Compare variable to maximum
    <statement>
    RST  // Reset switch to indicate not first time through.
    B A91
A94

It gives an example (Figure 7). Figure 7 is described as “a listing of the VALGOL II compiler written in META II”.

.SYNTAX PROGRAM

ARRAYPART = '(.' EXP '.)' .OUT('AIA') .,

CALLPART = '(' .OUT('LDF') (EXP $('. EXP /
    .EMPTY) ')' .OUT('CLL') .,

VARIABLE = .ID .OUT('LD ' *) (ARRAYPART / .EMPTY) .,

PRIMARY = 'WHOLE' '(' EXXP ')' .OUT('WHL') /
    .ID .OUT('LD ' *) (ARRAYPART / CALLPART / .EMPTY) /
    '.TRUE' .OUT('SET') / '.FALSE' .OUT('RST') /
    'O ' .OUT('RST') / '1 ' .OUT('SET') /
    .NUMBER .OUT('LDL' *) /
    '(' EXP ')' .,

TERM = PRIMARY $ ('*' PRIMARY .OUT('MLT') /
    '/' PRIMARY .OUT('DIV') /
    './.' PRIMARY .OUT('DIV') .OUT('WHL') ) .,

EXP2 = '-' TERM OUT('NEG') /
    '*' TERM / TERM .,

EXP1 = EXP2 $('+' TERM .OUT('ADD') /
    '-' TERM .OUT('SUB')) .,

RELATION = EXP1 (
    '.L=' EXP1 .OUT('LEQ') /
    '.L' EXP1 .OUT('LES') /
    '.=' EXP1 .OUT('EQU') /
    '.-=' EXP1 .OUT('EQU') .OUT('NOT') /
    '.G=' EXP1 .OUT('LES') .OUT('NOT') /
    '.G' EXP1 .OUT('LEQ') .OUT('NOT') /
    .EMPTY) .,

BPRIMARY = '.- RELATION .OUT('NOT') /
    RELATION .,

STERM = BPRIMARY $ ('._' .oUT('BF ' *1)
    .OUT('POP') BPRIMARY)
    .LABEL *1 .,

BEXP1 = BTERM $( '.V' .OUT('BT ' *1)
    .OUT('POP') BTERM)
    .LABEL *1 .,

IMPLICATION1 = '.IMP' .OUT('NOT')
    .OUT('BT '*1) .OUT('POP')
    BEXP1 .LABEL *1 .,

IMPLICATION = BEXP1 $ IMPLICATION1 .,

EQUIV = IMPLICATION $('.EQ' .OUT('EQU') ) .,

EXP = '.IF' EXP '.THEN' .OUT('BFP' *1)
    EXP .OUT('B  ' *2) .LABEL *1
    .ELSE' EXP .LABEL *2 /
    EQUIV .,

ASSIGNPART = '=' EXP ( ASSIGNPART .OUT('ST') /
    .EMPTY .OUT('SST') ) .,

ASSIGNCALLST = .ID .OUT('LD ' *) (ARRAYPART ASSIGNPART /
    ASSIGNPART / (CALLPART / .EMPTY
    .OUT('LDF') .OUT('CLL') )
    .OUT('POP') ) .,

UNTILST = '.UNTIL' .LABEL *1 EXP
    '.DO' .OUT('BTP', *2) ST
    .OUT('B  ' *1) .LABEL *2 .,

WHILECLAUSE = '.WHILE' .OUT('BF ' *1)
    .OUT('POP') EXP .LABEL *1 / .EMPTY .,

FORCLAUSE = VARIABLE '=' .OUT('FLP')
    .OUT('BFP' *1) EXP '.STEP'
    .OUT('SST') .OUT('B  ' *2)
    .LABEL *1 EXP '.UNTIL' .OUT('ADS')
    .LABEL *2 .OUT('RSR') EXP
    .OUT('LEQ') WHILECLAUSE '.DO' .,

FORST = '.FOR' .OUT('SET') .LABEL *2
    FORCLAUSE .OUT('BFP' *2) ST
    .OUT('RST') .OUT('B  ' *1)
    .LABEL *2 .,

IOCALL = 'READ' '(' VARIABLE ',' EXP ')' .OUT('RED') /
    'WRITE' '(' VARIABLE ',' EXP ')' .OUT('WRT') /
    'EDIT' '(' EXP ',' .STRING
    .OUT('EDT' *) ')' /
    'PRINT' .OUT('PNT') /
    'EJECT" .OUT('EJT') .,

IDSEQ1 = .ID .LABEL* .OUT('BLK 1') .,

IDSEQ = IDSEQ1 $(',' IDSEQ) .,

TYPEDEC = '.REAL' IDSEQ .,

ARRAY1 = .ID .LABEL * '(.' '0' '..' .NUMBER
    .OUT('BLK 1') .OUT('BLK' *) '.)' .,

ARRAYDEC = '.ARRAY' ARRAY1 $( ',' ARRAY1) .,

PROCEDURE = '.PROCEDURE' .ID .LABEL *
    .LABEL *1 .OOUT('BLK 1') '('
    (IDSEQ / .EMPTY) ')' .OUT('SP  1') '.,'
    ST .OUT('R  ' *1) .,

DEC = TYPEDEC / ARRAYDEC / PROCEDURE .,

BLOCK = '.BEGIN' .OUT('B  ' *1) $(DEC '.,')
    .LABEL *1 ST $('.,' ST) '.END'
    (.ID / .EMPTY) .,

UNCONDITIONALST = IOCALL / ASSIGNCALLST /
    BLOCK .,

CONDST = '.IF' EXP '.THEN' .OUT('BFP' *1)
    (UNCONDITIONALST ('>ELSE' .OUT('B  ' *2)
    .LABEL *1 ST .LABEL *2 / .EMPTY
    .LABEL *1) / (FORST / UNTILST)
    .LABEL *1) .,

ST = CONDST / UNCONDITIONALST / FORST /
    UNTILST / .EMPTY .,

PROGRAM = BLOCK
    .OUT('HLT') .OUT('SP  1') .OUT('END') .,

.END

It gives an example (Figure 8). Figure 8 is described as “the order list of the VALGOL II machine”. It is goes something like this:`

MACHINE CODES

? ?? ???
LD AAA LOAD PUT THE ADDRESS AAA ON TOP OF THE STACK.
LDL NUMBER LOAD LITERAL PUT THE GIVEN NUMBER ON TOP OF THE STACK.
SET SET PUT THE INTEGER 1 ON TOP OF THE STACK.
RST RESET PUT THE INTEGER 0 ON TOP OF THE STACK.
ST STORE STORE THE CONTENTS OF THE REGISTER, STACK1, IN THE ADDRESS WHICH IS ON TOP OF THE STACK, THEN POP UP THE STACK.
ADS ADD TO STORAGE NOTE 1 ADD THE NUMBER ON TOP OF THE STACK TO THE NUMBER WHOSE ADDRESS IS NEXT TO THE TOP, AND PLACE THE SUM IN THE REGISTER, STACK1, THEN STORE THE CONTENTS OF THAT REGISTER IN THAT ADDRESS, AND POP THE TOP TWO ITEMS OUT OF THE STACK.
SST SAVE AND STORE NOTE 1 PUT THE NUMBER ON TOP OF THE STACK INTO THE REGISTER, STACK1, THEN STORE THE CONTENTS OF THAT REGISTER IN THE ADDRESS WHICH IS THE NEXT TO TOP TERM OF THE STACK. THE TOP TWO ITEMS ARE POPPED OUT OF THE STACK.
RSR RESTORE PUT THE CONTENTS OF THE REGISTER, STACK1, ON TOP OF THE STACK.
ADD ADD NOTE 2 REPLACE THE TWO NUMBERS WHICH ARE ON TOP OF THE STACK WITH THEIR SUM.
SUB SUBTRACT NOTE 2 SUBTRACT THE NUMBER WHICH IS ON TOP OF THE STACK FROM THE NUMBER WHICH IS NEXT TO THE TOP, THEN REPLACE THEM BY THIS DIFFERENCE.
MLT MULTIPLY NOTE 2 REPLACE THE TWO NUMBERS WHICH ARE ON TOP OF THE STACK WITH THEIR PRODUCT.
DIV DIVIDE NOTE 2 DIVIDE THE NUMBER WHICH IS NEXT TO THE TOP OF THE STACK BY THE NUMBER WHICH IS ON TOP OF THE STACK, THEN REPLACE THEM BY THIS QUOTIENT.
NEG NEGATE NOTE 1 CHANGE THE SIGN OF THE NUMBER ON TOP OF THE STACK.
WHL WHOLE TRUNCATE THE NUMBER WHICH IS ON TOP OF THE STACK.
NOT NOT IF THE TOP TERM IN THE STACK IS THE INTEGER 0, THEN REPLACE IT WITH THE INTEGER 1. OTHERWISE, REPLACE IT WITH THE INTEGER 0.
LEQ LESS THAN OR EQUAL NOTE 2 IF THE NUMBER WHICH IS NEXT TO THE TOP OF THE STACK IS LESS THAN OR EQUAL TO THE NUMBER ON TOP OF THE STACK, THEN REPLACE THEM WITH THE INTEGER 1. OTHERWISE, REPLACE THEM WITH THE INTEGER 0.
LES LESS THAN NOTE 2 IF THE NUMBER WHICH IS NEXT TO THE TOP OF THE STACK IS LESS THAN THE NUMBER ON TOP OF THE STACK, THEN REPLACE THEM WITH THE INTEGER 1. OTHERWISE, REPLACE THEM WITH THE INTEGER 0.
EQU EQUAL NOTE 2 COMPARE THE TWO NUMBERS ON TOP OF THE STACK. REPLACE THEM BY THE INTEGER 1, IF THEY ARE EQUAL, OR BY THE INTEGER 0, IF THEY ARE UNEQUAL.
B AAA BRANCH BRANCH TO THE ADDRESS AAA.
BT AAA BRANCH TRUE BRANCH TO THE ADDRESS AAA IF THE TOP TERM IN THE STACK IS NOT THE INTEGER 0. OTHERWISE, CONTINUE IN SEQUENCE. DO NOT POP UP THE STACK.
BF AAA BRANCH FALSE BRANCH TO THE ADDRESS AAA IF THE TOP TERM IN THE STACK IS THE INTEGER 0. OTHERWISE, CONTINUE IN SEQUENCE. DO NOT POP UP THE STACK.
BTP AAA BRANCH TRUE AND POP BRANCH TO THE ADDRESS AAA IF THE TOP TERM IN THE STACK IS NOT THE INTEGER 0. OTHERWISE, CONTINUE IN SEQUENCE. IN EITHER CASE, POP UP THE STACK.
BFP AAA BRANCH FALSE AND POP BRANCH TO THE ADDRESS AAA IF THE TOP TERM IN THE STACK IS THE INTEGER 0. OTHERWISE, CONTINUE IN SEQUENCE. IN EITHER CASE, POP UP THE STACK.
CLL CALL ENTER A PROCEDURE AT THE ADDRESS WHICH IS BELOW THE FLAG.
LDF LOAD FLAG PUT THE ADDRESS WHICH IS IN THE FLAG REGISTER ON TOP OF THE STACK, AND PUT THE ADDRESS OF THE TOP OF THE STACK INTO THE FLAG REGISTER.
R AAA RETURN RETURN FROM PROCEDURE.
AIA ARRAY INCREMENT ADDRESS INCREMENT THE ADDRESS WHICH IS NEXT TO THE TOP OF THE STACK BY THE INTEGER WHICH IS ON TOP OF THE STACK, AND REPLACE THESE BY THE RESULTING ADDRESS.
FLP FLIP INTERCHANGE THE TOP TWO TERMS OF THE STACK.
POP POP POP UP THE STACK.
EDT STRING EDIT NOTE 1 ROUND THE NUMBER WHICH IS ON TOP OF THE STACK TO THE NEAREST INTEGER N. MOVE THE GIVEN STRING INTO THE PRINT AREA SO THAT ITS FIRST CHARACTER FALLS ON PRINT POSITION N. IN CASE THIS WOULD CAUSE CHARACTERS TO FALL OUTSIDE THE PRINT AREA, NO MOVEMENT TAKES PLACE.
PNT PRINT PRINT A LINE, THEN SPACE AND CLEAR THE PRINT AREA.
EJT EJECT POSITION THE PAPER IN THE PRINTER TO THE TOP LINE OF THE NEXT PAGE.
RED READ READ THE FIRST N NUMBERS FROM A CARD AND STORE THEM BEGINNING IN THE ADDRESS WHICH IS NEXT TO THE TOP OF THE STACK. THE INTEGER N IS THE TOP TERM OF THE STACK. POP OUT BOTH THE ADDRESS AND THE INTEGER. CARDS ARE PUNCHED WITH UP TO 10 EIGHT DIGIT NUMBERS. DECIMAL POINT IS ASUMED TO BE IN THE MIDDLE. AN 11-PUNCH OVER THE RIGHTMOST DIGIT INDICATES A NEGATIVE NUMBER.
WRT WRITE PRINT A LINE OF NUMBERS BEGINNING IN THE ADDRESS WHICH IS NEXT TO THE TOP OF THE STACK. THE INTEGER N IS THE TOP TERM OF THE STACK. POP OUT BOTH THE ADDRESS AND THE INTEGER. TWELVE CHARACTER POSITIONS ARE ALLOWED FOR EACH NUMBER. THERE ARE FOUR DIGITS BEFORE AND AND FOUR DIGITS AFTER THE DECIMAL. LEADING ZEROES IN FRONT OF THE DECIMAL ARE CHANGED TO BLANKS. IF THE NUMBER IS NEGATIVE, A MINUS SIGN IS PRINTED IN THE POSITION BEFORE THE FIRST NON-BLANK CHARACTER.
HLT HALT HALT.

CONSTANT AND CONTROL CODES

? ?? ???
SP N SPACE N = 1–9. CONSTANT CODE PRODUCING N BLANK SPACES.
BLK NNN BLOCK PRODUCES A BLOCK OF NNN EIGHT CHARACTER WORDS.
END END DENOTES THE END OF THE PROGRAM

NOTE 1. IF THE TOP ITEM IN THE STACK IS AN ADDRESS, IT IS REPLACED BY ITS CONTENTS BEFORE BEGINNING THIS OPERATION. NOTE 2. SAME AS NOTE 1, BUT APPLIES TO THE TOP TWO ITEMS.

It gives an example (Figure 9). Figure 9 is described as “a sample program to take a determinant”. It is difficult for me to read, but goes something like this:

.BEGIN
.PROCEDURE DETERMINANT(A, N) .,
.BEGIN
.PROCEDURE DUMP() .,
.BEGIN
.REAL D .,
.FOR D = 0 .STEP 1 .UNITL N-1 .DO
    WRITE(MATRIX(. N*D .), N) .,
PRINT
.END DUMP .,
.PROCEDURE ABS(X) .,
    ABS = .IF 0 .L= X .THEN X .ELSE -X .,
.REAL PRODUCE, FACTOR, TEMP, R, I, J .,
PRODUCT = 1 .,
.FOR R = 0 .STEP 1 .UNTIL N-2
.WHILE PRODUCT .-= 0 .DO .BEGIN
    I = R .,
    .FOR J = R+1 .STEP 1 .UNTIL N-1 >Do
        .IF ABS( A(, N*1 + $ .) ) .L
        ABS( A(. N*J + R .) ) .THEN
            I = J .,
    .IF A(. N*I + R .) .= 0 .THEN
        PRODUCT = 0
    .ELSE
        .IF I .-= R .THEN .BEGIN
            PRODUCT = -PRODUCT .,
            .FOR J = R .STEP 1 .UNTIL N-1 .DO
            .BEGIN
                TEMP = A(. M*R + J .) .,
                A(. M*R + J .) = A(, N* I + J .) .,
                A(, N*I + J .) = TEMP .END .END .,
        TEMP = A(. N*R + R .) .,
        .FOR I = R+1 .STEP 1 .UNTIL N-1 .DO
        .BEGIN
            FACTOR = A(, N*I + R .) / TEMP .,
            .FOR J = R .STEP 1 .UNTIL N-1 .DO
                A(. M*I + J .) = A(, N*I + J .)
                -FACTOR * A(, N*R + J .) .,
        DUMP
        .END .END .,
.FOR I = 0 .STEP 1 .UNTIL N-1 .DO
    PRODUCT = PRODUCT * A(. N*I + 1 .) .,
DETERMINANT = PRODUCT
.END DETERMINANT .,
.REAL M, W, T ., .ARRAY MATRIX (. 0 .. 24 .) .,
.UNTIL .FALSE .DO .BEGIN
    EDIT(1, 'FIND DETERMINANT OF' ) ., PRINT., PRINT.,
    READ(M, 1) .,
    .FOR W = 0 .STEP 1 .UNTIL M-1 .DO .BEGIN
        READ(MATRIX (. M*W .), M) .,
        WRITE(MATRIX (. M*W .), M) .END .,
    PRINT ., T = DETERMINANT (MATRIX, M) .,
    WRITE(T, 1) ., PRINT., PRINT .END
.END PROGRAM

It describes META II as “not a standard language, but as a point of departure”.

It cites Alick Edwards Glennie’s “On the Syntax Machine and the Construction of a Universal Compiler

It cites Melvin Conway’s “Design of a Separable Transition-Diagram Compiler”.

It cites Noam Chomsky’s “Syntactic Structures”.

It cites some other things as well, but I was not able (in a few minutes) find the referents, so I will treat them as rotted.