Functions related to a module's namespace.
BOZO this is generally obviated by scopestack. New code shouldn't be written using modnamespace.
Namespaces are discussed in Section 4.11 of the Verilog-2005 standard. In particular, note that ports and port declarations are given special treatment: they are said to be in a separate namespace which "overlaps" the regular module namespace.
I think this distinction is only made so that you can refer to both ports and to items in the regular module namespace from expressions, etc. The important consequence of this is that it is legal to write things such as:
input x ; wire x ;
Even though it would be illegal to declare x to be a wire twice, or as both a wire and a reg, and so on.
At any rate, in this file we introduce a number of routines for extracting the names from lists of port declarations, net declarations, and so on. These culminate in
(VL-MODULE->MODNAMESPACE X) : MODULE -> STRING LIST
Which returns a list of all names found in the module's namespace. Note that any reasonable module is required to have a unique modnamespace.
BOZO this does not get named blocks. Unclear how nested blocks are supposed to be handled. We do at least get function and task names, and names from events.