summaryrefslogtreecommitdiffstats
path: root/src/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Suppress a bogus array bound warning for clang and glibcTing-Wei Lan2016-01-021-0/+8
|
* Drop any_error from state and add asm_output to stateTing-Wei Lan2015-12-301-4/+3
|
* Add the code-generation phasekugwa2015-12-301-0/+9
|
* Check and write computed types for expressions and arraysTing-Wei Lan2015-12-091-0/+5
|
* 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
|
* We are going to do semantic analysisTing-Wei Lan2015-12-061-0/+9
|
* Disable AST dumping by defaultTing-Wei Lan2015-12-061-1/+3
| | | | This feature is still available through defining environment variable.
* Drop all non-namespaced symbolsTing-Wei Lan2015-12-031-7/+9
| | | | | | | | | | | | | | 1. All data types and macros in headers, global variables and functions that have external linkage are namespaced. The only two files that allow non-namespaced symbols are main.c and common.h. common.h should not be included by any other headers. 2. Coding style is fixed when possible. 3. Drop unused variables or struct members. 4. 'name' macro is renamed to 'prog_name' to prevent conflicts with ast.h. 5. %union includes a CON_Type (now CcmmcValueConst) instead of a pointer to it. This prevents an unnecessary malloc. 6. Fix buffer overflow in draw.c. draw.c should not modify the input AST while generating the graph.
* Drop line_number and prog global variablesTing-Wei Lan2015-12-021-7/+12
| | | | | All important states should be stored in the local struct allocated in main function.
* Make the scanner and the parser reentrant and reduce non-namespaced symbolsTing-Wei Lan2015-12-011-5/+26
|
* Use strerror_r to make error messages more usefulTing-Wei Lan2015-11-301-3/+18
| | | | | This commit adds a new file, common.h, which contains private macros and static functions to make the code cleaner.
* Include our headers before including system headersTing-Wei Lan2015-11-301-2/+3
|
* Enable POSIX extensionsTing-Wei Lan2015-11-131-0/+4
|
* Fix the build with --enable-compile-warnings=errorTing-Wei Lan2015-11-131-2/+0
| | | | | | 1. Add missing 'const' keyword for string literals. 2. Add missing 'static' keyword for internal functions. 3. Add missing default cases for switch statements.
* Add declaration of printGV() in main.ckugwa2015-11-121-0/+2
|
* main() prints the parse treekugwa2015-11-121-0/+2
|
* Merge TA's codes to ourskugwa2015-11-111-22/+14
| | | | | | Delete tmp funtion used in HW2. Move AST functions into ast.c. CONST_INT, CONST_FLOAT, and CONST_STRING all return CONST.
* Move all source files to the new src directoryTing-Wei Lan2015-11-091-0/+31