-
Notifications
You must be signed in to change notification settings - Fork 66
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
core.exception.ArraySliceError@pegged\pegged\peg.d(1930): slice [0 .. 18446744073709551612] extends past source array of length 0 #333
Comments
Just arrived at my hotelroom after beerconf, so I am not fit to go into much detail. But looking at the source https://github.com/PhilippeSigaud/Pegged/blob/31e02e22e075a37434354a26ef5d1dd8f58808e5/pegged/peg.d#L1930C25-L1930C25 it appears the length of I fixed a similar error in #325. Maybe this is enough info for you to fix this by yourself, and I'll gladly accept a pull request. Otherwise I may find some time tomorrow during the DConf hackathon. |
@veelo Wouldn't Pegged report if my grammar was invalid? I'm pre-generating the code via |
By the way, if you get your grammar to work, it would be nice to include it as an example, if you like. |
I'd be happy to, though I'll probably want to trim the AST a lot before I do (the AST is probably going to be pretty big). |
Yes, it is during the reporting that Pegged messes up. |
Apply same fix as in dlang-community#325. Fixes dlang-community#333 ArraySliceError.
I've tagged a new release: v.0.4.9. It should show up on Dub later today. Please let me know if this resolves the problem. |
@veelo I'll let you know if it (doesn't) work once Dub has it. Thank you! |
I've no idea what I'm doing wrong here, but this is incredibly confusing.
For context, I'm writing a parser for the Ada grammar, I might be misrepresenting a rule but I don't think so (this appears to be in pegged itself). I'm using v 0.4.8. Has anyone else encountered this problem?
The text was updated successfully, but these errors were encountered: