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

Parser improvements from #756 #1625

Merged
merged 2 commits into from
Dec 27, 2023
Merged

Conversation

bernardnormier
Copy link
Member

This PR applies the parser (including grammar) improvements from #756.

#756 also added new types (unsigned and varints), but this PR doesn't add them.

Copy link
Member

@externl externl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@InsertCreativityHere InsertCreativityHere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just minor things, or things I think should of been kept from #756.

cpp/src/Slice/Grammar.y Outdated Show resolved Hide resolved
Comment on lines +414 to +415
"byte",
"bool",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be nice to swap these like #756 did, and like this PR does in the keyword list.
It felt more logical to me to have all the numeric types together instead of bool in the middle of them.

Suggested change
"byte",
"bool",
"bool",
"byte",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you would have to also swap the order of the Kind enumerators to match, since we depend on the ordering. But I think that the order should be swapped there anyways.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather leave this swap to another PR as I would need to update the code generators accordingly.

cpp/src/Slice/Parser.cpp Show resolved Hide resolved
cpp/src/Slice/Parser.cpp Show resolved Hide resolved
@bernardnormier bernardnormier merged commit 9b6ec81 into zeroc-ice:main Dec 27, 2023
2 checks passed
@bernardnormier bernardnormier deleted the parser-756 branch May 10, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants