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

Resolve "Rejected valid signal name" #2102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matlupi
Copy link

@matlupi matlupi commented Feb 6, 2024

Close #2076: add analog as potential AMS-dialect word in parser according to #2076 (comment)

@matlupi
Copy link
Author

matlupi commented Feb 6, 2024

Added testcase for #2076

@hzeller
Copy link
Collaborator

hzeller commented Feb 8, 2024

This creates a shift-reduce conflict, so the grammar probably has to be massaged more.

@matlupi
Copy link
Author

matlupi commented Feb 15, 2024

This creates a shift-reduce conflict, so the grammar probably has to be massaged more.

Any hint on where to try to investigate it?

@hzeller
Copy link
Collaborator

hzeller commented Feb 15, 2024

This is essentially an ambiguity in the grammar where the parser might not be able to decide. One problem is, that now TK_analog is part of multiple rules, and these rules might both be matched. Next step would probably to check the original location of where Tk_analog and see if it can be replaced with KeywordIdentifier and still keep the semantics.

There are probably also a bunch of resources 'on the net' for shift/reduce conflicts resources.

@hzeller
Copy link
Collaborator

hzeller commented Feb 15, 2024

There should be a file generated in bazel-bin/verilog/parser/verilog.output which might be helpful

@fangism
Copy link
Collaborator

fangism commented Feb 15, 2024

The verilog.output file is a "human-readable" state machine of the parser, which explains how conflicting states are reached.

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.

Rejected valid signal name
3 participants