-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add text parser. #11
Add text parser. #11
Conversation
Hi there! I expect I will have some time over this weekend to review this. I'll also put some thought into the other topics you mentioned here. Thanks for the contribution! |
Yep! Cleaned it up a bit more tonight. Couple other notes I wanted to mention:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew! That was a large pull request indeed. Many thanks for the significant effort that clearly went into this!
I can tell by some of the comments that you ran up against some of the broken edges of the specification and tests. It would be great if you could open issues about the errors you found against the spec. If you'd rather not, please respond with a bit more detail to some of the comments I left, and I'll get around to it. I did open one already, because it's relevant to the code in this pull request. Badgering the Ion maintainers is becoming something of a trend for this project.
I wasn't able to study everything in as much detail as I would have liked and still get the review done over this weekend, but I did get through everything. I left an enormous pile of comments, but I don't want that to detract from how appreciative I am of the effort here. There are a lot of comments because there is a lot of code! Pretty much all of the comments are about style, a few are about correctness. Let me know what you think, a lot of them involve questions for you.
I'm a fan of the Google CR guide, and I'd be happy to merge this as-is and then make the changes I asked after myself. But this can sometimes make people grumpy, or cause them to feel disrespected, so I'd be happy for you to weigh in on my suggestions.
Thanks again! :)
Some combination of extremely long lines and possibly many comments seems to have screwed up the github discussion UI. I recommend looking through the PR itself to see what sections the comments actually refer to. |
Probably should have commented on this earlier, but yeah that all sounds fine. As evidenced by my activity I'd like to polish it up. I think at this point I've got most of the items sorted out that aren't dependent on either input from you or an issue with the Ion team. There's a couple loose ends I'm working on (for example I just filed this: amazon-ion/ion-tests#65) to avoid a different commit for the tests subproject, but I expect to have that squared away in the next couple minutes. |
Apologies, didn't mean to request a review. Finger got heavy at the wrong moment, doesn't seem to be a way to cancel it. :) |
Alright, I think this is cleaned up enough and aligns with the discussion in issues #12 and #13. Of course if I missed anything feel free to add an issue and I'll keep an eye on them, or just change it if you prefer. I'd also like to add some issues for some specific tasks I'm considering or that we've identified (I'd like to continue working on this crate, I'm currently using bincode as a stop-gap in a personal project). |
Looks pretty good to me! Is there anything else you are planning to revise in this PR? This has gotten large enough and touches enough parts of the code that I'm cautious about causing merge conflicts with other changes. |
Yeah, I think any other revisions should be separate, too much is outstanding and I definitely don't want to hold you back. :) Seems like this should be a good start for the text side though. |
Sounds good to me, and yes, certainly a very significant expansion of the crate's functionality! One last thing remains. Can you confirm for me that you are the copyright holder of these changes, and that you are contributing them in accordance with the dual MIT/Apache-2.0 license of this crate? |
I am, and yes. |
Excellent |
Fixes issue #10.
Alright, here's the parser. I've still got some qualms with it but I wanted to get a CR up so we could start a discussion.
I basically translated the ANTLR grammar directly and included snippets of it where appropriate (similar to what exists in binary.rs). Perhaps not as important compared to the binary format, but I thought it would be helpful when reading. The code is laid out in the same order as the text encoding. I haven't integrated other text from the Ion spec but it is probably worth doing to explain the behavior in some locations.
Some items I'm thinking about:
Anyway, excited for some feedback. Thanks for taking a look!
@PeytonT