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

Make ParserK and ParserD consistent #2459

Closed
harendra-kumar opened this issue Jul 24, 2023 · 4 comments
Closed

Make ParserK and ParserD consistent #2459

harendra-kumar opened this issue Jul 24, 2023 · 4 comments
Assignees
Labels
api:breaking Incompatible with existing releases
Milestone

Comments

@harendra-kumar
Copy link
Member

ParserK uses negative value for backtracking and positive for forward tracking. ParserD uses positive value for backtracking. We should use the same convention in both to not confuse users writing parsers from scratch. We should change ParserK to conform to ParserD.

@harendra-kumar harendra-kumar added this to the 0.10.0 milestone Jul 24, 2023
@harendra-kumar harendra-kumar added the api:breaking Incompatible with existing releases label Jan 12, 2024
@harendra-kumar harendra-kumar modified the milestones: 0.10.0, 0.11.0 Jan 12, 2024
@adithyaov
Copy link
Member

We should change ParserK to conform to ParserD.

Is this what we've decided? I remember we agreed on ParserK's convention. Or am I mistaken.
If we choose ParserD's convention, there is no way forward tracking anymore.

@adithyaov
Copy link
Member

Let's use the positive number for backtracking for the following reasons:

  1. More common to backtrack and not forward-track
  2. Changing ParserD might become more complicated as there are already a lot of users

@harendra-kumar
Copy link
Member Author

This is duplicate of #2433 which proposes an opposite solution.

@harendra-kumar
Copy link
Member Author

I am closing this in favor of #2433 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:breaking Incompatible with existing releases
Projects
None yet
Development

No branches or pull requests

2 participants