Projects15 of 15
Compiler symbol table
Scoped name lookup for a lex and yacc/bison front end
What it does
A scoped symbol table for a compiler front end, written with lex and yacc/bison.
How it works
- Lookup. A hash table that hashes the sum of a name’s characters modulo the bucket count.
- Scopes. A scope stack, kept through parent pointers.
- Where names land. A
scope_startedflag with mid-rule actions, so function parameters land inside the function’s scope, whileifandforblocks get scopes of their own.
Portable
It builds and runs on both macOS and Linux.