Mercurial > lcfOS
diff doc/compiler.rst @ 299:674789d9ff37
Added a doc
author | Windel Bouwman |
---|---|
date | Sun, 01 Dec 2013 18:37:23 +0100 |
parents | a6f61e9a9d5c |
children | 158068af716c |
line wrap: on
line diff
--- a/doc/compiler.rst Sun Dec 01 17:45:22 2013 +0100 +++ b/doc/compiler.rst Sun Dec 01 18:37:23 2013 +0100 @@ -35,21 +35,14 @@ 30 -> 40 } + IR-code ------- -The IR-code is implemented in the ir package. - -.. autoclass:: ir.Module - -.. autoclass:: ir.Function +The intermediate representation (IR) of a program de-couples the front end +from the backend of the compiler. -.. autoclass:: ir.Block - -.. autoclass:: ir.Statement +See ir for details about all the available instructions. -.. autoclass:: ir.Expression - -.. # .. inheritance-diagram:: ir.Statement C3 Front-end ------------ @@ -60,21 +53,17 @@ .. graphviz:: digraph c3 { - rankdir="LR" 1 [label="source text"] 10 [label="lexer" ] 20 [label="parser" ] 30 [label="semantic checks" ] 40 [label="code generation"] 99 [label="IR-code object"] - 1 -> 20 + 1 -> 10 + 10 -> 20 20 -> 30 - 30 -> 40 + 30 -> 40 [label="AST tree"] 40 -> 99 - subgraph rel1 { - edge [dir=none] - 10 -> 20 - } } .. autoclass:: c3.Builder