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

Consider add support for UCD(Unicode Character Database) rule pattern #68

Closed
skylerlee opened this issue Sep 29, 2022 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@skylerlee
Copy link

I think it would be good to add unicode support either by using builtin rules (eg. UPPERCASE_LETTER | LOWERCASE_LETTER) like pest or using unicode property regex pattern (eg. \p{Lu} | \p{Ll}).

I guess an external library like pcre will be added or an embeddable code header file will be needed.

@arithy
Copy link
Owner

arithy commented Apr 14, 2024

I'm sorry for my late late late response.
I understand your suggestion, and I think also there should be the needs.
However, I want to keep PackCC an implementation with a single source file without depending on any external libraries other than the C standard library. It's because of just my egotistic preference, not rational reasons.
So, I'm thinking of the way to realize it with introducing import functionality, which was requested in #50 .

@arithy arithy self-assigned this Apr 14, 2024
@arithy arithy added the enhancement New feature or request label Apr 14, 2024
@arithy
Copy link
Owner

arithy commented Apr 21, 2024

@skylerlee , I have introduced the import functionality, and bundled some import files.
I think your needs can be satisfied using unicode_general_category.peg.
For example, if you need the rule that matches a sequence of uppercase letters, you can do it by inserting the following lines in your PEG file:

%import "unicode_general_category.peg"

rule_uc <-  Unicode_Uppercase_Letter +

Note that you must add the directory where unicode_general_category.peg is located to the import search path using the packcc command line option -I or the environment variable PCC_IMPORT_PATH. For more details, see README.md.

@arithy
Copy link
Owner

arithy commented Apr 25, 2024

@skylerlee , I'd like to close this issue with the above.

@arithy arithy closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants