-
Notifications
You must be signed in to change notification settings - Fork 131
|||
should resolve a tie by choosing this
parser rather than q
#72
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
Milestone
Comments
I think you're probably right. Based on the comments, you'd expect it to only use q0 if this parser consumed fewer characters, but with the code the way it is, it accepts q0 if they consume the same number. Have you tried putting together a pull request with some test cases? |
Possible to alter the comment rather than the code, in the interest of maintaining the current behaviour? |
Philippus
added a commit
to Philippus/scala-parser-combinators
that referenced
this issue
Aug 15, 2018
PR #166 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if (next2.pos < next1.pos)
should beif (next2.pos <= next1.pos)
(or equivalentlyif (next1.pos >= next2.pos)
, which I feel is more readable and consistent with the specification that the ''longest'' is chosen.)The text was updated successfully, but these errors were encountered: