Contact us Heritage collections Image license terms
HOME ACL ACD ICF SUS DCS G&A STARLINK Literature
Further reading □ OverviewProject □ GEC □ Overview4000 SeriesGEC 4070 Operating SystemInstallationCommunicationsGEC 4000 familyNucleusFunctional spec.Babbage assemblerInstruction set manualNucleus manual □ Prime □ OverviewThe companyPrimos Operating SystemSystemsCommunicationsSoftwarePrime and UMISTOffice AutomationThe Schools ProjectPrime 750FOREST preprocessorMETA II TWSMETA II definitionFINGS graphics systemROOTS extended FORTRANPrime User Manual
C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACDICFMulti User Minis
ACDICFMulti User Minis
ACL ACD C&A INF CCD CISD Archives
Further reading

OverviewProject
GEC
Overview4000 SeriesGEC 4070 Operating SystemInstallationCommunicationsGEC 4000 familyNucleusFunctional spec.Babbage assemblerInstruction set manualNucleus manual
Prime
OverviewThe companyPrimos Operating SystemSystemsCommunicationsSoftwarePrime and UMISTOffice AutomationThe Schools ProjectPrime 750FOREST preprocessorMETA II TWSMETA II definitionFINGS graphics systemROOTS extended FORTRANPrime User Manual

META II

META II, being a translator writing system could be defined in itself. The extended version of META II used at Atlas was:

.SYNTAX PROGRAM 
PROGRAM=('.INIT' $(.ID [* *T] '=' .NUMBER[* %] /
         .STRING [ 'LBST' *T *P * *P %] ) 
         '.INITEND' / .EMPTY ) 
         '.SYNTAX' .ID ['CLL' *T * % 'FIN' %]
         $ST '.END' [ '&' *T '&' %] ;
ST = .ID [* *T ':' %] '=' EXP ';' ['R' %] ;
EXP = ALT $( '/' ['BT' *T *1 %] ALT) [*1 *T ':' %] ;
ALT = ITEM [ 'BF' *T *1 %] $ (ITEM [ 'BE' %]) [ *1 *T ':' %] ;
ITEM = .ID ['CLL' *T * %] /
       .STRING ['TST' *T *P * *P %] /
        '..' .STRING ['ANYSTR' *T *P * *P %] /
        '.NOT' ITEM ['BF' *T *1 % 'SETF' % 'BR' *T *2 % ] '.BUT'
                    [ *1 *T ':' %] ITEM [*2 *T ':' % ]     /
        '.' .ID [* %] /
        '(' EXP ')' /
        '$' [*1 *T ':' %] ITEM ['BT' *T *1 % 'SET' %] /
        '[.'  [ 'STTYP' %] $ OUTITM '.]' [ 'FITYP' %] /
        '[' $ OUTITM ']' 
OUTITM = '*' (.NUMBER ('+' ['LABPLS' *T * %] / '..' ['LABLST' *T * %]
             / .EMPTY [ 'GN' *T * %] /
              'P' ['PRIM' %] /
              'T' ['TAB'  %] /
              'B' ['CIB'  %] /
              '->' .NUMBER ['INTO' *T * %] /
              '<-' .NUMBER ['FROM' *T * % ] /
              .EMPTY [ 'CI' % ]   )  /
              '%' [ 'OUT' % ]   /
              .STRING ['CL' *T *P * *P %] ;
.END

The definitions of the routines called are:

TST
Ignore spaces, check input for specific string
ID
Ignore spaces, check input for identifier
NUMBER
Ignore spaces, check input for number
STRING
Ignore spaces, check input for string
SET
Set switch to true
CLL
Call routine, pushing stack
R
Return, popping stack
BR
Branch
BT
Branch if true
BF
Branch if false
BE
Stop if false
CL
Output string
CI
Output buffer
OUT
Output newline
GN
Output label A or B series
SETF
Set switch to false
FIN
End Meta program
PRIM
Output a prime
TAB
Output a tab
EMPTY
Set switch to true
INTO
Copy recog buffer to temp
FROM
Copy from temp to recog buffer
ANYSTR
Check for any string up to string specified
CRIN
Reset CR char on input
TABSET
Reset tab to every I
STTYP
Set output to typing
FITYP
Set back to normal output
INSTR
Set input stream
CIB
Output recog buffer without trailing spaces
CONTST
Check input for continue line
COMNST
Check input for comment line
LABEL
Check input for label
LABLST
Output set of labels for switch
LABLPS
Output one of a set of labels
LBST
Set initial label characters
OCT
Ignore spaces, check for octal number

Some of these just used by FOREST

The original Schorre recogniser for META II was:

.SYNTAX PROGRAM
PROGRAM = '.SYNTAX' .ID $ST '.END' ;
ST = .ID '=' EX1 ';' ;
EX1 = EX2 $('/' EX2) ;
EX2 = (EX3/OUTPUT)$(EX3/OUTPUT);
EX3 = .ID/.STRING/'.ID'/'.NUMBER'/'.STRING'/
      '('EX1')'/'.EMPTY'/'$'EX3;
OUTPUT = '.OUT' '('$OUT1')';
OUT1 = '*1'/'*2'/'*3'/'*'/.STRING;
.END

META II defined in itself was something like:

.SYNTAX PROGRAM
PROGRAM = '.SYNTAX' .ID .OUT('CLL ' * ';FIN;') $ST '.END' ;
ST = .ID .OUT(* ':') '=' EX1 ';' .OUT('R;');
EX1 = EX2 $('/' .OUT('BT' *1';')EX2) .OUT(*1 ':');
EX2 = (EX3 .OUT('BF' *1 ';')/OUTPUT)$(EX3 .OUT('BE;')/OUTPUT) .OUT(*1':');
EX3 = .ID .OUT('CLL ' * ';')/
      .STRING .OUT('TST ' *3 * *3 ';')/
      '.ID' .OUT('ID;')/
      '.NUMBER' .OUT('NUM;')/
      '.STRING' .OUT('SR;')/
      '('EX1')'/'.EMPTY' .OUT('SET;')/
      '$' .OUT(*1':') EX3 .OUT('BT ' *1 '; SET ;';
OUTPUT = '.OUT' '('$OUT1')' .OUT('OUT;');
OUT1 = '*1' .OUT('GN1;')/
       '*2' .OUT('GN2;')/
       '*3' .OUT('PRIME;')/
       '*' .OUT('CI;')/
       .STRING .OUT('CL ' *3 * *3 ';');
.END

The definitions of the routines to be handcode are:

TST
Ignore spaces, check input for specific string
ID
Ignore spaces, check input for identifier
NUM
Ignore spaces, check input for number
SR
Ignore spaces, check input for string
SET
Set switch to true
CLL
Call routine, pushing stack
R
Return, popping stack
BR
Branch
BT
Branch if true
BF
Branch if false
BE
Stop if false
CL
Output string
CI
Output buffer
OUT
Output newline
GN
Output label A or B series
FIN
End Meta program
PRIME
Output a prime
⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site