When processing C code, there are no namespaces/modules, since this is not intrinsically part of the language.
In C, modules are often denoted using a prefix of the abbreviation of the library, eg. ggi_, gg_, gii_ (for types) and GGIFunction (for functions) - eg. in libggi. Modules could therefore be formed based on a regex, or perhaps on specific listed names.
The other potential way of getting namespaces in C could be to rely on files - if you include a file, you introduce the things declared/defined in that file. Therefore rather than applying the filter/regex/whatnot to partioning the global namespace, it may be useful to be also able to filter or label based on files, ie. all symbols (?) from a certain file/directory/tree are set to be in a given namespace.
The former would be useful to weed out any functions that do not comply with any naming policy (explicit or implicit), but the latter is far more practical. |