grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

[Verilog] Issue with Verilog specify block and polarity operator

Open thechickenundertheroad opened this issue 2 years ago • 1 comments

When inside a specify block with a parallel_path_description the parser incorrectly handles a +: or -: This is because the +/-: is a defined operator in the Lexer. The polarity_operator defined inside the parser is not taking precedence over the lexer. +: should be taken as a polarity operator followed by a colon and not just PLCL

thechickenundertheroad avatar Jul 26 '23 13:07 thechickenundertheroad

Hi @thechickenundertheroad,

PLCL (+:) defined in the lexer is for range expressions. It would make no sense to produce two distinct tokens (+ and :) for this operator.

There is no rule in the grammar that would cause a +: or -: take precedence over a polarity_operator followed by :. They are used in different context.

msagca avatar Jul 26 '23 14:07 msagca