Skip to content

Core Parse: Legacy Fortran 77 Fixed-Format Positional Pre-processor #3977

Open

Description

@squid-protocol

The Defect

Our current fortran.py registry claims backwards compatibility with Legacy F77, but its regexes rely on modern free-format assumptions (e.g., expecting [ \t]+ between SUBROUTINE and the function name).
Real Fortran 77 ignores whitespace entirely (SUBROUTINEFOO is valid) and uses Column 6 for line continuations. When standard line-by-line regex evaluates these files, it completely misses fragmented or unspaced procedural boundaries.

Required Action

Implement a lightweight positional pre-processor for .f / .f77 extensions. Before evaluating regexes, the pre-processor must:

  1. Detect line continuations (any non-blank/non-zero character in Column 6) and stitch the strings together.
  2. Strip sequence numbers (Columns 73-80).
  3. Strip all internal whitespace from the statement field (Columns 7-72).
  4. Run a normalized regex against the tightly packed string to guarantee 100% boundary extraction for DoD/Aerospace legacy estates.

Activity

  1. added
    enhancement
    on Sep 28, 2026
  2. added
    scope:frontier
    on Oct 16, 2026
  3. added
    legacy-modernization
    priority: low
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlegacy-modernizationpriority: lowscope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions