c00: top level; lexer; expressions c01: build expression nodes c02: external definitions; statements c03: output Important functions: symbol returns the next token extdef parses external definitions declare parses a declaration statement parses statements tree parses expressions to an AST build builds non-leaf AST nodes csym [0] sort -2 unmentioned -1 parameter unmentioned 0 none 1 keyword; type is keyword number 2 label; type is int[] (020) 3 4 5 auto 6 extern 7 static 8 parameter (tmp) 10 parameter (tmp) [1] type, meaning depends on sort, usually: 0 int 1 char 2 float 3 double 20 pointer (+20 for every indirection) [2] value: stack offset, label number [3] vector size [4-7] name tnode 0 op 1 type 2 degree (?how deep the stack is?) 3-5 p1-3 character/symbol/operator type 1 ; 2 { 3 } 4 [ 5 ] 6 ( 7 ) 8 : 19 keyword 20 name 21 constant 22 string 30 pre ++ 31 pre -- 32 post ++ 33 post -- 34 unary ! 35 unary & 36 unary * 37 unary - 38 unary ~ not implemented 40 + 41 - 42 * 43 / 44 % 45 >> 46 << 47 & 48 | 49 ^ 60 == 61 != 62 <= 63 < 64 >= 65 > 70 =+ 71 =- 72 =* 73 =/ 74 =% 75 =>> 76 =<< 77 =& 78 =| 79 =^ 80 = 90 ? 100 call 101 mcall 102 goto 103 conditional jump 104 conditional branch 123 letter 124 digit 127 illegal opdope XX000 precedence 00200 right associative 00100 commutative 00040 word on right 00020 word on left 00010 assignment 00004 relational 00002 lvalue left 00001 binary prec assoc op 2 left ( [ 4 ( [ call on stack 6 EOF 7 left , 12 right = =op 14 right ? : 16 left | ^ 20 left & 22 left == != 24 left <= < >= > 26 left >> << 30 left + - 32 left * / % 34 right -- ++ !x &x *x -x ~x 36 left ) ] call cvn 200 convert right/left operand 100 result type is right/left 0X0 cvn if not assignment (type promotion) 00X cvn if assignment (cast)