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

Unicode parsers #11

Open
dikmax opened this issue Aug 27, 2014 · 5 comments
Open

Unicode parsers #11

dikmax opened this issue Aug 27, 2014 · 5 comments

Comments

@dikmax
Copy link
Contributor

dikmax commented Aug 27, 2014

Current version of alphanum, upper, lower parser accepts only latin chars while Haskell's parsers accept all unicode chars.
I know that Dart doesn't have methods to test char agains unicode class, but we could implement it on our own but we can use http://www.unicode.org/Public/6.3.0/ucd/UnicodeData.txt to generate predicates which work with all unicode chars.

Does it makes sense? Or this shouldn't be part of parsers library?

@polux
Copy link
Owner

polux commented Aug 27, 2014

It definitely makes sense but IIRC the reason why Dart doesn't have methods to test char agains unicode class is because the generated javascript would be huge. The same concern applies to parsers. Maybe it could be in a separate library (in the same package, but in a separate library still) so that if you don't import it it doesn't end up blowing up the generated javascript. Or maybe such a predicate should be in another package even, so that it benefits everyone, and this separate library in the parser package would import the predicate from this other package.

@polux
Copy link
Owner

polux commented Aug 27, 2014

Ah, just found http://pub.dartlang.org/packages/unicode_helper. So we could definitely use that.

@polux
Copy link
Owner

polux commented Aug 27, 2014

Alternatively I (or you) could create a package parsers_unicode. I'm fine with both solutions, as long as it allows generating reasonably small JS files when one doesn't care about unicode.

@dikmax
Copy link
Contributor Author

dikmax commented Aug 27, 2014

I vote for separate library in same package. I'll try to implement this later.

@polux
Copy link
Owner

polux commented Aug 27, 2014

Cool, thanks for you interest and help!

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