diff --git a/src/main/kotlin/org/jetbrains/fortran/lang/parser/FortranParser.bnf b/src/main/kotlin/org/jetbrains/fortran/lang/parser/FortranParser.bnf index 3de7629e..4ad3829a 100644 --- a/src/main/kotlin/org/jetbrains/fortran/lang/parser/FortranParser.bnf +++ b/src/main/kotlin/org/jetbrains/fortran/lang/parser/FortranParser.bnf @@ -1037,13 +1037,15 @@ print_stmt ::= label_decl? print_ parameter_value ','? <>? { p private parameter_value ::= '*' | label_or_expression // we can match label when it's really an expression, but expression matches a label too // R916 -input_item ::= variable | io_implied_do +input_item ::= variable | io_implied_do_input // R917 -output_item ::= io_implied_do | expr +output_item ::= io_implied_do_output | expr // R918 + R920 -io_implied_do ::= '(' <> ',' id_loop_stmt ')' { pin = 4 } +io_implied_do_input ::= '(' <> ',' id_loop_stmt ')' { pin = 4 } +io_implied_do_output ::= '(' <> ',' id_loop_stmt ')' { pin = 4 } // R919 -io_implied_do_object ::= (input_item | output_item) !'=' { pin = 2 } +io_implied_do_object_input ::= input_item !'=' { pin = 2 } +io_implied_do_object_output ::= output_item !'=' { pin = 2 } // R921 (unused maybe) //dtv_type_spec ::= (type | classkwd) '(' derived_type_spec ')' { pin =1 } // R922 @@ -1290,4 +1292,4 @@ include_stmt ::= label_decl? include_ string_literal { accept_stmt ::= label_decl? accept_ parameter_value (',' <>)? {pin = 2; extends=action_stmt} encode_stmt ::= label_decl? encode_ '(' expr ',' parameter_value ',' designator (',' <>)?')' <> { pin = 2; extends=action_stmt} decode_stmt ::= label_decl? decode_ '(' expr ',' parameter_value ',' designator (',' <>)?')' <> { pin = 2; extends=action_stmt } -type_stmt ::= label_decl? type_ parameter_value (','? <>?) { pin = 4; extends=action_stmt } \ No newline at end of file +type_stmt ::= label_decl? type_ parameter_value (','? <>?) { pin = 4; extends=action_stmt }