Google
 

Trailing-Edge - PDP-10 Archives - BB-D480C-SB_1981 - f72bnf.syn
There are 12 other files named f72bnf.syn in the archive. Click here to see a list.
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
;AUTHORS: F. INFANTE, J. BELL, D. B. TOLMAN, T.F. VASAK

	THE SYNTAX OF DECsystem-10 FORTRAN 72 IN EXTENDED BNF
			100-310-044-03
			JUNE 12,1972

	F72BNFV = 6^24 + 0^18 + 4	!Version date: 22-Jul-81

***** Begin Revision History *****

***** Begin Version 4B *****

1	334	17420	Correct format of DO statement.

***** Begin Version 5B *****

2	653	25441	Unit number for FIND should allow an array reference,
			(DCE)

3	741	-----	Add warning for array declaration with a / (slash)
			sererating the upper and lower bounds, (DCE)

***** Begin Version 6 *****

4	760	TFV	1-Mar-80	-----
	F77 I/O statement changes

***** End Revision History *****

NOTE **** Everything before the first form feed is ignored, so all
	  global comments, and the revision history must be fully
	  contained on the first logical page. Starting with page
	  2, all comments must be preceded by a ; (semicolon), and
	  terminated with a . (dot).


		THE  INFORMATION IN  THIS MEMORANDUM IS
		SUBJECT TO CHANGE  WITHOUT  NOTICE  AND
		SHOULD NOT BE CONSTRUED AS A COMMITMENT
		BY   DIGITAL  EQUIPEMENT  CORPORATION .
;							100-310-044-03
							PAGE 02
.
;THE COMPONENTS OF THE MODIFIED BNF SYNTAX USED IN THE PRODUCTIONS ON THE FOLLOWING PAGES .

BNFDEFINITION      = METASYMBOL "="  BNFCOMPONENT  [ COMMENT ] "." .

BNFCOMPONENT       = ( TERMINAL l
                     METASYMBOL l
                     ONE l
                     ALL l
                     OPTION l
                     LIST l
                     REPEAT l
                     ACTION ) .

TERMINAL           = """ *ALPHANUMERIC """ ;TERMINAL CHARACTER STRING .

METASYMBOL         = [ *LETTER  "-" ] *LETTER  ;AN ELEMENT
                     OF THE SYNTAX DEFINED BY THE SYNTAX OR BY A LEXICAL
                     PROCESS .

ONE                = "(" BNFCOMPONENT *[ "l" BNFCOMPONENT ] ")" 
                     ;ONLY ONE OF THE BNFCOMPONENTS IS REQUIRED .

ALL                = BNFCOMPONENT *[ BNFCOMPONENT ] ;ALL OF THE
                     BNFCOMPONENTS ARE REQUIRED .

OPTION             = "[" BNFCOMPONENT "]" ;USE OF THE BNFCOMPONENT IS
                     OPTIONAL .

LIST               = "+" BNFCOMPONENT ;BNFCOMPONENTS SEPERATED BY
                     COMMAS .

REPEAT             = "*" BNFCOMPONENT ;BNFCOMPONENTS NOT SEPERATED BY
                     COMMAS .

ACTION             = "%" ACTIONNAME "%" ;ACTION TO BE PERFORMED WHEN ENCOUNTERED .

COMMENT            = ";" *ASCIICHARACTER .

;*****************************************************************************************************************
;							100-310-044-03
							PAGE 03
.
;FORTRAN-10 SYNTAX IN MODIFIED BNF .

EXPRESSION     = %EXPRESS% .

VARIABLESPEC       = IDENTIFIER %NOLABELS% [ LPAREN +%EXPRESS% RPAREN ] .

DATA               = +( +DATAITEM VALUELIST ) LINEND .

;FORMAT             = %FORMATSYN% .

; INTEGERSPEC        = DECLARESPEC LINEND .

; REALSPEC           = DECLARESPEC LINEND .

; LOGICALSPEC        = DECLARESPEC LINEND .

; DOUBLEPRECISION    = DECLARESPEC LINEND .

; COMPLEXSPEC        = DECLARESPEC LINEND .

DECLARESPEC        = ( FUNCTIONSPEC l TYPELIST )  LINEND .

FUNCTIONSPEC       = %FUNCTIONSCAN% SUBPROGRAMID .

