fparser.two.Fortran2008.connect_spec_r905
Module containing Fortran2008 Connect_Spec rule R905
Module Contents
Classes
Fortran2008 rule R905. Extends the Fortran2003 definition with support for |
- class fparser.two.Fortran2008.connect_spec_r905.Connect_Spec(string, parent_cls=None)[source]
Bases:
fparser.two.Fortran2003.Connect_Spec
Fortran2008 rule R905. Extends the Fortran2003 definition with support for the NEWUNIT specifier.
- connect-spec is [ UNIT = ] file-unit-number
or ACCESS = scalar-default-char-expr or ACTION = scalar-default-char-expr or ASYNCHRONOUS = scalar-default-char-expr or BLANK = scalar-default-char-expr or DECIMAL = scalar-default-char-expr or DELIM = scalar-default-char-expr or ENCODING = scalar-default-char-expr or ERR = label or FILE = file-name-expr or FORM = scalar-default-char-expr or IOMSG = iomsg-variable or IOSTAT = scalar-int-variable or NEWUNIT = scalar-int-variable or PAD = scalar-default-char-expr or POSITION = scalar-default-char-expr or RECL = scalar-int-expr or ROUND = scalar-default-char-expr or SIGN = scalar-default-char-expr or STATUS = scalar-default-char-expr
R906 file-name-expr is scalar-default-char-expr R907 iomsg-variable is scalar-default-char-variable C903 No specifier shall appear more than once in a given connect-spec-list.
- C904 (R904) If the NEWUNIT= specifier does not appear, a file-unit-number
shall be specified; if the optional characters UNIT= are omitted, the file-unit-number shall be the first item in the connect-spec-list.
- C905 (R904) The label used in the ERR= specifier shall be the statement label
of a branch target statement that appears in the same inclusive scope as the OPEN statement.
- C906 (R904) If a NEWUNIT= specifier appears, a file-unit-number shall not
appear.
The constraints listed above are checked for in the Open_Stmt.match() method as we don’t have access to the full list of Connect_Spec elements here. The exceptions are the second part of C904 (un-named file-unit-number must be first in the list) and C905: these are not currently checked.