Skip to content

Generate aliases for use by string parser. #4572

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

Closed
wants to merge 4 commits into from

Conversation

DimitrisJim
Copy link
Member

A temporary fix for #4566 so as to not hold back the parser. (This only covers the string parser for now, not unicodedata).

@DimitrisJim
Copy link
Member Author

DimitrisJim commented Feb 25, 2023

I can open another issue to keep track of the permanent fix for this (and for unicodedata), either pulling these aliases into a separate little crate or eventually adding them to unicode_names.

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

is this doing the same thing?
49adb5c

Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
@DimitrisJim
Copy link
Member Author

DimitrisJim commented Feb 25, 2023

is this doing the same thing? 49adb5c

does that compile? that's basically what I was wanted to go with but there's some characters that need to be escaped or else phf can't really generate the map correctly for them.

@youknowone
Copy link
Member

youknowone commented Feb 25, 2023

Yes, that does compile and working well at least for BACKSPACE.
include_str! obtains the whole file content as a valid str. And I didn't put them in source code but handled only with string operations. I think something similar like this version can be filed as patch to unicode_names2

@DimitrisJim
Copy link
Member Author

DimitrisJim commented Feb 25, 2023

Yes, that does compile and working well at least for BACKSPACE.

Ah then push it through to here, I have no issue.

I think something similar like this version can be filed as patch to unicode_names2

I still am not sure for this since they already have the data in UnicodeData.txt and they use their own implementation of phf (as far as I can tell). But if you wanna close this PR and go with the patch to unicode_names2 I'd be fine with that too.

@youknowone
Copy link
Member

wow, i didn't know their phf is their own's.

@youknowone
Copy link
Member

I tried to add alias, but I found unicode_names2 cannot regenerate master branch's output using the same version of generator 😂
directly putting your version seems more realistic

@DimitrisJim
Copy link
Member Author

Close in favor of #4582

@youknowone
Copy link
Member

We still need the tests from here, right?

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