-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
constant_expression #788
Comments
I think it is diffucult problem whether an invalid code should be rejected syntactically or semantically. In my experience of implementing a SystemVerilog parser (https://github.com/dalance/sv-parser), Additionally, there is readability issue of error message. Therefore I chose the combination of simple syntax which accepts some invalid code and semantic checker which rejects the invalid code. |
I agree with you that SV syntax is overly verbose. I do, though, think a While this doesn't perform const checking at parsing, it does make it easy to implement the checking via a walker and implementing |
Thanks. I agree that |
SV contains the notion of a
constant_expression
:This is used in quite a few different parts of the grammar, including pattern matching, generate statements, enum declarations, port declarations, concatenations, etc.
I think it would be a good idea to replicate this in the Veryl syntax. Ensuring constness at the syntax level where it is highly documented and checked may be very useful. Further, this helps ensure that Veyl code will transpile to correct SystemVerilog code.
The text was updated successfully, but these errors were encountered: