Re: [sv-bc] search rules for type vs interface

From: Paul Graham <pgraham_at_.....>
Date: Wed Jul 23 2008 - 11:17:44 PDT
I've never liked the syntax for interface-type ports.  Since
the interface does not need to be visible when the port is
parsed, there is no way for the parser to determine whether
an unrecognized identifier is an interface or a misspelling:

    module m(ouput q, inputt d);

You can't catch these silly typos until elaboration, when
you know the set of interfaces.

Requiring the keyword 'interface' before an interface-type
port allow the parser to detect typos earlier.  The keyword
'interface' would also serve as a sort of direction
indication (since a interface port can have elements with
different directions).

Paul

Greg Jaxon writes:
 > I misread the BNF.
 > As you say, the port_direction is optional.
 > So the context _is_ ambiguous, and only
 > a search order rule can resolve it.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Jul 23 11:18:24 2008

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2008 - 11:18:38 PDT