Hasty Briefsbeta

Show HN: Cdecl-dump - represent C declarations visually

3 days ago
  • #C programming
  • #debugging
  • #command line
  • Dump C declarations visually on the command line using `./cdecl-dump` with various examples.
  • Build the program using `./build.sh` for a debug build with additional parsing stage tracing.
  • Use `DEBUG=0 ./build.sh` to produce an optimized executable.
  • The program has some limitations: it doesn't strictly validate declarators, allowing functions to return arrays and arrays to have functions as elements.
  • Only built-in types are supported; types like `size_t` or `uint64_t` are not accepted.
  • The program utilizes a hand-written, table-driven lexer and parser.