-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
scribble lexer returns an empty token #14
Comments
I think the problem is line 195 of One possible solution is to make that line
This change would also fix a problem with an Meanwhile, I think the |
It looks like a small variation on that change fixes the bug identified here. Concretely, these changes the tests pass (which includes a new one covering the test found by random testing):
But, unfortunately, adding
This doesn't seem to be an issue with line 40, tho, because |
Oh, and actually I'm not sure that this added test case is correct -- the actual scribble reader doesn't seem to like |
I think the test on line 275 fails because the test assumes that the "at" character is not I guess line 40 works out in the case of I don't think any part of |
Oh! I totally didn't realize that
I think I'm with you, but here's my reasoning and a suggested change. First off, it looks to me like this one doesn't have the multi-byte problem because it is a string regexp. Looking over the syntax for regexps, anything that matches the Staring at the grammar, I think that what happens with
(where I'm leaving out all the other stuff in the set that follows.) Given all that, what do you think about changing that line 40 from this:
to this:
that is, if we have a |
When I run this program:
I get a read error: "unbalanced (probably) Relatedly, in this program:
I see an arrow from the definition of |
For line 40, I think For the |
The test cases all pass when I make that change, but I also see that they pass when I change I see what you're saying about |
This was found by random testing.
Here's the (non-random) test case that illustrates the bug. The function
try
should never raise an error (it is a simplification of the checks done by the option in the contract). The stringbig-s
is the one that drdr found and it shrinks to"^|{|\\"
.The text was updated successfully, but these errors were encountered: