在本附录我们给出FORTRAN95的语法规则(ISO/IEC 1559-1:1997(E))。所谓语法规则,就是描述一切FORTRAN95的词汇,语句,结构等语言成分的形式规则,凡是遵循了这个描述的,就是合法的FORTRAN95语言;否则,就是不合法的。
因此语法规则本身必须是精确的,绝对不能产生歧义。在这种要求下,FORTRAN95的语法采用了形式语言的方式给出语法规则,即属于所谓Backus-Naur形式(BNF)的一种变体。
由于这种描述形式本身采用了语言的形式,因此有几点说明如下:
●在描述语法时,对于属于FORTRAN字符集的字符按照字面形式来理解,除非有特别的说明。
●对于每一个语法成分的描述,都有一个唯一的编号,这个编号的采用了如下的一般形式:
Rxyy
其中的R表示规则,而x表示FORTRAN标准的节号,yy表示对于该语法成分的描述在该节的唯一编号,因此对于每一个语法成分的描述,这个Rxyy可以看成是它的唯一编号,全书的正文当中,每当第一次引入一个语法成分,我们总是给出了它的这个编号。在下面的规则表里面,这个编号简写为纯数字,省略了字母R。
●下面的描述当中,为了简洁起见,采用了如下的缩写:
argument……arg
attribute……..attr
declaration…..decl
definition……def
descriptor……desc
expression…..expr
integer………int
operator……..op
specifier…….spec
statement……stmt
●同样为了简洁的缘故,这里给出的形式描述不可能是绝对完备和精确的,在能够理解的前提下,本附录采用了一定的简化形式,并且在FORTRAN标准的基础上作了一定的节略。
●除了文字之外,还使用了来自FORTRAN字符集的如下特殊符号;另外还使用了|表示或者的意思。
+ 加号 |
% 百分号 |
- 减号 |
& and |
* 星号 |
; 分号 |
/ 除号或斜线 |
‘ 省略符号 |
< 小于 |
“ 引号 |
> 大于 |
. 小数点或句号 |
( 左括号 |
= 等号 |
) 右括号 |
! 叹号 |
| 或者 |
|
FORTRAN95的语法规则(ISO/IEC 1559-1:1997(E))
语法成分 |
形式描述 |
编号 |
access-id |
use-name | generic-spec |
523 |
access-spec |
PUBLIC | PRIVATE |
511 |
access-stmt |
access-spec [ [ :: ] access-id-list ] |
522 |
ac-do-variable |
scalar-int-variable |
436 |
ac-implied-do |
( ac-value-list, ac-implied-do-control ) |
434 |
ac-implied-do-control |
ac-do-variable = scalar-int-expr , scalar-int-expr [ , scalar-int-expr ] |
435 |
action-stmt |
allocate-stmt | assignment-stmt | backspace-stmt | call-stmt | close-stmt | continue-stmt | cycle-stmt | deallocate-stmt | endfile-stmt | end-function-stmt | end-program-stmt | end-subroutine-stmt | exit-stmt | forall-stmt | goto-stmt | if-stmt | inquire-stmt | nullify-stmt | open-stmt | pointer-assignment-stmt | print-stmt | read-stmt | return-stmt | rewind-stmt | stop-stmt | where-stmt | write-stmt |
216 |
actual-arg |
Expr | variable | procedure-name |
1214 |
actual-arg-spec |
[ keyword = ] actual-arg |
1212 |
ac-value |
Expr | ac-implied-do |
433 |
add-op |
+ | - |
710 |
add-operand |
[ add-operand mult-op ] mult-operand |
706 |
allocatable-stmt |
ALLOCATABLE [ :: ] array-name [ ( deferred-shape-spec-list ) ] { , array-name [ ( deferred-shape-spec-list ) ] } |
527 |
allocate-lower-bound |
scalar-int-expr |
627 |
allocate-object |
variable-name | structure-component |
625 |
allocate-shape-spec |
[ allocate-lower-bound : ] allocate-upper-bound |
626 |
allocate-stmt |
ALLOCATE ( allocation-list [ , STAT = stat-variable ] ) |
622 |
allocate-upper-bound |
scalar-int-expr |
628 |
allocation allocate-object |
[ ( allocate-shape-spec-list ) ] |
624 |
alphanumeric-character |
Letter | digit | underscore |
302 |
and-op |
.AND. |
720 |
and-operand |
[ not-op ] level-4-expr |
715 |
array-constructor |
( / ac-value-list / ) |
432 |
array-element |
data-ref |
615 |
array-section |
dataref [ ( substringrange ) ] |
616 |
array-spec |
explicit-shape-spec-list | assumed-shape-spec-list | deferred-shape-spec-list | assumed-size-spec |
513 |
assignment-stmt |
variable = expr |
735 |
assumed-shape-spec |
[ lower-bound ] : |
517 |
assumed-shape-spec-list |
assumed-shape-spec { assumed-shape-spec } |
0 |
assumed-size-spec |
[ explicit-shape-spec-list , ] [ lower-bound : ] * |
519 |
attr-spec |
PARAMETER | access-spec | ALLOCATABLE | DIMENSION (array-spec ) | EXTERNAL | INTENT ( intent-spec ) | INTRINSIC | OPTIONAL | POINTER | SAVE | TARGET |
503 |
backspace-stmt |
BACKSPACE external-file-unit | BACKSPACE ( position-spec-list ) |
919 |
binary-constant |
B ' digit { digit } ' | B "digit { digit } " |
408 |
blank-interp-edit-desc |
BN | BZ |
1015 |
block |
{ execution-part-construct } |
801 |
block-data |
block-data-stmt [specification-part] end-block-data-stmt |
1112 |
block-data-stmt |
BLOCK DATA [block-data-name] |
1113 |
block-do-construct |
do-stmt do-block end-do |
817 |
boz-literal-constant |
binary-constant | octal-constant | hex-constant |
407 |
call-stmt |
CALL subroutine-name [ ( [ actual-arg-spec-list ] ) ] |
1211 |
case-construct |
select-case-stmt { case-stmt block } end-select-stmt |
808 |
case-expr |
scalar-int-expr | scalar-char-expr | scalar-logical-expr |
812 |
case-selector |
( case-value-range-list ) | DEFAULT |
813 |
case-stmt |
CASE case-selector [ case-construct-name ] |
810 |
case-value |
scalar-int-initialization-expr | scalar-char-initialization-expr | scalar-logical-initialization-expr |
815 |
case-value-range |
case-value | case-value : | : case-value | case-value : case-value |
814 |
case-value-range-list |
case-value-range { case-value-range } |
0 |
char-constant |
constant |
309 |
char-expr |
expr |
726 |
char-initialization-exr |
char-expr |
731 |
char-length |
( char-len-param-value ) | scalar-int-literal-constant |
509 |
char-len-param-value |
specification-expr | * | : |
510 |
char-literal-constant |
[ _kind-param ] ' { rep-char } ' | [ _kind-param ] " { rep-char } " |
420 |
char-selector |
length-selector | (LEN = char-len-param-value, KIND = scalar-int-initialization-expr ) | ( char-len-param-value, [ KIND = ] scalar-int-initialization-expr ) | (KIND = scalar-int-initialization-expr [, LEN = char-len-param-value ] ) |
507 |
char-string-edit-desc |
char-literal-constant |
1016 |
char-variable |
variable |
605 |
close-spec |
[ UNIT = ] external-file-unit | IOSTAT = scalar-default-int-variable | ERR = label | STATUS = scalar-default-char-expr |
908 |
close-stmt |
CLOSE ( close-spec-list ) |
907 |
common-block-object |
variable-name [ ( explicit-shape-spec-list ) ] |
530 |
common-stmt |
COMMON [ / [ common-block-name ] / ] common-block-object-list { [,] / [ common-block-name ] / common-block object-list } |
549
|
complex-literal-constant |
( real-part , imag-part ) |
417 |
component-array-spec |
explicit-shape-spec-list | deferred-shape-spec-list |
427 |
component-attr-spec |
POINTER | DIMENSION ( component-array-spec ) |
426 |
component-attr-spec-list |
component-attr-spec { component-attr-spec } |
0 |
component-decl |
component-name [ ( component-array-spec ) ] [ * char-length ] [ component-initialization ] |
428 |
component-decl-list |
component-decl { component-decl } |
0 |
component-def-stmt |
type-spec [ [ , component-attr-spec-list ] :: ] component-decl-list |
425 |
component-initialization |
= initialization-expr | => NULL () |
429 |
concat-op |
// |
712 |
connect-spec |
[ UNIT = ] external-file-unit | IOSTAT = scalar-default-int-variable | ERR = label | FILE = file-name-expr | STATUS = scalar-default-char-expr | ACCESS = scalar-default-char-expr | FORM = scalar-default-char-expr | RECL = scalar-int-expr | BLANK = scalar-default-char-expr | POSITION = scalar-default-char-expr | ACTION = scalar-default-char-expr | DELIM = scalar-default-char-expr | PAD = scalar-default-char-expr |
905 |
constant |
literal-constant | named-constant |
305 |
constant-subobject |
subobject |
702 |
contains-stmt |
CONTAINS |
1227 |
continue-stmt |
CONTINUE |
839 |
control-edit-desc |
position-edit-desc | [ r ] / | : | sign-edit-desc | k P | blank-interp-edit-desc |
1010 |
cycle-stmt |
CYCLE [ do-construct-name ] |
834 |
d |
int-literal-constant |
1008 |
data-edit-desc |
I w [ . m ] | B w [ . m ] | O w [ . m ] | Z w [ . m ] | F w . d | E w . d [ E e ] | EN w . d [ E e ] | ES w . d [ E e ] | G w . d [ E e ] | L w | A [ w ] | D w . d |
1005 |
Data-i-do-object |
Array-element | scalarstructurecomponent | dataimplieddo |
536 |
Data-i-do-variable |
Scalar-int-variable |
537 |
Data-implied-do |
( data-i-do-object-list, data-i-do-variable = scalar-int-expr scalar-int-expr [ , scalar-int-expr] ) |
535 |
data-ref |
part-ref { % part-ref } |
612 |
data-stmt |
DATA data-stmt-set { [ , ] data-stmt-set } |
532 |
data-stmt-constant |
scalar-constant | scalar-constant-subobject | signed-int-literal-constant | signed-real-literal-constant | NULL ( ) | structure-constructor | entry-stmt |
540 |
Data-stmt-object |
variable | data-implied-do |
534 |
data-stmt-object-list |
data-stmt-object { data-stmt-object } |
0 |
datastmtrepeat |
Scalar-int-constant | scalar-int-constant-subobject |
539 |
data-stmt-set |
data-stmt-object-list / data-stmt-value-list / |
533 |
Data-stmt-value |
[ data-stmt-repeat* ] data-stmt-constant |
538 |
data-stmt-value-list |
data-stmt-value { data-stmt-value } |
0 |
deallocate-stmt |
DEALLOCATE ( allocate-object-list [, STAT = stat-variable ] ) |
631 |
declaration-construct |
derived-type-def | interface-block | type-declaration-stmt | specification-stmt | parameter-stmt | format-stmt | entry-stmt | stmt-function-stmt |
207 |
default-char-expr |
expr |
727 |
Default-char-variable |
variable |
606 |
default-int-variable |
variable |
608 |
default-logical-variable |
variable |
604 |
deferred-shape-spec |
: |
518 |
defined-binary-op |
. letter { letter }. |
724 |
defined-operator |
defined-binary-op | defined-unary-op | extended-intrinsic-op |
311 |
defined-unary-op |
. letter { letter }. |
704 |
derived-type-def |
derived-type-stmt { private-sequence-stmt } component-def-stmt { component-def-stmt } end-type-stmt |
422 |
derived-type-stmt |
TYPE [ [ , access-spec ] ] type-name |
423 |
digit-string |
digit { digit } |
402 |
dimension-stmt |
DIMENSION [ :: ] array-name ( array-spec ) { , array-name ( array-spec ) } |
526 |
do-block |
block |
823 |
do-construct |
block-do-construct |
816 |
do-construct-name |
name |
0 |
do-stmt |
label-do-stmt | nonlabel-do-stmt |
818 |
do-variable |
scalar-int-variable |
822 |
dummy-arg |
dummy-arg-name | * |
1223 |
e |
int-literal-constant |
1009 |
else-if-stmt |
ELSE IF ( scalar-logical-expr ) THEN [ if-construct-name ] |
804 |
else-stmt |
ELSE [ if-construct-name ] |
805 |
elsewhere-stmt |
ELSEWHERE [ where-construct-name ] |
745 |
end-block-data-stmt |
END [BLOCK DATA [block-data-name]] |
1114 |
end-do |
end-do-stmt | continue-stmt |
824 |
end-do-stmt |
END DO [ do-construct-name ] |
825 |
endfile-stmt |
ENDFILE external-file-unit |
920 |
end-forall-stmt |
END FORALL [ forall-construct-name ] |
753 |
end-function-stmt |
END [ FUNCTION [ function-name ]] |
1220 |
end-if-stmt |
END IF [ if-construct-name ] |
806 |
end-interface-stmt |
END INTERFACE [ generic-spec ] |
1204 |
end-module-stmt |
END [MODULE [ module-name]] |
1106 |
end-program-stmt |
END [PROGRAM [ program-name]] |
1103 |
end-select-stmt |
END SELECT [ select-case-construct-name ] |
811 |
end-subroutine-stmt |
END [ SUBROUTINE [ subroutine-name ]] |
1224 |
end-type-stmt |
END TYPE [ type-name ] |
430 |
end-where-stmt |
END WHERE [ where-construct-name ] |
746 |
entity-decl |
object-name [ ( array-spec ) ] [ * char-length ] [ initialization ] | function-name [ * char-length ] |
504 |
entry-stmt |
ENTRY entry-name [ ( [ dummy-arg-list ] ) [ RESULT ( result-name ) ] ] |
1225 |
enum-def equivalence-object |
type-alias-name ( enumerator-list ) | variable-name | array-element | substring |
0 548 |
equivalence-set |
( equivalence-object, equivalence-object-list ) |
547 |
equivalence-set-list |
equivalence-set { equivalence-set } |
0 |
equivalence-stmt |
EQUIVALENCE equivalence-set-list |
546 |
equiv-op |
.EQ. | .NEQ. |
722 |
equiv-operand |
[ equiv-operand or-op ] or-operand |
717 |
executable-construct |
action-stmt | case-construct | do-construct | forall-construct | if-construct | where-construct |
215 |
execution-part |
executable-construct {execution-part-construct} |
208 |
execution-part-construct |
executable-construct | format-stmt | entry-stmt | data stmt (check still present) |
209 |
exit-stmt |
EXIT [ do-construct-name ] |
835 |
explicit-shape-spec |
[ lower-bound : ] upper-bound |
514 |
exponent |
signed-digit-string |
406 |
exponent-letter |
E | D |
415 |
expr |
[ expr defined-binary-op ] level-5-expr |
723 |
extended-intrinsic-op |
intrinsic-operator |
312 |
external-file -unit |
scalar-int-expr |
902 |
external-name-list |
external-name { external-name } |
0 |
external-stmt |
EXTERNAL [ :: ] external-name-list |
1208 |
external-subprogram |
function-subprogram | subroutine-subprogram |
203 |
file-name-expr |
scalar-default-char-expr |
906 |
forall-assignment-stmt |
assignment-stmt | pointer-assignment-stmt |
752 |
forall-body-construct |
forall-assignment-stmt | where-stmt | where-construct | forall-construct | forall-stmt |
751 |
forall-construct |
forall-construct-stmt { forall-body-construct } end-forall-stmt |
747 |
forall-construct-name |
name |
0 |
forall-construct-stmt |
[ forall-construct-name : ] FORALL forall-header |
748 |
forall-header |
( forall-triplet-spec-list [, scalar-mask-expr ] ) |
749 |
forall-stmt |
FORALL forall-header forall-assignment-stmt |
754 |
forall-triplet-spec |
index-name = subscript : subscript [ : stride ] |
750 |
format |
default-char-expr | label | * |
913 |
format-item |
[ r ] data-edit-desc | control-edit-desc | char-string-edit-desc | [ r ] ( format-item-list ) |
1003 |
format-item-list |
format-item { format-item } |
0 |
format-specification |
( [ format-item-list ) ] ) |
1002 |
format-stmt |
FORMAT format-specification |
1001 |
function-name |
name |
0 |
function-reference |
function-name ( [ actual-arg-spec-list ] ) |
1210 |
function-stmt |
[ prefix ] FUNCTION function-name ( [ dummy-arg-name-list ] ) [ RESULT ( result-name ) ] |
1217 |
function-subprogram |
function-stmt [specification-part] [execution-part] [internal-subprogram-part] end-function-stmt |
1216 |
generic-spec |
generic-name | OPERATOR ( defined-operator ) | ASSIGNMENT ( = ) |
1207 |
goto-stmt |
GO TO label |
836 |
hex-constant |
Z ' hex-digit { hex-digit } ' | Z " hex-digit { hex-digit } " |
410 |
hex-digit |
digit | A | B | C | D | E | F |
411 |
if-construct |
if-then-stmt block { else-if-stmt block } [ else-stmt block ] end-if-stmt |
802 |
if-construct-name |
name |
0 |
if-stmt |
IF ( scalar-logical-expr ) action-stmt |
807 |
if-then-stmt |
[ if-construct-name : ] IF ( scalar-logical-expr ) THEN |
803 |
imag-part |
signed-int-literal-constant | signed-real-literal-constant |
419 |
implicit-part |
{ implicit-part-stmt } implicit-stmt |
205 |
implicit-part-stmt |
implicit-stmt | parameter-stmt | format-stmt | entry-stmt |
206 |
implicit-spec |
type-spec ( letter-spec-list ) |
542 |
implicit-stmt |
IMPLICIT implicit-spec-list | IMPLICIT NONE |
541 |
initialization |
initialization-expr | => NULL() |
505 |
initialization-expr |
expr |
730 |
input-item |
variable | io-implied-do |
914 |
input-item-list |
input-item { input-item } |
0 |
inquire-spec |
[ UNIT = ] external-file-unit | FILE = file-name-expr | IOSTAT = scalar-default-int-variable | ERR = label | EXIST = scalar-default-logical-variable | OPENED = scalar-default-logical-variable | NUMBER = scalar-default-int-variable | NAMED = scalar-default-logical-variable | NAME = scalar-default-char-variable | ACCESS = scalar-default-char-variable | SEQUENTIAL = scalar-default-char-variable | DIRECT = scalar-default-char-variable | FORM = scalar-default-char-variable | FORMATTED = scalar-default-char-variable | UNFORMATTED = scalar-default-char-variable | RECL = scalar-default-int-variable | NEXTREC = scalar-default-int-variable | BLANK = scalar-default-char-variable | POSITION = scalar-default-char-variable | ACTION = scalar-default-char-variable | READ = scalar-default-char-variable | WRITE = scalar-default-char-variable | READWRITE = scalar-default-char-variable | DELIM = scalar-default-char-variable | PAD = scalar-default-char-variable |
924 |
inquire-spec-list |
inquire-spec { inquire-spec } |
0 |
inquire-stmt |
INQUIRE ( inquire-spec-list ) | INQUIRE ( IOLENGTH = scalar-default-int-variable ) output-item-list |
923 |
int-constant |
constant |
308 |
intent-spec |
IN | OUT | INOUT |
512 |
intent-stmt |
INTENT ( intent-spec ) [ :: ] dummy-arg-name-list |
520 |
interface-block |
interface-stmt { interface-specification } end-interface-stmt |
1201 |
interface-body |
function-stmt [ specification-part ] end-function-stmt | subroutine-stmt [ specification-part ] end-subroutine-stmt |
1205 |
interface-specification |
interface-body | module-procedure-stmt |
1202 |
interface-stmt |
INTERFACE [generic-spec] |
1203 |
internal-file-unit |
default-char-variable |
903 |
internal-subprogram |
function-subprogram | subroutine-subprogram |
211 |
internal-subprogram-part |
contains-stmt internal-subprogram {internal-subprogram} |
210 |
int-expr |
expr |
728 |
int-initialization-expr |
int-expr |
732 |
int-literal-constant |
digit-string [ _ kind-param ] |
404 |
intrinsic-operator |
power-op | mult-op | add-op | concat-op | rel-op | not-op | and-op | or-op | equiv-op |
310 |
intrinsic-procedure-name-list |
intrinsic-procedure-name { intrinsic-procedure-name } |
0 |
intrinsic-stmt |
INTRINSIC [ :: ] intrinsic-procedure-name-list |
1209 |
int-variable |
variable |
607 |
io-control-spec |
[ UNIT = ] io-unit | [ FMT = ] format | [ NML = ] namelist-group-name | REC = scalar-int-expr | IOSTAT = scalar-default-int-variable | ERR = label | END = label | ADVANCE = scalar-default-char-expr | SIZE = scalar-default-int-variable | EOR = label |
912 |
io-implied-do |
( io-implied-do-object-list , io-implied-do-control ) |
916 |
io-implied-do-control |
do-variable = scalar-int-expr, scalar-int-expr [ , scalar-int-expr ] |
918 |
io-implied-do-object |
input-item | output-item |
917 |
io-unit |
external-file-unit | * | internal-file-unit |
901 |
k |
signed-int-literal-constant |
1011 |
keyword |
dummy-arg-name |
1213 |
kind-param |
digit-string | scalar-int-constant-name |
405 |
kind-selector |
( [ KIND = ] scalar-int-initialization-expr ) |
506 |
label |
digit [ digit [ digit [ digit [ digit ]]]]] |
313 |
label-do-stmt |
[ do-construct-name : ] DO label [ loop-control ] |
819 |
Length-selector |
( [ LEN = ] charlenparamvalue) | * char-length [ , ] |
508 |
Letter-spec |
letter [ - letter ] |
543 |
level-1-expr |
[ defined-unary-op ] primary |
703 |
level-2-expr |
[ [ level-2-expr ] add-op ] add-operand |
707 |
level-3-expr |
[ level-3-expr concat-op ] level-2-expr |
711 |
level-4-expr |
[ level-3-expr rel-op ] level-3-expr |
713 |
level-5-expr |
[ level-5-expr equiv-op ] equiv-operand |
718 |
literal-constant |
int-literal-constant | real-literal-constant | complex-literal-constant | logical-literal-constant | char-literal-constant | boz-literal-constant |
306 |
local-name |
name |
0 |
logical-expr |
expr |
725 |
logical-initialization-expr |
logical-expr |
733 |
logical-literal-constant |
.TRUE. [ _kind-param ] | . FALSE. [ _kind-param ] |
421 |
logical-variable |
variable |
603 |
loop-control |
[ , ] do-variable = scalar-int-expr , scalar-int-expr [ , scalar-int-expr ] | [ , ] WHILE scalar-logical-expr |
821 |
lower-bound |
specification-expr |
515 |
m |
int-literal-constant |
1007 |
main-program |
[program-stmt] [specification-part] [execution-part] [internal-subprogram-part] end-program-stmt |
1101 |
masked-elsewhere-stmt |
ELSEWHERE ( mask-expr ) [ where-construct-name ] |
744 |
mask-expr |
logical-expr |
743 |
module |
module-stmt [specification-part] [module-subprogram-part] end-module-stmt |
1104 |
module-procedure-stmt |
MODULE PROCEDURE procedure-name-list |
1206 |
module-stmt |
MODULE module-name |
1105 |
module-subprogram |
function-subprogram | subroutine-subprogram |
213 |
module-subprogram-part |
contains-stmt module-subprogram {module-subprogram} |
212 |
mult-op |
* | / |
709 |
mult-operand |
level-1-expr [ power-op mult-operand ] |
705 |
n |
int-literal-constant |
1013 |
name |
letter (alphanumeric-character } |
304 |
named-constant |
name |
307 |
named-constant-def |
named-constant = initialization |
531 |
namelist-group-name |
name |
0 |
namelist-group-object |
variable-name |
545 |
namelist-group-object-list |
namelist-group-object {namelist-group-object } |
0 |
namelist-stmt |
NAMELIST / namelist-group-name / namelist-group-object-list { [ , ] / namelist-group-name / namelist-group-object-list } |
544 |
nonlabel-do-stmt |
[ do-construct-name : ] DO [ loop-control ] |
820 |
not-op |
.NOT. |
719 |
nullify-stmt |
NULLIFY ( pointer-object-list ) |
629 |
numeric-e xpr |
expr |
729 |
object-name |
name |
0 |
object-name-list |
object-name { object-name } |
0 |
octal-constant |
O ' digit { digit } ' | O " digit { digit } " |
409 |
only |
generic-spec | only-use-name | only-rename |
1109 |
only-rename |
local-name => use-name |
1111 |
only-use-name |
only-name |
1110 |
open-stmt |
OPEN ( connect-spec-list ) |
904 |
optional-stmt |
OPTIONAL [ :: ] dummy-arg-name-list
|
521 |
or-op |
.OR. |
721 |
or-operand |
[ or-operand and-op ] and-operand |
716 |
output-item |
expr | io-implied-do |
915 |
output-item-list |
output-item { output-item } |
0 |
parameter-stmt |
PARAMETER ( named-constant-def-list ) |
550 |
parent-string |
scalar-variable-name | array-element | scalar-structure-component | scalar-constant |
610 |
part-ref part-name |
[ ( section-subscript-list ) ] |
613 |
pointer-assignment-stmt |
pointer-object => target |
736 |
pointer-object |
variable-name | structure-component |
630 |
pointer-object-list |
pointer-object { pointer-object } |
0 |
pointer-stmt |
POINTER [ :: ] object-name [ ( deferred-shape-spec-list ) ] { , object-name [ ( deferred-shape-spec-list ) ] } |
528 |
position-edit-desc |
T n | TL n | TR n | n X |
1012 |
position-spec |
[ UNIT = ] external-file-unit | IOSTAT = scalar-default-int-variable | ERR = label
|
922 |
position-spec-list |
position-spec { position-spec } |
0 |
power-op |
** |
708 |
prefix |
prefix-spec { prefix-spec } |
1218 |
prefix-spec |
type-spec | RECURSIVE | PURE | ELEMENTAL |
1219 |
primary |
constant | constant-sub-object | variable | array-constructor | structure-constructor | function-reference | ( expr )
|
701 |
print-stmt |
PRINT format [ , output-item-list ] |
911 |
private-sequence-stmt |
PRIVATE | SEQUENCE |
424 |
program |
program-unit {program-unit} |
201 |
program-name |
name |
0 |
program-stmt |
PROGRAM program-name |
1102 |
program-unit |
main-program | external-subprogram | module | block-data |
202 |
r |
int-literal-constant |
1004 |
read-stmt |
READ ( io-control-spec-list ) [ input-item-list ] READ format [, input-item-list ] |
909 |
real-literal-constant |
significand [ exponent-letter exponent ] [ _kind-param ] | digit-string exponent-letter exponent [ _kind-param ] |
413 |
real-part |
signed-int-literal-constant | signed-real-literal-constant |
418 |
rel-op |
.EQ. |.NE. |.LT. |.LE. |.GT. |.GE. | == | /= | < | <= | > | >= |
714 |
rename |
local-name => use-name |
1108 |
result-name |
name |
0 |
return-stmt |
RETURN [ scalar-int-expr ] |
1226 |
rewind-stmt |
REWIND external-file-unit | REWIND ( position-spec-list ) |
921 |
saved-entity |
object-name | / common-block-name / |
525 |
saved-entity-list |
saved-entity { saved-entity } |
0 |
save-stmt |
SAVE [ [ :: ] saved-entity-list ] |
524 |
scalar-default-int-variable |
scalar-int-variable |
0 |
scalar-int-expr |
expr |
0 |
scalar-int-initialization-expr |
expr |
0 |
scalar-logical-expr |
expr |
0 |
sectionsubscript |
subscript | subscripttriplet | vectorsubscript |
618 |
select-case-construct-name |
name |
0 |
select-case-stmt |
[ case-construct-name : ] SELECT CASE ( case-expr ) |
809 |
select-construct-name |
name |
0 |
sign |
+ | - |
416 |
signed-digit-string |
[ sign ] digit-string |
401 |
signed-int-literal-constant |
[ sign ] int-literal-constant |
403 |
sign-edit-desc |
S | SP | SS |
1014 |
signed-real-literal-constant |
[ sign ] real-literal-constant |
412 |
significand |
digit-string . [ digit-string ] | . digit-string |
414 414 |
specification-expr |
scalar-int-expr |
734 |
specification-part |
{ use-stmt } [ implicit-part ] { declaration-construct } |
204 |
specification-stmt |
access-stmt | allocatable-stmt | common-stmt | data-stmt | dimension-stmt | equivalence-stmt | external-stmt | intent-stmt | intrinsic-stmt | namelist-stmt | optional-stmt | pointer-stmt | save-stmt | target-stmt |
214 |
stat-variable |
scalar-int-variable |
623 |
stmt-function-stmt |
function-name ( [ dummy-arg-name-list ] ) = scalar-expr |
1228 |
stop-code |
scalar-char-constant | digit [ digit [ digit [ digit [ digit ]]]] |
841 |
stop-stmt |
STOP [ stop-code ] |
840 |
stride |
scalar-int-expr |
620 |
structure-component |
data-ref |
614 |
structure-constructor |
type-name ( expr-list ) |
431 |
subobject
|
array-element | array-section | structure-component | substring |
602 |
subroutine-stmt |
[ prefix ] SUBROUTINE subroutine-name [ ( [ dummy-arg-list ] ) ] |
1222 |
subroutine-subprogram |
subroutine-stmt [specification-part] [execution-part] [internal-subprogram-part] end-subroutine-stmt |
1221 |
subscript |
scalar-int-expr |
617 |
Subscript-triplet |
[ subscript] : [subscript ] [ :stride ] |
619 |
substring |
parent-string ( substring-range ) |
609 |
substring-range |
[ scalar-int-expr ] : [scalar-int-expr ] |
611 |
target |
variable | expr |
737 |
target-stmt |
TARGET [ :: ] object-name [ ( array-spec ) ] { , object-name [ ( array-spec ) ] } |
529 |
type-declaration-stmt |
type-spec [ { , attr-spec } :: ] entity-decl-list |
501 |
type-name |
name |
0 |
type-spec |
INTEGER [ kind-selector ] | REAL [ kind-selector ] | DOUBLE PRECISION | COMPLEX [ kind-selector ] | CHARACTER [char-selector ] | LOGICAL [ kind-selector ] | TYPE ( type-name ) |
502 |
underscore |
_ |
303 |
Upper-bound |
Specification-expr |
516 |
use-name |
name |
0 |
use-stmt |
USE module-name [ , rename-list ] | USE module-name , ONLY : [only-list] |
1107 |
variable |
scalar-variable-name | array-variable-name | subobject
|
601 |
Vectorsub-script |
intexpr |
621 |
w |
int-literal-constant |
1006 |
where-assignment-stmt |
assignment-stmt |
742 |
where-body-construct |
where-assignment-stmt | where-stmt | where-construct |
741
741 |
where-construct |
where-construct-stmt { where-body-construct } { masked-elsewhere-stmt { where-body-construct } } { elsewhere-stmt { where-body-construct } } end-where-stmt |
739
|
where-construct-name |
name |
0 |
where-construct-stmt |
[ where-construct-name: ] WHERE ( mask-expr ) |
740 |
where-stmt |
WHERE ( mask-expr ) where-assignment-stmt |
738 |
write-stmt |
WRITE ( io-control-spec-list ) [ output-item-list ] |
910 |