Language record
C
C is indexed with the parts a static reader usually loses: a struct's field set and its memory layout are computed from the declarations in the file, a function-like macro becomes a macro symbol rather than a mystery, and an EXPORT_SYMBOL(...) marker is read as the export it is.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .c, .h
- Registry names
c- Recorded symbols
- functions · structs · enums · types
Relationship types this analyzer constructs
9 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | constructed by this analyzer |
extends | ruled absent |
implements | ruled absent |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | constructed by this analyzer |
decorates | ruled absent |
renders | ruled absent |
mixes_in | ruled absent |
part_of | constructed by this analyzer |
9 constructed, 5 not constructed. All 5 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- C has no class heritage, so there is no extends, implements or override edge to draw. What the format does offer is containment, and it is computed from the declarations in the file.
- A macro-generated member is unrecoverable: in #define BIT(x) int x : 1 the member name depends on the replacement list, so the declaration is recorded as partly unmeasured rather than given an invented name.
- Cross-translation-unit resolution is not attempted. An allocation cast to a type declared in another header is still recorded as a call, but no size, field or signature is resolved from it.
Every line above was written against C’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .c, .h. Everything below is about where those files actually sit in a working repository.
- A C project is mostly headers: one struct is declared once and used in a dozen .c files, so bb records the declaration and reads the uses as references.
- Feature detection is a wall of #if blocks, so a declaration that only exists on one platform is still parsed and published.
- Generated C — parser output, protobuf, configuration headers — is indistinguishable from a hand-written file to any static reader.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- How large is this struct, and which fields does it have?
- Which symbols does this file export to other modules?
- Which macros does this file define?
- Which members does this flag enum carry?
What the analyzer sees in code like this
struct flags { // bb records: struct flags
unsigned int a : 1; // bb records: property a
unsigned int n; // ...and the computed size of the struct
};
EXPORT_SYMBOL(my_init, GPL); // bb records: my_init as an export
int my_init(void) { return 0; }Symbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Application & systems — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for C, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.