[sv-bc] precedence of :/ vs. //

From: Paul Graham <pgraham@cadence.com>
Date: Mon Aug 23 2004 - 08:28:17 PDT

SystemVerilog introduces the :/ operator. This creates a potential
ambiguity when combined with comments. For instance:

    case (x)
        2'b00:// this is a comment

A naive lexer will see the ':' and the '/' characters next to each other and
return the :/ operator. This will lead to a syntax error.

Correct handing of the :/ operator requires some context-awareness in the
lexer.

Paul
Received on Mon Aug 23 08:28:21 2004

This archive was generated by hypermail 2.1.8 : Mon Aug 23 2004 - 08:28:30 PDT