Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for converting regex_syntax::ast::Ast to NFA; Deprecate the old navie AST. #9

Merged
merged 6 commits into from
Dec 13, 2024

Conversation

LinZhihao-723
Copy link
Contributor

@LinZhihao-723 LinZhihao-723 commented Dec 12, 2024

Description

This PR deprecates the old naive AST; instead, we use regex_syntax::ast::Ast as our regex AST representation and add support for converting an AST into an NFA.
Notice that not all AST node types are currently supported yet; we support all types needed to build our demo. The current code structure should be very easy to extend for other AST node types.

Validation performed

  • Add unit tests to ensure the NFA conversions for supported AST nodes are as expected.
  • Ensure DFA's existing unit tests worked with new NFA implementation

@LinZhihao-723 LinZhihao-723 marked this pull request as ready for review December 13, 2024 00:27
@Louis-He Louis-He merged commit fd33c09 into Toplogic-Inc:main Dec 13, 2024
2 checks passed
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.

2 participants