summaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Fix homework submission script on FreeBSDHEADmasterTing-Wei Lan2016-01-241-1/+1
* Don't call ccmmc_register_alloc() after saving registers for write functionHW6Ting-Wei Lan2016-01-211-4/+8
* Don't output add/sub sp, sp ,0kugwa2016-01-211-2/+6
* Allow using expressions as arguments of write functionTing-Wei Lan2016-01-211-2/+2
* Move some globals into the structurekugwa2016-01-212-11/+12
* Don't use x29 for tmpkugwa2016-01-211-2/+2
* Dynamically adjust the size of pool->spillkugwa2016-01-211-3/+11
* Add missing _caller_save() and _save_arguments()kugwa2016-01-211-0/+3
* Only save and restore registers being usedkugwa2016-01-211-8/+18
* Can use more registerskugwa2016-01-211-2/+2
* Don't replace main with _start_MAINTing-Wei Lan2016-01-211-1/+1
* libparser_a-parser.[ch] -> parser.[ch]Ting-Wei Lan2016-01-213-8/+8
* Don't call ccmmc_register_alloc() after saving registers for function callsTing-Wei Lan2016-01-211-18/+18
* Reverse the order of arguments on the stackTing-Wei Lan2016-01-211-3/+8
* Fix stack restoration after function callsTing-Wei Lan2016-01-211-1/+1
* sxtw x__, w__kugwa2016-01-212-2/+2
* Handle the case of freeing a tmp on the stackkugwa2016-01-211-21/+63
* Save arguments before calling any functionTing-Wei Lan2016-01-201-16/+20
* Fix the problem of immediates in register.ckugwa2016-01-201-11/+20
* Support calling functions with argumentsTing-Wei Lan2016-01-205-33/+257
* Add the missing vim modeline in register.cTing-Wei Lan2016-01-201-0/+2
* Fix the problem of initializing local variableskugwa2016-01-191-11/+16
* Complete code-gen of for statementkugwa2016-01-181-2/+51
* Complete global array referencekugwa2016-01-181-2/+52
* Change mul 4 to lsl 2kugwa2016-01-181-11/+4
* Use bool to store lock information of a registerTing-Wei Lan2016-01-182-12/+13
* Fix calc_array_offset()kugwa2016-01-181-14/+18
* Callers have to pass extend_name[]HW5kugwa2016-01-033-9/+9
* sxt -> sxtwkugwa2016-01-031-17/+23
* Add a function to get the name of 64 bit registerskugwa2016-01-033-2/+27
* Add missing ccmmc_register_lock() in store_variable()kugwa2016-01-031-0/+2
* Complete array reference for storing local variableskugwa2016-01-031-18/+41
* Complete array reference for loading local variableskugwa2016-01-031-21/+110
* Use adrp and add to address global variablesTing-Wei Lan2016-01-031-4/+6
* Fix linking error caused by missing .align directiveTing-Wei Lan2016-01-031-0/+1
* Add missing colons after label namesTing-Wei Lan2016-01-031-5/+5
* Don't add a newline when writing a stringTing-Wei Lan2016-01-031-1/+1
* fmov -> mov, fmov cannot be used to move integer registersTing-Wei Lan2016-01-031-1/+1
* Fix syntax error when accessing global variablesTing-Wei Lan2016-01-031-2/+4
* Drop trailing whitespacesTing-Wei Lan2016-01-031-2/+2
* Comment and indent code generated by register.ckugwa2016-01-031-6/+14
* Apply register managementkugwa2016-01-032-128/+185
* Rewrite names for read, fread, and the overloaded write functionTing-Wei Lan2016-01-031-1/+34
* Temporarily workaround the wrong return labelTing-Wei Lan2016-01-031-0/+10
* Rewrite the name of main function to work with TA's broken toolchainTing-Wei Lan2016-01-031-6/+12
* Workaround label name conflict with TA's broken toolchainTing-Wei Lan2016-01-031-1/+2
* Add a function to handle function calls to reduce duplicate codeTing-Wei Lan2016-01-031-6/+9
* Complete code-gen of if-else statementkugwa2016-01-031-3/+56
* Workaround large immediate by loading constant offsets from memoryTing-Wei Lan2016-01-021-4/+12
* Free registers after generating condition code in while statementkugwa2016-01-021-0/+6
* Generate code for return statementsTing-Wei Lan2016-01-022-17/+39
* Floating-point return value is in s0Ting-Wei Lan2016-01-021-2/+9
* Complete code-gen of while statementkugwa2016-01-021-2/+34
* Remove the assert() in the function call case of generating exprkugwa2016-01-021-1/+1
* Fix output to meet asm syntaxkugwa2016-01-021-5/+5
* Handle function calls in exprkugwa2016-01-021-1/+4
* Generate code for function callskugwa2016-01-022-1/+14
* fneg instruction should use floating-point registersTing-Wei Lan2016-01-021-1/+1
* div -> sdiv, there is no instruction called divTing-Wei Lan2016-01-021-1/+1
* Generate code to initialize variables with constantsTing-Wei Lan2016-01-021-35/+44
* Fill type_value for ID nodes of newly declared variablesTing-Wei Lan2016-01-021-0/+1
* No code has to be generated for typedefTing-Wei Lan2016-01-021-1/+2
* Suppress a bogus array bound warning for clang and glibcTing-Wei Lan2016-01-021-0/+8
* Generate code for expressions and assignmentsTing-Wei Lan2016-01-025-3/+394
* Add function prologue and epilogueTing-Wei Lan2016-01-021-2/+8
* Use x30 as the frame pointerTing-Wei Lan2016-01-021-0/+1
* Add a simple function to check whether an immediate is too largeTing-Wei Lan2016-01-021-8/+12
* Add .size and .type to all global symbols except for uninitialized variablesTing-Wei Lan2016-01-021-6/+20
* Can allocate many tmpskugwa2016-01-023-38/+118
* Immediate is only safe to when the number is <= 4096Ting-Wei Lan2015-12-311-2/+2
* Process local variables declared in else blocksTing-Wei Lan2015-12-311-0/+4
* Add missing else statement checkkugwa2015-12-311-0/+5
* Properly deallocate the register poolTing-Wei Lan2015-12-312-0/+6
* Export functions and global variables as global symbolsTing-Wei Lan2015-12-311-4/+9
* Use ldr to prevent immediate from becoming too largeTing-Wei Lan2015-12-311-3/+28
* Initialize the register poolkugwa2015-12-314-0/+9
* Add code for register managementkugwa2015-12-314-0/+157
* Statements should not change the fp offsetTing-Wei Lan2015-12-311-13/+11
* Generate fp offsets for local variablesTing-Wei Lan2015-12-311-1/+99
* Generate code for global variable declarationsTing-Wei Lan2015-12-311-6/+45
* Reset the state of the symbol table before generating codeTing-Wei Lan2015-12-311-0/+2
* Add the missing vim modeline in code-generation.cTing-Wei Lan2015-12-311-0/+2
* Complete the NORMAL_ID case in generate_global_variable()kugwa2015-12-303-1/+34
* Add 3 static code-generation functionskugwa2015-12-301-0/+28
* Drop any_error from state and add asm_output to stateTing-Wei Lan2015-12-305-12/+12
* Add the code-generation phasekugwa2015-12-304-0/+38
* Add a testcase to show the modification of grammerHW4kugwa2015-12-112-0/+11
* Fix constant expression testcaseTing-Wei Lan2015-12-111-2/+1
* Add some testcasesTing-Wei Lan2015-12-1111-1/+74
* Fix error detection in check_call()kugwa2015-12-111-5/+10
* Handle builtin functions: read, fread, writeTing-Wei Lan2015-12-101-0/+25
* Check return type when a function returnskugwa2015-12-101-1/+30
* Complete check_call() and case CCMMC_KIND_STMT_FORkugwa2015-12-101-12/+106
* Fix indent of a statement in elsekugwa2015-12-101-1/+1
* Detect overflows and underflows when scanning numbersTing-Wei Lan2015-12-101-2/+50
* Scalars cannot be used as arrays and arrays cannot be used as scalarsTing-Wei Lan2015-12-091-0/+10
* Use regular tree representation in AST drawerTing-Wei Lan2015-12-091-12/+6
* Draw computed types stored in ASTTing-Wei Lan2015-12-091-0/+36
* Check and write computed types for expressions and arraysTing-Wei Lan2015-12-092-7/+181
* process_{relop_expr, var_ref} -> check_{relop_expr, var_ref}kugwa2015-12-092-6/+44
* Handle array dimension error of function parameterskugwa2015-12-092-9/+17
* Change ID to var_ref for rule assign_exprkugwa2015-12-091-4/+2
* process_{typedef,variable,function} -> decl_{typedef,variable,function}Ting-Wei Lan2015-12-091-9/+9
* retrive -> retrieveTing-Wei Lan2015-12-093-7/+7
* Fix crash when constant expressions include string literalsTing-Wei Lan2015-12-091-1/+8
* Show (void) for functions without argumentsTing-Wei Lan2015-12-091-0/+2
* Can declare local variable and write empty statementskugwa2015-12-081-3/+24
* Move code for block node into process_block()kugwa2015-12-081-34/+62
* Can declare functions with empty blockskugwa2015-12-081-18/+73
* Allow using 'type name(void)' to define functions with no argumentTing-Wei Lan2015-12-071-0/+24
* Implement checks for global variable initalizersTing-Wei Lan2015-12-071-46/+185
* Reject void variables and void arrays.Ting-Wei Lan2015-12-071-0/+11
* Write results to AST nodes when evaluating constant expressionsTing-Wei Lan2015-12-072-88/+93
* Allow using typedef with array typesTing-Wei Lan2015-12-071-4/+15
* Fix unhandled enumeration value errorTing-Wei Lan2015-12-071-0/+1
* Use stdin if the source file name is a single dashTing-Wei Lan2015-12-071-1/+2
* Allow dumping symbol table via an environment variableTing-Wei Lan2015-12-071-1/+14
* Fix problems caused by short-circuit evaluationTing-Wei Lan2015-12-071-4/+4
* Handle constant expressions with integer division by zeroTing-Wei Lan2015-12-072-5/+11
* Re-add line number fields in AST nodesTing-Wei Lan2015-12-074-152/+225
* Implement semantic checks for type and variable declarationsTing-Wei Lan2015-12-065-2/+434
* Add a flag to mark whether the type is a functionTing-Wei Lan2015-12-061-3/+16
* Simple coding style fixTing-Wei Lan2015-12-061-1/+1
* Fix typo in ast.hTing-Wei Lan2015-12-061-2/+2
* We are going to do semantic analysisTing-Wei Lan2015-12-066-0/+44
* Fix indent and broken include guard in state.[ch]Ting-Wei Lan2015-12-062-11/+13
* Disable AST dumping by defaultTing-Wei Lan2015-12-061-1/+3
* Use multiple small hash tables to implement symbol tablesTing-Wei Lan2015-12-063-80/+116
* Refuse to compile if C11 isn't supportedTing-Wei Lan2015-12-032-3/+178
* Drop all non-namespaced symbolsTing-Wei Lan2015-12-0310-505/+525
* Drop line_number and prog global variablesTing-Wei Lan2015-12-027-34/+80
* Make the scanner and the parser reentrant and reduce non-namespaced symbolsTing-Wei Lan2015-12-013-19/+52
* Sort the list of tokens and non-terminalsTing-Wei Lan2015-11-301-15/+18
* Use strerror_r to make error messages more usefulTing-Wei Lan2015-11-305-19/+91
* The style of grammer rules is more consistent nowTing-Wei Lan2015-11-301-129/+130
* Drop tab usage in source filesTing-Wei Lan2015-11-302-63/+63
* Drop unused codeTing-Wei Lan2015-11-301-7/+1
* All source files should include vim modelinesTing-Wei Lan2015-11-304-0/+7
* Include our headers before including system headersTing-Wei Lan2015-11-307-9/+16
* Don't include lexer.c and move yyerror to the end of fileTing-Wei Lan2015-11-303-15/+17
* Add the header generated by yacc to BUILT_SOURCESHW3Ting-Wei Lan2015-11-131-1/+1
* Enable POSIX extensionsTing-Wei Lan2015-11-136-0/+23
* Fix the build with --enable-compile-warnings=errorTing-Wei Lan2015-11-133-31/+41
* Implement IF and IF...ELSE statementskugwa2015-11-131-5/+7
* Complete rules and actions for remaining operators and arraysTing-Wei Lan2015-11-131-26/+84
* Complete most of the semantic actions before relop_exprkugwa2015-11-131-47/+81
* Fix some actions to meet TA's speckugwa2015-11-131-10/+5
* Add declaration of printGV() in main.ckugwa2015-11-121-0/+2
* It finally works for some simple programskugwa2015-11-121-21/+43
* main() prints the parse treekugwa2015-11-123-0/+204
* Token ID fills yylvalkugwa2015-11-121-0/+5
* Constant tokens fill yylval and return CONSTkugwa2015-11-121-5/+24
* Merge TA's codes to ourskugwa2015-11-119-144/+937
* Don't define [+-]? for CONST_INT and CONST_FLOATkugwa2015-11-111-3/+2
* Make sure we don't accidently change the number of reserved wordsTing-Wei Lan2015-11-111-0/+5
* All actions in lexer.l return the currect tokenkugwa2015-11-111-27/+47
* Change the action of the comment tokenkugwa2015-11-091-1/+6
* Move all source files to the new src directoryTing-Wei Lan2015-11-096-12/+14
* CONST_FLOAT now matchs some fucking cases like '1.' or '.1'HW2kugwa2015-10-231-1/+1
* CONST_FLOAT can now match 1e9kugwa2015-10-231-1/+1
* Exit after an unknown token is foundTing-Wei Lan2015-10-231-0/+2
* line_number starts from 1 instead of 0kugwa2015-10-231-1/+1
* More complex format of int and float can be matchkugwa2015-10-231-3/+3
* Don't include file generated by flex in submitted homeworkTing-Wei Lan2015-10-211-0/+3
* Follow the format required by TATing-Wei Lan2015-10-212-10/+14
* Use AX_COMPILER_FLAGSTing-Wei Lan2015-10-2113-3/+899
* Don't export non-namespaced symbolsTing-Wei Lan2015-10-214-34/+34
* symbol-table.h needs a header guardTing-Wei Lan2015-10-211-0/+4
* Don't export linenumber global variableTing-Wei Lan2015-10-213-8/+7
* Print sorted list of identifiers in mainTing-Wei Lan2015-10-211-3/+20
* Move main function to a separate fileTing-Wei Lan2015-10-213-12/+21
* Break a long lineTing-Wei Lan2015-10-211-1/+2
* Show undefined characters in error messagesTing-Wei Lan2015-10-211-1/+4
* Change the usage of fillTab()kugwa2015-10-212-3/+16
* Add fillTab() for hw2kugwa2015-10-212-0/+15
* Replace tabs with spaces in symbol-table.ckugwa2015-10-211-8/+8
* Add modelines for vimTing-Wei Lan2015-10-213-0/+5
* Replace all tabs with spaces in symbol-table.hTing-Wei Lan2015-10-211-5/+5
* Show line numbers in error messagesTing-Wei Lan2015-10-211-1/+1
* Ignore ylwrap generated by automakeTing-Wei Lan2015-10-211-0/+1
* Fix coding style and remove all tabsTing-Wei Lan2015-10-212-74/+69
* Deal with identifiers and reserved words differentlykugwa2015-10-211-15/+19
* Complete lexer.lkugwa2015-10-193-74/+135
* Add a simple autotools build systemTing-Wei Lan2015-10-193-0/+57
* Rename header.h to symbol-table.hTing-Wei Lan2015-10-194-3/+3
* Rewrite Makefile to use default rules specified by POSIXTing-Wei Lan2015-10-192-21/+10
* Add a .gitignore file for autotoolsTing-Wei Lan2015-10-191-0/+64
* Import files provided by TATATing-Wei Lan2015-10-194-0/+211