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

Replace Fastparse by Scala Parser Combinators #138

Merged
merged 6 commits into from
Mar 13, 2019

Conversation

alonsodomin
Copy link
Owner

The internal parser implementation based on Fastparse has becomed obsolete since the it moved to version 2.x, and support for Scala 2.13 and/or Scala Native will not happen for the 1.x version.

After several failed attempts on upgrading the parser to FastParse 2.x, I gave up due different reasons, from the new ackward syntax to change in behaviour of the actual parsers, which means that the whole parsing process needs to be re-written from scratch.

After playing with Scala Parser Combinators, I've seen that most of the code of the parser can be left unchanged while still preserving its original behaviour. Parser combinators already supports Scala Native and Scala 2.13-M5, so with this change we are one step closer to new Scala versions and in a more stable codebase.

@codecov-io
Copy link

codecov-io commented Mar 13, 2019

Codecov Report

Merging #138 into master will decrease coverage by 0.05%.
The diff coverage is 95.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
- Coverage   91.54%   91.49%   -0.06%     
==========================================
  Files          67       69       +2     
  Lines        1147     1187      +40     
  Branches       40       39       -1     
==========================================
+ Hits         1050     1086      +36     
- Misses         97      101       +4
Impacted Files Coverage Δ
...les/core/shared/src/main/scala/cron4s/errors.scala 85.71% <ø> (ø) ⬆️
.../shared/src/main/scala/cron4s/parsing/parser.scala 100% <100%> (ø)
...re/shared/src/main/scala/cron4s/parsing/base.scala 100% <100%> (ø)
...dules/core/shared/src/main/scala/cron4s/Cron.scala 100% <100%> (ø) ⬆️
...re/shared/src/main/scala/cron4s/Interpolator.scala 66.66% <66.66%> (ø) ⬆️
...e/shared/src/main/scala/cron4s/parsing/lexer.scala 89.47% <89.47%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5cdc8a...8da20b7. Read the comment docs.

@alonsodomin alonsodomin merged commit 8c4de8c into master Mar 13, 2019
@alonsodomin alonsodomin deleted the parser_combinators2 branch March 13, 2019 21:35
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