Skip to content
This repository was archived by the owner on Feb 5, 2023. It is now read-only.
This repository was archived by the owner on Feb 5, 2023. It is now read-only.

endless recursion on evil regexp #3

@yiminghe

Description

@yiminghe

try

let regex = try Regex("(a*)*b\\1")
regex.isMatch("ac");

I try to fix this in my js version by recording state, current input index and cache its match result: https://github.com/yiminghe/kison/blob/2001ac972e77251e0e6ee00a8e7fee126765fa4b/examples/regexp-ll/src/match.js#L3, what's your opinion?

PS: I know it's created for learning purposes, this issue is only for discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions