Compiler File Organization in C++

Driver (main) include parser.h
instantiate parser
Call parser (input filename)

Parser

include lexical_analyzer.h
include semantic_actions.h
instantiate lexical analyzer
instantiate semantic actions

Lexical Analyzer

include charstream.h

Semantic Actions

include symbol_table.h
instantiate global symbol table
instantiate (and destroy) local symbol table as needed