Skip to content

Add regex engine and persistent data structures - #5

Open
takeokunn wants to merge 2 commits into
mainfrom
takeokunn-regex-persistent
Open

takeokunn wants to merge 2 commits into
mainfrom
takeokunn-regex-persistent

Conversation

@takeokunn

Copy link
Copy Markdown
Contributor

Summary

  • add a dependency-free regular expression compiler and backtracking matcher
  • add structurally shared persistent vectors and immutable persistent maps
  • export the runtime APIs and add focused tests

Supported regex scope

  • literals, concatenation, alternation, grouping
  • *, +, ? repetition
  • ., character classes with ranges and negation
  • \\d, \\D, \\w, \\s, escaped literals
  • ^ and $ anchors, full-match and first-match search

This intentionally does not implement captures, backreferences, lookaround, or other advanced regex extensions.

Verification

  • nix run .#test (1060 passed, 0 failed, 0 errored)
  • nix flake check (all checks passed)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant