Expressions Specific to Fortran

This section gives information on the following Fortran support features:

Fortran Identifiers

The Fortran implementation of identifiers is as follows:

identifier-or-typedef-name

: identifier-or-key-word

| TYPEDEFname

| PROCEDUREname

Fortran Constants

real-or-imag-part

: real_constant

| PLUS real_constant

| MINUS real_constant

| integer_constant

| PLUS integer_constant

| MINUS integer_constant

constant

: real_constant

| integer_constant

| complex-constant

| character_constant

| LOGICALconstantWithKind

character_constant

: CHARACTERconstantWithKind

| string

complex-constant

: LPAREN real-or-imag-part COMMA real-or-imag-part RPAREN

Fortran Rescoped Expressions

The Fortran implementation of rescoped expressions is as follows:

qual-typedef-opt

: TYPEDEFname /* Base (global) name */

| qual-typedef-opt TICK TYPEDEFname /* Qualified name */

whatis-expressions

: expression

| rescoped-expression

| printable_type

Fortran Calls

The Fortran implementation of calls is as follows:

call-expression

: call-stmt

call-stmt

: named-subroutine

| named-subroutine LPAREN RPAREN

| named-subroutine LPAREN actual-arg-spec-list RPAREN

Fortran Addresses

The Fortran implementation of addresses is as follows:

address

: line-address

| primary

address-exp

: address

| address-exp PLUS  address

| address-exp MINUS address

| address-exp STAR  address

Restrictions and limits are documented here.

Fortran Loc

The Fortran implementation of loc is as follows:

loc

: expression

| rescoped-expression

Fortran Types

The Fortran implementation of types is as follows:

type-name

: TYPEDEFname

printable-type

: rescoped-typedef

| type-name

Other Forms of Fortran Expressions

expression

: expr

| named-procedure

assignment-expression

: expr

constant-expression

: constant

unary-expression

: variable

expr

: level-5-expr

| expr defined-binary-op level-5-expr

level-5-expr

: equiv-operand

| level-5-expr LOGEQV equiv-operand

| level-5-expr LOGNEQV equiv-operand

| level-5-expr LOGXOR equiv-operand

equiv-operand

: or-operand

| equiv-operand LOGOR or-operand

or-operand

: and-operand

| or-operand LOGAND and-operand

and-operand

: level-4-expr

| LOGNOT and-operand

level-4-expr

: level-3-expr

| level-3-expr LESS level-3-expr

| level-3-expr GREATER level-3-expr

| level-3-expr LE level-3-expr

| level-3-expr GE level-3-expr

| level-3-expr EQ level-3-expr

| level-3-expr NE level-3-expr

level-3-expr

: level-2-expr

| level-3-expr SLASHSLASH level-2-expr

level-2-expr

: and-operand

| level-2-expr PLUS  add-operand

| level-2-expr MINUS add-operand

add-operand

: add-operand-f90

| add-operand-dec

| unary-expr-dec

add-operand-f90

: mult-operand-f90

| add-operand-f90 STAR  mult-operand-f90

| add-operand-f90 SLASH mult-operand-f90

mult-operand-f90

: level-1-expr

| level-1-expr STARSTAR mult-operand-f90

add-operand-dec

: mult-operand-dec

| add-operand-f90 STAR  mult-operand-dec

| add-operand-f90 SLASH mult-operand-dec

| add-operand-f90 STAR  unary-expr-dec

| add-operand-f90 SLASH unary-expr-dec

mult-operand-dec

: level-1-expr STARSTAR mult-operand-dec

| level-1-expr STARSTAR unary-expr-dec

unary-expr-dec

: PLUS  and-operand

| MINUS and-operand

level-1-expr

: primary

| defined-unary-op primary

defined-unary-op

: DOT_LETTERS_DOT

primary

: constant

| variable

| function-reference

| LPAREN expr RPAREN

| AMPERSAND variable

| process_set

| LPAREN process_range RPAREN

defined-binary-op

: DOT_LETTERS_DOT

int-expr

: expr

scalar-int-expr

: int-expr

variable

: named-variable

| subobject

named-variable

: variable-name

| module_prefix PERCENT_PERCENT variable-name

subobject

: array-elt-or-sect

| structure-component

| known-substring

known-substring

: disabled-array-elt-or-sect LPAREN substring-range RPAREN

| hf-array-abomination

substring-range

: scalar-int-expr COLON scalar-int-expr

| scalar-int-expr COLON

|                 COLON scalar-int-expr

|                 COLON

hf-array-abomination

: named-variable

  LPAREN section-subscript-list RPAREN

   LPAREN section-subscript RPAREN

| structure PERCENT any-identifier

      LPAREN section-subscript-list RPAREN

      LPAREN section-subscript RPAREN

| structure DOT any-identifier

      LPAREN section-subscript-list RPAREN

      LPAREN section-subscript RPAREN

disabled-array-elt-or-sect

: DISABLER array-elt-or-sect

array-elt-or-sect

: named-variable LPAREN section-subscript-list RPAREN

| structure PERCENT any-identifier LPAREN section-subscript-list RPAREN

| structure DOT any-identifier LPAREN section-subscript-list RPAREN

section-subscript-list

: section-subscript

| section-subscript COMMA section-subscript-list

subscript

: scalar-int-expr

section-subscript

: subscript

| subscript-triplet

subscript-triplet

: subscript COLON subscript COLON stride

| subscript COLON           COLON stride

|           COLON subscript COLON stride

|           COLON           COLON stride

| subscript COLON subscript

| subscript COLON

|           COLON subscript

|           COLON

stride

: scalar-int-expr

structure-component

: structure PERCENT any-identifier

| structure DOT any-identifier

structure

: named-variable

| structure-component

| array-elt-or-sect

function-reference

: SIZEOF LPAREN expr RPAREN

| named-function LPAREN RPAREN

| named-function LPAREN actual-arg-spec-list RPAREN

named-procedure

:  PROCEDUREname

named-function

:  PROCEDUREname

| module_prefix PERCENT_PERCENT PROCEDUREname

named-subroutine

:  PROCEDUREname

actual-arg-spec-list

: actual-arg-spec

| actual-arg-spec COMMA actual-arg-spec-list

actual-arg-spec

: actual-arg

actual-arg

: expr

any-identifier

: variable-name

| PROCEDUREname

variable-name

: identifier-or-key-word

PROCEDUREname

: IDENTIFIER

module_prefix

: any_identifier

| module_prefix PERCENT_PERCENT any_identifier