PARAMSPEC          = +( IDENTIFIER  EQUAL ( [ PLUS l MINUS ]  CONSTLEX l  LITSTRING )   )  LINEND  . 
;							100-310-044-03
							PAGE 04
.
; PROGRAM            =  [ IDENTIFIER ] LINEND .

; BLOCKDATA          =  [ IDENTIFIER ] LINEND .

DIMENSION          = +ONEARRAY LINEND .

SUBROUTINE         = SUBPROGRAMID  LINEND  .  

COMMON             = *COMMONGROUP LINEND .

EQUIVALENCE        = +( LPAREN VARIABLESPEC COMMA +VARIABLESPEC RPAREN ) LINEND .

EXTERNSPEC         = +( [ ANDSGN l  ASTERISK  ]  IDENTIFIER  )   LINEND  . 

; INCLUDESPEC        = LPAREN [ UNITSPEC COMMA ] ( LITSTRING l VARIABLESPEC ) RPAREN LINEND .

IMPLICIT           = +( %TYPEID% LPAREN +%IMPLICITSPEC% RPAREN ) LINEND .

; PROTECT            = +ONEARRAY LINEND .

; GLOBALSPEC         = +ONEARRAY LINEND .

NAMELIST           = *( SLASH IDENTIFIER SLASH +IDENTIFIER ) LINEND .

; IMPLICITSPEC       = %LETTER% [ DASH %LETTER% ] .
 
;TYPEID             = ( "SUBSCRIPTINTEGER" l "DOUBLEPRECISION" l
;                     ( "INTEGER" l "REAL" l "LOGICAL" l "COMPLEX" l "BIT" ) [ TIMES CONSTANT ] ) %SETTYPE% .

DATAITEM           = (  VARIABLESPEC l  LPAREN +DATAITEM [ LOOPPART ] RPAREN )  .

LOOPPART           = EQUAL %EXPRESS% COMMA %EXPRESS% [ COMMA %EXPRESS% ] .

SUBPROGRAMID       = IDENTIFIER %PNAMSET% [ LPAREN +( IDENTIFIER l ASTERISK l DOLLAR l ANDSGN  ) RPAREN ]  .

ONEARRAY           = IDENTIFIER %ASTERTYPE% [ 
                     LPAREN +( [ PLUS l MINUS ] ( CONSTLEX l IDENTIFIER ) 
                           [ ( ( SLASH %SLASHWARN% ) l COLON )  [ PLUS l MINUS ] ( CONSTLEX l IDENTIFIER ) ] 
                             ) 
                     RPAREN ]   .

TYPELIST           = +( +ONEARRAY  [ VALUELIST ] ) .

VALUELIST          = SLASH +( [ PLUS l MINUS ] 
                                    ( CONSTLEX [ TIMES ( [ PLUS l MINUS ] ( CONSTLEX l CMPLEXCON )   
                                                        l  LITSTRING 
                                                        )   
                                               ] 
                                     l  CMPLEXCON 
                                      ) 
                            l  LITSTRING 
                            )  SLASH  . 

CMPLEXCON          = LPAREN [ PLUS l MINUS ] CONSTLEX COMMA [ PLUS l MINUS ] CONSTLEX RPAREN .
;							100-310-044-03
							PAGE 05
.
COMMONGROUP        = [ SLASH [ IDENTIFIER ] SLASH ] +ONEARRAY .

ASSIGN             = %LABELS% LABELEX %TOQUOTE% VARIABLESPEC LINEND .

GOTO               =  %LABELS% ( LABELEX l GOTOSPEC ) LINEND .

CALL               = IDENTIFIER [ LPAREN %EXPRLIST% RPAREN ] LINEND .

; RETURNSPEC         = [ %EXPRESS% ] LINEND .

;CONTINUE          = LINEND .

; STOP               = [ LITSTRING l CONSTLEX ] LINEND .

; PAUSE              = [ LITSTRING l CONSTLEX ] LINEND .

;END               = LINEND .

RWSPEC           = %LABELS% ( IOSPEC  [ [ COMMA ]  +DATAITEM ] l 
                             FORMATID [ COMMA  +DATAITEM ] ) LINEND .


IOSPEC1             = %LABELS% ( FORMATID  [ COMMA +DATAITEM ] l
                        LPAREN KEYSPEC RPAREN [ [ COMMA ] +DATAITEM ] )
                        LINEND .

; ACCEPT             = %LABELS% FORMATID [ COMMA +DATAITEM ] LINEND .

