- sdcc/src/src/SDCC.lex
- compiled using lex (flex?)
- generates the lexer which is what recognizes groups of
characters as "words" (tokens)
- sdcc/src/src/SDCC.y
- compiled using bison (alternative to yacc)
- generates the parser which takes the output of the lexer and attempts to fit them into the defined grammar
- additional target dependent "hooks":
- port->keywords for the "extra" port-dependent keywords
- initialized usually in sdcc/src/src/[port]/main.c
- passed via _ports in sdcc/src/src/SDCCmain.c
- port->process_pragma
- enables target-specific #pragma-s
- transforms C source into AST (annotated source tree or abstract source tree)
- flow: ???
- output from SDCPP preprocessor
- AST - a binary tree located in memory.
- struct for it is defined in src/SDCCast.h.
- use --dumptree compiler option to show what is in the tree