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

[Leo] Add hexadecimal, octal, binary numerals. #70

Merged
merged 7 commits into from
Nov 1, 2024
Merged

Conversation

acoglio
Copy link
Collaborator

@acoglio acoglio commented Oct 21, 2024

This passes all the usual ACL2 checks.

@acoglio acoglio requested a review from bendyarm October 21, 2024 16:24
Based on discussion at Leo sync.
leo.abnf Outdated Show resolved Hide resolved
leo.abnf Outdated Show resolved Hide resolved
leo.abnf Outdated Show resolved Hide resolved
Copy link
Collaborator

@bendyarm bendyarm left a comment

Choose a reason for hiding this comment

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

Added some suggested changes.
Also we should think more about how to handle negative literals such as i8
and field and scalar and maybe group (group coordinate has a literal "-", is group coordinate still used?).
If we are handling them as unary minus operator, it looks to me like the grammar doesn't support that.

acoglio and others added 4 commits October 21, 2024 11:46
Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com>
Signed-off-by: Alessandro Coglio <2409151+acoglio@users.noreply.github.com>
Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com>
Signed-off-by: Alessandro Coglio <2409151+acoglio@users.noreply.github.com>
Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com>
Signed-off-by: Alessandro Coglio <2409151+acoglio@users.noreply.github.com>
@acoglio acoglio requested a review from bendyarm October 21, 2024 18:51
@acoglio
Copy link
Collaborator Author

acoglio commented Oct 21, 2024

Group coordinates are still in use.

leo.abnf Show resolved Hide resolved
@acoglio acoglio requested a review from bendyarm October 22, 2024 00:50
Copy link
Collaborator

@bendyarm bendyarm 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!

@bendyarm bendyarm marked this pull request as ready for review October 22, 2024 04:01
@acoglio acoglio requested review from d0cd and mikebenfield October 22, 2024 04:08
@@ -375,7 +394,8 @@ unary-expression = postfix-expression
/ "!" unary-expression
/ "-" unary-expression

cast-expression = unary-expression %s"as" named-primitive-type
cast-expression = unary-expression
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious; was cast-expression previously not including a plain unary-expression alternative just an oversight?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, an oversight indeed. It was not following the same hierarchical pattern as the other kinds of expressions.

@mikebenfield
Copy link
Collaborator

lgtm

Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

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

LGTM!

@acoglio acoglio merged commit d350432 into master Nov 1, 2024
1 check passed
@acoglio acoglio deleted the feat/hex-bin-oct branch November 1, 2024 16:51
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.

4 participants