; PUNCH              = %LABELS% FORMATID [ COMMA +DATAITEM ] LINEND .

; WRITESPEC          = %LABELS% ( IOSPEC l FORMATID ) [ [ COMMA ] +DATAITEM ] LINEND .

; PRINT              = %LABELS% FORMATID [ COMMA  +DATAITEM ] LINEND .

; TYPESPEC           = %LABELS% FORMATID [ COMMA  +DATAITEM ] LINEND .

; ENCODE             = ENCODECODESPEC LINEND .

; DECODE             = ENCODECODESPEC LINEND .

; REREAD             = %LABELS% FORMATID [ COMMA +DATAITEM ] LINEND .
;							100-310-044-03
							PAGE 06
.
; BACKSPEC           = UTILSPEC .

;  REWIND             = UTILSPEC .

; UNLOAD             = UTILSPEC .

; ENDFILESPEC        = UTILSPEC .

; SKIPSPEC           = UTILSPEC  .

; OPEN               = LPAREN +( IDENTIFIER EQUAL ( VARIABLESPEC l CONSTANT l LITSTRING ) ) RPAREN LINEND .

; CLOSESPEC          = LPAREN ( CONSTANT l VARIABLESPEC )
;                     *[ COMMA IDENTIFIER EQUAL ( VARIABLESPEC l LITSTRING ) ] RPAREN LINEND .

FIND               = LPAREN KEYORUNIT [ COMMA KEYSPEC ] RPAREN LINEND .

KEYSPEC          = %NOLABELS% +( IDENTIFIER  EQUAL ( CONSTLEX l VARIABLESPEC l ASTERISK ) ) .

KEYORUNIT        = %NOLABELS% ( CONSTLEX [ %RECORDMARK% %EXPRESS% ] l 
                   IDENTIFIER [ %RECORDMARK% %EXPRESS% l EQUAL ( CONSTLEX l VARIABLESPEC l ASTERISK ) ] ) .

KEYORFMT       = %LABELS% ( LABELEX l VARIABLESPEC [ EQUAL %NOLABELS% ( CONSTLEX l VARIABLESPEC l
                     ASTERISK ) ] l ASTERISK ) .

IOSPEC             = LPAREN KEYORUNIT [ COMMA KEYORFMT [ COMMA KEYSPEC ] ] RPAREN .

GOTOSPEC           = ( VARIABLESPEC [ [ COMMA ] LPAREN +( %LABELS% LABELEX ) RPAREN ] l
                     LPAREN +( %LABELS% LABELEX ) RPAREN [ COMMA ] %EXPRESS% ) .

ENCODECODESPEC     = LPAREN ENCDECPAREN RPAREN [ [ COMMA ] +DATAITEM ] LINEND .

ENCDECPAREN      = %EXPRESS% COMMA %LABELS% FORMATID COMMA VARIABLESPEC [ COMMA KEYSPEC ] .

FORMATID           =   ( LABELEX l IDENTIFIER  l ASTERISK ) .

; ACTUALARG          = ( %EXPRESS%  l DOLLAR CONSTLEX ) .


; REPEATEXPR         = +( [ LPAREN ] ( CONSTLEX l VARIABLESPEC ) [ RPAREN ] [ LPAREN ( CONSTLEX l VARIABLESPEC ) RPAREN ] ) .

UTILSPEC         = ( CONSTLEX l VARIABLESPEC l UTILPAREN ) LINEND .

UTILPAREN            = LPAREN KEYORUNIT [ COMMA KEYSPEC ] RPAREN .


;							100-310-044-03
							PAGE 07
.
STATEFUNCSPEC      = LPAREN +%SUBLOCAL% RPAREN  EQUAL %EXPRESS% LINEND .

ARRAYASSIGNSPEC    = LPAREN +%EXPRESS% RPAREN   EQUAL %EXPRESS%  LINEND .

LOGICALIFSPEC      = LPAREN %EXPRESS% RPAREN .

ARITHIFSPEC        = LPAREN %EXPRESS% RPAREN %LABELS% LABELEX COMMA %LABELS% LABELEX [ COMMA %LABELS% LABELEX ] LINEND .

ASSIGNSPEC         = IDENTIFIER  EQUAL %EXPRESS%  LINEND .

DOSPEC             = %LABELS% LABELEX IDENTIFIER EQUAL %EXPRESS% COMMA %EXPRESS% [ COMMA %EXPRESS% ] LINEND .