Repository navigation
fix(sv): join based-literal digits supplied by a macro - #1852
Merged
Merged
Conversation
A based literal whose digits come from a macro, such as `5'd`TDT_DM_PB_SIZE` in XuanTie C906, left the digits in separate tokens after expansion and was rejected as an invalid numeric literal. IEEE 1800-2023 5.7.1 lets the value follow the base format after optional white space. When a literal ends at its base, the parser now appends the following digit tokens; a macro body such as `0f` lexes as `0` and `f`, so tokens adjacent in their spelling are joined too. Validation: - celox-sv-syntax: 121 tests passed, with new cases for decimal, hex, signed binary and split hex digit macros and the compact expression value; Clippy with -D warnings and formatting passed. - No sv-tests case at the pinned revision has a base format followed by a macro, so conformance expectations are unchanged. Change-Id: I36ee2d3897db10b757989f5a565ba6e6b2a792a2
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Merge Queue Status
This pull request spent 2 hours 8 minutes 37 seconds in the queue, including 1 hour 32 minutes 15 seconds running CI. Required conditions to merge
|
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A based literal whose digits come from a macro, such as
5'dTDT_DM_PB_SIZEin XuanTie C906, left the digits in separate tokens after expansion and was rejected as an invalid numeric literal. IEEE 1800-2023 5.7.1 lets the value follow the base format after optional white space. When a literal ends at its base, the parser now appends the following digit tokens; a macro body such as0flexes as0andf`, so tokens adjacent in their spelling are joined too.Validation:
signed binary and split hex digit macros and the compact expression
value; Clippy with -D warnings and formatting passed.
a macro, so conformance expectations are unchanged.
Change-Id: I36ee2d3897db10b757989f5a565ba6e6b2a792a2