-
Notifications
You must be signed in to change notification settings - Fork 474
Yet another batch of tests #295
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
Conversation
let num = digit+ | ||
let hexnum = "0x" hexdigit+ | ||
let nat = num | hexnum | ||
let int = sign nat |
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.
Would it make sense to make int
be sign? nat
, so that productions like literal
don't have to match both int
and nat
?
Also, what is nat
short for?
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.
Maybe "natural number"?
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.
@sunfishcode, tokens necessarily define disjoint lexical classes, so to carve out a subclass you need to union in the parser.
Yes, nat
is "natural".
Any opposition to landing these tests as well? |
Nope |
Merged into master manually, because Github. |
It was incorrectly using the non-saturing versions, leading to runtime traps.
This time:
Also, syntax now disallows signs for any numbers that are uints in the binary encoding.