Skip to content

+[fancy-regex] Added support for advanced regular expressions - #326

Merged
akshayrane merged 29 commits into
aws-cloudformation:mainfrom
akshayrane:advanced_re
Feb 6, 2023
Merged

akshayrane merged 29 commits into
aws-cloudformation:mainfrom
akshayrane:advanced_re

Conversation

@akshayrane

Copy link
Copy Markdown
Contributor

Issue #, if available:
Internal, TIX-212

Related work:

Description of changes:
Added support for advanced regular expressions that support features such as look-ahead and look-behinds.

Replaced the standard regex crate with fancy-regex since the latter uses a hybrid approach and automatically delegates the basic regular expressions to the native engine.

Source fancy-regex:

The fundamental idea is that it's a backtracking VM like PCRE, but as much as possible it delegates to an "inner" RE engine like RE2 (in this case, the Rust one). For the sublanguage not using fancy features, the library becomes a thin wrapper.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@joshfried-aws joshfried-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of it looks great to me. Left 2 comments on some stuff I'd like to further clarify before merging.

Comment thread guard/src/commands/validate/common.rs Resolved
Comment thread guard/src/rules/parser_tests.rs Resolved
@akshayrane
akshayrane merged commit 9d761aa into aws-cloudformation:main Feb 6, 2023
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.

3 participants