@@ -460,13 +460,11 @@ def logical_result(self):
460
460
)
461
461
462
462
463
- def c_file_source (fp , relaxed = False , directives_only = False ):
463
+ def c_file_source (fp , directives_only = False ):
464
464
"""
465
465
Process file fp in terms of logical (sloc) and physical lines of C code.
466
466
Yield blocks of logical lines of code with physical extents.
467
467
Return total lines at exit.
468
- Relaxed allows for inconsistent state at the end of parsing, usefule for
469
- special composition cases.
470
468
directives_only sets up parser to only process directive lines such that
471
469
the output can be fed to another file source (i.e. Fortran).
472
470
"""
@@ -513,22 +511,21 @@ def c_file_source(fp, relaxed=False, directives_only=False):
513
511
yield curr_line
514
512
515
513
total_sloc += curr_line .physical_reset ()
516
- if not relaxed and not cleaner .state == ["TOPLEVEL" ]:
514
+ if not cleaner .state == ["TOPLEVEL" ]:
517
515
raise RuntimeError (
518
- "Parser must end at top level without 'relaxed' mode." ,
516
+ "Parsing failed. Please open a bug report at: "
517
+ "https://github.com/intel/code-base-investigator/issues/new?template=bug_report.yml." , # noqa: E501
519
518
)
520
519
521
520
return (total_sloc , total_physical_lines )
522
521
523
522
524
- def fortran_file_source (fp , relaxed = False ):
523
+ def fortran_file_source (fp ):
525
524
"""
526
525
Process file fp in terms of logical (sloc) and physical lines of
527
526
fixed-form Fortran code.
528
527
Yield blocks of logical lines of code with physical extents.
529
528
Return total lines at exit.
530
- Relaxed allows for inconsistent state at the end of parsing, usefule for
531
- special composition cases.
532
529
"""
533
530
534
531
current_physical_line = one_space_line ()
@@ -593,9 +590,10 @@ def fortran_file_source(fp, relaxed=False):
593
590
yield curr_line
594
591
595
592
total_sloc += curr_line .physical_reset ()
596
- if not relaxed and not cleaner .state == ["TOPLEVEL" ]:
593
+ if not cleaner .state == ["TOPLEVEL" ]:
597
594
raise RuntimeError (
598
- "Parser must end at top level without 'relaxed' mode." ,
595
+ "Parsing failed. Please open a bug report at: "
596
+ "https://github.com/intel/code-base-investigator/issues/new?template=bug_report.yml." , # noqa: E501
599
597
)
600
598
601
599
return (total_sloc , total_physical_lines )
@@ -642,7 +640,7 @@ def process(self, lineiter):
642
640
pass
643
641
644
642
645
- def asm_file_source (fp , relaxed = False ):
643
+ def asm_file_source (fp ):
646
644
"""
647
645
Process file fp in terms of logical (sloc) and physical lines of ASM code.
648
646
Yield blocks of logical lines of code with physical extents.
0 commit comments