Repository navigation
fix(sv): lex a colon before a comment as a colon - #1851
Merged
Merged
Conversation
The lexer matched the `:/` distribution-weight operator before looking for a comment, so `3'b000://comment` became `:/` followed by `/comment` and failed to parse. XuanTie C906 (openc906) uses this form in case items. A `:/` operator is always followed by an expression, and no expression starts with `/` or `*`, so a `:/` immediately followed by `/` or `*` now lexes as `:` and leaves the comment intact. IEEE 1800-2023 5.4 defines `//` and `/*` as comment starts; previously valid input is unaffected. Validation: - celox-sv-syntax: 122 tests passed, including a new lexer test; Clippy with -D warnings and formatting passed. - No sv-tests case at the pinned revision contains `:/` followed by `/` or `*`, so conformance expectations are unchanged. - The rtlmeter XuanTie-C906 sources now get past this parse error. Change-Id: Ia3b604411f360405318fefce2dede32249f1b8e6
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 1 hour 28 minutes 33 seconds in the queue, including 56 minutes 3 seconds running CI. Required conditions to merge
|
40 of 71 tasks
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.
The lexer matched the
:/distribution-weight operator before lookingfor a comment, so
3'b000://commentbecame:/followed by/commentand failed to parse. XuanTie C906 (openc906) uses this formin case items. A
:/operator is always followed by an expression,and no expression starts with
/or*, so a:/immediatelyfollowed by
/or*now lexes as:and leaves the comment intact.IEEE 1800-2023 5.4 defines
//and/*as comment starts; previouslyvalid input is unaffected.
Validation:
Clippy with -D warnings and formatting passed.
:/followed by/or*, so conformance expectations are unchanged.Change-Id: Ia3b604411f360405318fefce2dede32249f1b8e6