Skip to content

Commit 7cdeec2

Browse files
committed
fix
1 parent 6de2afd commit 7cdeec2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/ast/analyzing/langs/fortran/parsing/src/parser.mly

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,15 @@ _program_stmt:
21072107
register_main n_str;
21082108
mkstmtleaf $startpos $endpos (Stmt.ProgramStmt n_str)
21092109
}
2110+
| program_stmt_head
2111+
{
2112+
env#exit_pu_head_context;
2113+
context_stack#activate_top;
2114+
let n_str = "" in
2115+
let nd = mkstmtleaf $startpos $endpos (Stmt.ProgramStmt n_str) in
2116+
parse_warning_loc nd#loc "program name not specified";
2117+
nd
2118+
}
21102119
;
21112120

21122121
program_stmt_head:
@@ -2444,7 +2453,7 @@ specification_part:
24442453
List.iter
24452454
(fun nd ->
24462455
if L.is_execution_part_construct nd#label && not (L.is_specification_part_construct nd#label) then
2447-
parse_warning_loc nd#loc
2456+
parse_warning_loc nd#loc
24482457
"specification-part contains execution-part-construct: %s" (L.to_simple_string nd#label)
24492458
) ep_nd#children;
24502459
sps @ ep_nd#children

src/ast/analyzing/langs/fortran/parsing/src/ulexer.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ module F (Stat : Parser_aux.STATE_T) = struct
11861186
marginal_complete_free_cont_count > 0 ||
11871187
(fixed_comment_count = 0) &&
11881188
(
1189-
(exclam_comment_count > 0 &&
1189+
((*exclam_comment_count > 0 &&*)
11901190
amp_count > 0 &&
11911191
(marginal_amp_count = amp_count || marginal_amp_count + free_cont_count = amp_count)
11921192
) ||

0 commit comments

Comments
 (0)