Skip to content

Extremely long run time with FortranLexer #2194

Closed
@mbraakhekke

Description

@mbraakhekke

The following lines take an inordinate amount of time to process with the FortranLexer:

foobar = 'foo'//'\'//'bar'
!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

See demo. The time increases with each added slash in the comment line.

As discussed in #1508, this is likely a catastrophic backtracking problem. The problem is linked to the issue with backslashes in string constants discussed in #1508, since replacing '\' with '\\' in the first line appears to result in a normal run time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions