|
File BigPicture.html Author McKeeman Copyright © 2007 index Putting it all TogetherOverviewThe action starts with a context-free grammar X.cfg and the C runtime.
Preparation
*.c -> makeMex.m -> MEX -> *.mexw32
X.cfg -> makeCfg.m
|
v
Cfg.m -> cfg.mat
Front end
*.x -> xcom.m
| <-- source text
v
Lexer.m
| <-- token stream
v
Parser.m
/ \
bottomup topdown <-- shift/reduce sequence
\ /
Tree.m
/ \
syntax AST <-- tree
\ /
Symbols.m
| <-- symbol table
v
Back end
| | <-- symbol table and tree
v v
Generator.m
| <-- semantic actions
v
EmitX86.m
| <-- symbolic hardware instructions
v
AsmX86.m
| <-- hex hardware instructions
v
Runtime
| <-- user input
v
xcom.m
/ \
EmulateX86.m RunX86.c
\ /
xcom.m
| <-- user output
v
|