-error.c
- This is the error subsystem, this handles the output of good detailed
- error messages (not currently, but will), with colors and such.
-
-lex.c
- This is the lexer, a very small basic step-seek lexer that can be easily
- changed to add new tokens, very retargetable.
-
-main.c
- This is the core compiler entry, handles switches (will) to toggle on
- and off certian compiler features.
-
-parse.c
- This is the parser which goes over all tokens and generates a parse tree
- and check for syntax correctness.
-
-typedef.c
- This is the typedef system, this is a seperate file because it's a lot more
- complicated than it sounds. This handles all typedefs, and even recrusive
- typedefs.
-
-util.c
- These are utilities for the compiler, some things in here include a
- allocator used for debugging, and some string functions.
-
-assembler.c
- This implements support for assembling Quake assembler (which doesn't
- actually exist untill now: documentation of the Quake assembler is below.
- This also implements (will) inline assembly for the C compiler.
-
-README
- This is the file you're currently reading
+The design goals of the compiler are very large, it's intended the compiler
+supports a multitude of things, these things along with the status of
+completeness is represented below in a table.
+
++-------------------+-----------------------------+------------------+
+| Feature | What's it for? | Complete Factor |
++-------------------+-----------------------------+------------------+
+. Lexical analysis . Tokenization . 90% .
+.-------------------.-----------------------------.------------------.
+. Tokenization . Parsing . 90% .
+.-------------------.-----------------------------.------------------.
+. Parsing / SYA . AST Generation . 09% .
+.-------------------.-----------------------------.------------------.
+. AST Generation . IR Generation . ??% .
+.-------------------.-----------------------------.------------------.
+. IR Generation . Code Generation . ??% .
+.-------------------.-----------------------------.------------------.
+. Code Generation . Binary Generation . ??% .
+.-------------------.-----------------------------.------------------.
+. Binary Generation . Binary . 100% .
++-------------------+-----------------------------+------------------+
+
+Design tree:
+ The compiler is intended to work in the following order:
+ Lexical analysis ->
+ Tokenization ->
+ Parsing:
+ Operator precedence:
+ Shynting yard algorithm
+ Inline assembly:
+ Usage of the assembler subsystem:
+ top-down parsing and assemblation no optimization
+ Other parsing:
+ recrusive decent
+ ->
+ Abstract syntax tree generation ->
+ Immediate representation (SSA):
+ Optimizations:
+ Constant propagation
+ Value range propogation
+ Sparse conditional constant propagation (possibly?)
+ Dead code elimination
+ Constant folding
+ Global value numbering
+ Partial redundancy elimination
+ Strength reduction
+ Common subexpression elimination
+ Peephole optimizations
+ Loop-invariant code motion
+ Inline expansion
+ Constant folding
+ Induction variable recognition and elimination
+ Dead store elimination
+ Jump threading
+ ->
+ Code Generation:
+ Optimizations:
+ Rematerialization
+ Code Factoring
+ Recrusion Elimination
+ Loop unrolling
+ Deforestation
+ ->
+ Binary Generation
+
+File tree and explination:
+ gmqcc.h
+ This is the common header with all definitions, structures, and
+ constants for everything.
+
+ error.c
+ This is the error subsystem, this handles the output of good detailed
+ error messages (not currently, but will), with colors and such.