Private project case study
C Block Tracer
A CLI static-analysis tool for nested C-like scopes, declarations, initializations, and shadowing conflicts.
C · Parsing · Static analysis
- Chained symbol tables
- O(1) average lookup
- 50+ tests in project notes

01 / Problem
The constraint
Resolve identifiers to the correct enclosing scope and explain shadowing without confusing a parser subset with a complete C compiler.
02 / Structure
Architecture at a glance
- Source → lexer / parser
- Scope stack + chained hash maps
- Declaration / shadowing diagnostics
03 / Implementation
Engineering decisions
- A lexer and parser recognize the supported subset of C.
- A stack models nested block scopes, with hash maps for declarations and enclosing-scope lookup.
- CLI diagnostics report declarations, initializations, re-declarations, and shadowing conflicts.
04 / Evidence
Measurement context
Based on author-supplied project notes. The 50+ unit-test count has not been independently counted from a public repository. O(1) refers to average hash-map lookup, not a worst-case guarantee.
05 / Trade-offs
Limits worth stating
- The supported grammar is a subset, not a standards-complete C implementation.
- Hash collisions and scope depth affect actual lookup costs.
- Project notes describe tests for nested blocks, re-declarations, and forward references.