-
print integer
-
assignment expression
-
equality oeprators == != > < >= <=
-
logical operators && || !
-
tokernize
-
if statement
-
for statement
-
while statement
-
do-while statement
-
pointer
-
assignment using pointer
-
return
-
delcare function without args but returns a value
-
call no args function
-
declare function with args
-
call function with args
-
regression test
-
unary operators +,-
-
string literal
-
char
-
prefix ++, --
-
postfix ++, --
-
pointer + -
-
1-dimension array
-
char literal
-
struct
-
global variable
-
atom_t refactoring 1
-
use a.value.* to a.*
-
organize atom functions
-
multi-dimension array
-
operators += -= *= /= %= |= &= ^=
-
multiple expressions with comma
-
local variable initialization
-
global variable initialization for int
-
union
-
enum
-
typedef
-
enum declaration
-
union/struct declaration
-
sizeof
-
break, continue
-
switch case
-
ternary operator ?:
-
function prototype declaration
-
extern variable
- w/ extern
- w/ init : .data, @global, WARN: 'initialized and declared 'extern'
- w/o init : no declaration, only reference in code, duplicate OK
- w/o extern :
- w/ init : .data, @global, duplicate OK, duplicate init NG
- w/o init : .comm, not @global, duplicate OK
-
extern function
-
inline comment
-
multiline comment
-
include
-
compiler options (-S)?
-
refactor : remove _read, _write etc.
-
allow variable declaration in middle of block
-
array initialization
- const classifier (just ignoring)
- anonymous union in struct
- implicit cast for char -> int/long, int -> char/long, long- > char/int
- implicit but warned cast for void* -> any pointers
- add warning level for logging
- local multiple variable definition
- array initializer for non-sized array declaration
- variable declaration in the first clause of 'for'
- cast
- global variable initializer for string literals
- empty statement for 'for'
- define value
- test 066 (assignment from fixed-length-array to pointer) fails
- compiler options (-o outfile)? {source.c)
- bit operators >> >>= << <<= & | ^ ~
- define macro
-
cli : allow multiple .c files
-
signed char/int/long
-
unsigned char/int/long
-
#ifdef, #ifndef, #else, #endif
-
#define macro
-
#undef
-
'#' should be the first valid character in a line
-
## operator
-
# operator
-
FILE, LINE
-
VA_ARGS # C99
-
multiple global variable definition
-
array global variable initialization
-
long literal (10000L)
-
concatinate sequence of string literal
-
hex literal (ex:0x0000), octal literal(ex:0100)
-
goto
-
float, double, double double, short, long long
-
function declaration for > 6 args
-
function call with > 6 args
-
function call ABI stack 16bytes alignment
-
variadic function call/def
-
va_list type, va_start, va_end macro
-
va_arg
-
'static' variables in function
-
'static' global variables
-
struct assignment - memcpy(&a,&b,sizeof(a))
-
struct argument
-
struct return value
-
bug / expression sequence - evaluated result should reflect the last expression
-
rewrite code generation from stack-machine to register-machine (!)
-
atom_t refactoring 2
-
use atom_t * instead of pos
-
rename TYPE_ to K_(KIND_) / C_(CLASS_) / N_(NODE_) ...
-
remove print statement, replace with
void print(int i) { printf("%d\n",i); }
-
the parser shoud NOT consider ABI - variable offset should be calculated in emitting stage, not in parsing stage
-
stop calculate variables' offset at parse stage, do it emission stage
- it's depends on ABI - the AST shouldn't know whether the variable is passed on stack or on registers
- change va_arg's register save area at the begining -REG_ZREA_SIZE(%rbp) of the function's stack frame