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

rewrote squeeze in Rascal with reified classes #2002

Merged
merged 17 commits into from
Nov 21, 2024
Merged

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Jul 17, 2024

  • this passes the type-checker now with the latest release; it had an intricate issue with type parameters of the type[..] constructor that was resolved.
  • it reuses the #[a-z] character class notation instead of strings for the second parameter of squeeze
  • it reuses @DavyLandman's visit-style pure Rascal implementation of squeeze
  • this PR also fixes several serious issues (unimplemented unicode and ascii escapes, and problems with unicode characters) in character-class reification code. These issues were triggered by the tests of the squeeze function.
  • have to remove some accidental commits in documentation strings of the vis::Graphs module before we merge.
  • also fixes char-class type reificiation does something wrong for high surrogate/low surrogate pairs #2009
  • also fixes the notation for literal symbols and case-insensitive literal symbols (all the same as character classes)

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 17.85714% with 23 lines in your changes missing coverage. Please review.

Project coverage is 49%. Comparing base (1690da7) to head (2b24936).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...org/rascalmpl/values/parsetrees/SymbolFactory.java 17% 23 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2002   +/-   ##
=======================================
  Coverage       49%     49%           
- Complexity    6309    6322   +13     
=======================================
  Files          664     664           
  Lines        59633   59584   -49     
  Branches      8648    8640    -8     
=======================================
+ Hits         29486   29497   +11     
+ Misses       27938   27877   -61     
- Partials      2209    2210    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@jurgenvinju jurgenvinju marked this pull request as ready for review November 20, 2024 20:20
Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

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

LGTM

@jurgenvinju jurgenvinju mentioned this pull request Nov 21, 2024
@jurgenvinju
Copy link
Member Author

This now also fixes the other issues identified in #2009 and some more because of better testing (especially now character escaping works the same for literals, ci-iterals and character classes). The \f case has to be fixed in vallang.

@jurgenvinju jurgenvinju removed the request for review from PaulKlint November 21, 2024 10:28
@jurgenvinju
Copy link
Member Author

@PaulKlint Davy has looked at it and the PR I merged into this was also reviewed already. Many more tests were added; I think the compiler will not have issue with those.

@jurgenvinju jurgenvinju merged commit edfb516 into main Nov 21, 2024
6 of 7 checks passed
@jurgenvinju jurgenvinju deleted the squeeze-charclass branch November 21, 2024 10:29
@DavyLandman
Copy link
Member

@jurgenvinju

The \f case has to be fixed in vallang.

it has been, just not released a new version of vallang yet.

@jurgenvinju
Copy link
Member Author

Check!

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.

char-class type reificiation does something wrong for high surrogate/low surrogate pairs
2 participants