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

[Feture Request] Integration with CTRE #51

Closed
cgbsu opened this issue Sep 4, 2022 · 3 comments
Closed

[Feture Request] Integration with CTRE #51

cgbsu opened this issue Sep 4, 2022 · 3 comments

Comments

@cgbsu
Copy link

cgbsu commented Sep 4, 2022

CTRE is a dedicated Compile Time Regex library, as such it seems to have more regex features, and supports unicode, would it be possible to integrate it into CTPG?

@peter-winter
Copy link
Owner

It is already possible to use an external lexer (in fact regex parser in ctpg already uses an external lexer and ctpg generated parser), but the feature is not documented at all yet.
So it is possible to use CTRE.
Maybe a slight adjustment would be necessary but this shouldn't be to hard to expose external lexer as an official feature.
This is definitely something I would like to add in near future.

If you feel adventurous examine the regex::regex_lexer class and the use_lexer struct.

@peter-winter
Copy link
Owner

I forgot there is actually an example: custom-lexer.cpp

@peter-winter
Copy link
Owner

The custom lexer is now an official feature, you can easily integrate ctre.

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

No branches or pull requests

2 participants