501 program 502 program unit 503 external subprogram 504 specification part 505 implicit part 506 implicit part stmt 507 declaration construct 508 specification construct 509 execution part 510 execution part construct 511 internal subprogram part 512 internal subprogram 513 other specification stmt 514 executable construct 515 action stmt 516 keyword 601 alphanumeric character 602 underscore 603 name 604 constant 605 literal constant 606 named constant 607 int constant 608 intrinsic operator 609 defined operator 610 extended intrinsic op 611 label 701 type param value 702 type spec 703 declaration type spec 704 intrinsictype spec 705 integer type spec 706 kind selector 707 signed int literal constant 708 int literal constant 709 kind param 710 signed digit string 711 digit string 712 sign 713 signed real literal constant 714 real literal constant 715 significand 716 exponent letter 717 exponent 718 complex literal constant 719 real part 720 imag part 721 char selector 722 length selector 723 char length 724 char literal constant 725 logical literal constant 726 derived type def 727 derived type stmt 728 type attr spec 729 private or sequence 730 end type stmt 731 sequence stmt 732 type param def stmt 733 type param decl 734 type param attr spec 735 component part 736 component def stmt 737 data component def stmt 738 component attr spec 739 component decl 740 component array spec 741 proc component def stmt 742 proc component attr spec 743 component initialization 744 initial data target 745 private components stmt 746 type bound procedure part 747 binding private stmt 748 type bound procedure stmt 749 type bound procedure stmt 750 type bound proc decl 751 type bound generic stmt 752 binding attr 753 final procedure stmt 754 derived type spec 755 type param spec 756 structure constructor 757 component spec 758 component data source 759 enum def 760 enum def stmt 761 enumerator def stmt 762 enumerator 763 end enum stmt 764 boz literal constant (bin,oct and hex) 765 binary constant 766 octal constant 767 hex constant 768 hex digit 769 array constructor 770 ac spec 771 lbracket 772 rbracket 773 ac value 774 ac implied do 775 ac implied do control 776 ac do variable 801 type declaration stmt 802 attr spec 803 entity decl 804 object name 805 initialization 806 null init 807 access spec 808 language binding spec 809 coarray spec 810 deferred coshape spec 811 explicit coshape spec 812 lower cobound 813 upper cobound 814 dimension spec 815 array spec 816 eplicit shape spec 817 lower bound 818 upper bound 819 assumed shape spec 820 deferred shape spec 821 assumed implied spec 822 assumed size spec 823 implied shape or assumed size spec 824 implied shape spec 825 assumed rank spec 826 intent spec 827 access stmt 828 access id 829 allocatable stmt 830 allocatable decl 831 asynchronous stmt 832 bind stmt 833 bind entity 834 codimension stmt 835 codimension decl 836 contiguous stmt 837 data stmt 838 data stmt set 839 data stmt object 840 data implied do 841 data i do object 842 data i do variable 843 data stmt value 844 data stmt repeat 845 data stmt constant 846 int constant subobject 847 constant subobject 848 dimension stmt 849 intent stmt 850 optional stmt 851 parameter stmt 852 named constant def 853 pinter stmt 854 pointer decl 855 protected stmt 856 save stmt 857 saved entity 858 proc pointer name 859 target stmt 860 target decl 861 value stmt 862 volatile stmt 863 implicit stmt 864 implicit spec 865 letter spec 866 implicit none spec 867 import stmt 868 namelist stmt 869 namelist group object 870 equivalence stmt 871 euivalence set 872 equivalence object 873 common stmt 874 common block object 901 designator 902 variable 903 variable name 904 logical variable 905 char variable 906 default char variable 907 int variable 908 substring 909 parent string 910 substring range 911 data ref 912 part ref 913 structure component 914 coindexed named object 915 complex part designator 916 type param inquiry 917 array element 918 array section 919 subscript 920 section subscript 921 subscript triplet 922 stride 923 vector subscript 924 image selector 925 cosubscript 926 image selector spec 927 allocate stmt 928 alloc opt 929 errmsg variable 930 source expr 931 allocation 932 allocate object 933 allocate shape spec 934 lower bound expr 935 upper bound expr 936 allocate coarray spec 937 allocate coshape spec 938 nullify stmt 939 pointer object 940 deallocate stmt 941 dealloc opt 942 stat variable 1001 primary 1002 level 1 expr 1003 defined unary op . letter+ . 1004 mult operand 1005 add operand 1006 level 2 expr 1007 power op ** 1008 mult op * or / 1009 add op + or 1010 level 3 expr 1011 concat op // 1012 level 4 expr 1013 rel op .EQ. (==) or .NE.(/=) or .LT. (<) or .LE. (<=) or .GT. (>) or .GE. (>=) 1014 and operand 1015 or operand 1016 equiv operand 1017 level 5 expr 1018 not op .NOT. 1019 and op .AND. 1020 or op .OR. 1021 equiv op .EQV. or .NEQV. 1022 expr 1023 defined binary op . letter+ . 1024 logical expr 1025 default char expr 1026 int expr 1027 numeric expr 1028 specification expr 1029 constant expr 1030 default char constant expr 1031 int constant expr 1032 assignment stmt 1033 pointer assignment stmt 1034 data pointer object 1035 bounds spec 1036 bounds remapping 1037 data target 1038 proc pointer object 1039 proc component ref 1040 proc target 1041 where stmt 1042 where construct 1043 where construct stmt 1044 where body construct 1045 where assignment stmt 1046 mask expr 1047 masked elsewhere stmt 1048 elsewhere stmt 1049 end where stmt 1050 forall construct 1051 forall construct stmt 1052 forall body construct 1053 forall assignment stmt 1054 end forall stmt 1055 forall stmt 1101 block 1102 associate construct 1103 associate stmt 1104 association 1105 selector 1106 end associate stmt 1107 block construct 1108 block stmt 1109 block specification part 1110 end block stmt 1111 change team construct 1112 change team stmt 1113 coarray association 1114 end change team stmt 1115 team value 1116 critical construct 1117 critical stmt 1118 end critical stmt 1119 do construct 1120 do stmt 1121 label do stmt 1122 nonlabel do stmt 1123 loop control 1124 do variable 1125 concurrent header 1126 concurrent control 1127 concurrent limit 1128 concurrent step 1129 concurrent locality 1130 locality spec 1131 end do 1132 end do stmt 1133 cycle stmt 1134 if construct 1135 if then stmt 1136 else if stmt 1137 else stmt 1138 end if stmt 1139 if stmt 1140 case construct 1141 select case stmt 1142 case stmt 1143 end select stmt 1144 case expr 1145 case selector 1146 case value range 1147 case value 1148 select rank construct 1149 select rank stmt 1150 select rank case stmt 1151 end select rank stmt 1152 select type construct 1153 select type stmt 1154 type guard stmt 1155 end select type stmt 1156 exit stmt 1157 goto stmt 1158 computed goto stmt 1159 continue stmt 1160 stop stmt 1161 error stop stmt 1162 stop code 1163 fail image stmt 1164 sync all stmt 1165 sync stat 1166 sync images stmt 1167 image set 1168 sync memory stmt 1169 sync team stmt 1170 event post stmt 1171 event variable 1172 event wait stmt 1173 event wait spec 1174 until spec 1175 form team stmt 1176 team number 1177 team variable 1178 form team spec 1179 lock stmt 1180 lock stat 1181 unlock stmt 1182 lock variable 1201 io unit 1202 file until number 1203 internal file variable 1204 open stmt 1205 connect spec 1206 file name expr 1207 iomsg variable 1208 close stmt 1209 close spec 1210 read stmt 1211 write stmt 1212 print stmt 1213 io control spec 1214 id variable 1215 format 1216 input item 1217 output item 1218 io implied do 1219 io implied do object 1220 io implied do control 1221 dtv type spec 1222 wait stmt 1223 wait spec 1224 backspace stmt 1225 endfile stmt 1226 rewind stmt 1227 position spec 1228 flush stmt 1229 flush spec 1230 inquire stmt 1231 inquire spec 1301 format stmt 1302 format specification 1303 format items 1304 format item 1305 unlimited format item 1306 r 1307 data edit spec 1308 w 1309 m 1310 d 1311 e 1312 v 1313 control edit spec 1314 k 1315 position edit spec 1316 n 1317 sign edit desc 1318 blank interp edit desc 1319 round edit desc 1320 decimal edit desc 1321 char string edit spec 1401 main program 1402 program stmt 1403 end program stmt 1404 module 1405 module stmt 1406 end module stmt 1407 module subprogram part 1408 module subprogram 1409 use stmt 1410 module nature 1411 rename 1412 only 1413 only use stmt 1414 local defined operator 1415 use defined operator 1416 submodule 1417 submodule stmt 1418 parent identifier 1419 end submodule stmt 1420 block data 1421 block data stmt 1422 end block data stmt 1501 interface block 1502 interface specification 1503 interface stmt 1504 end interface stmt 1505 interface body 1506 procedure stmt 1507 specific procedure 1508 generic spec 1509 defined io generic spec 1510 generic stmt 1511 external stmt 1512 procedure declaration stmt 1513 proc interface 1514 proc attr spec 1515 proc decl 1516 interface name 1517 proc pointer init 1518 initial proc target 1519 intrinsic stmt 1520 function reference 1521 call stmt 1522 procedure designator 1523 actual arg spec 1524 actual arg 1525 alt return spec 1526 prefix 1527 prefix spec 1528 proc language binding spec 1529 function subprogram 1530 function stmt 1531 dummy arg stmt 1532 suffix 1533 end function stmt 1534 subroutine subprogram 1535 subroutine stmt 1536 dymmy arg 1537 end subroutine stmt 1538 separate module subprogram 1539 mp subprogram stmt 1540 end mp subprogram stmt 1541 entry stmt 1542 return stmt 1543 contains stmt 1544 stmt fucntion stmt In total, there are 474 real rules. (And 3 assumed rules)