Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add the header generated by yacc to BUILT_SOURCESHW3 | Ting-Wei Lan | 2015-11-13 | 1 | -1/+1 |
| | |||||
* | Enable POSIX extensions | Ting-Wei Lan | 2015-11-13 | 6 | -0/+23 |
| | |||||
* | Fix the build with --enable-compile-warnings=error | Ting-Wei Lan | 2015-11-13 | 3 | -31/+41 |
| | | | | | | 1. Add missing 'const' keyword for string literals. 2. Add missing 'static' keyword for internal functions. 3. Add missing default cases for switch statements. | ||||
* | Implement IF and IF...ELSE statements | kugwa | 2015-11-13 | 1 | -5/+7 |
| | | | | | 1. Use "%right DL_RPAREN ELSE" to solve SR conflict. 2. Fix a bug in assign_expr: token ID is not an AST_NODE. | ||||
* | Complete rules and actions for remaining operators and arrays | Ting-Wei Lan | 2015-11-13 | 1 | -26/+84 |
| | | | | | | 1. Actions for binary operators are completed. 2. Rules and actions for unary operators are added. 3. Arrays can be used in expressions now. | ||||
* | Complete most of the semantic actions before relop_expr | kugwa | 2015-11-13 | 1 | -47/+81 |
| | | | | | if and if-then-else have not been implemented. Some actions after relop_expr is done for the test of for loop. | ||||
* | Fix some actions to meet TA's spec | kugwa | 2015-11-13 | 1 | -10/+5 |
| | | | | | | | | 1. dim_fn should be the child of ID 2. decl_list should be the child of VARIABLE_DECL_LIST_NODE 3. stmt_list should be the child of STMT_LIST_NODE 4. Add actions for decl_list 5. ID with initial value should use WITH_INIT_ID instead of NORMAL_ID | ||||
* | Add declaration of printGV() in main.c | kugwa | 2015-11-12 | 1 | -0/+2 |
| | |||||
* | It finally works for some simple programs | kugwa | 2015-11-12 | 1 | -21/+43 |
| | | | | Complete actions of some nonterminals derived from global_decl. | ||||
* | main() prints the parse tree | kugwa | 2015-11-12 | 3 | -0/+204 |
| | |||||
* | Token ID fills yylval | kugwa | 2015-11-12 | 1 | -0/+5 |
| | |||||
* | Constant tokens fill yylval and return CONST | kugwa | 2015-11-12 | 1 | -5/+24 |
| | |||||
* | Merge TA's codes to ours | kugwa | 2015-11-11 | 9 | -144/+937 |
| | | | | | | Delete tmp funtion used in HW2. Move AST functions into ast.c. CONST_INT, CONST_FLOAT, and CONST_STRING all return CONST. | ||||
* | Don't define [+-]? for CONST_INT and CONST_FLOAT | kugwa | 2015-11-11 | 1 | -3/+2 |
| | |||||
* | Make sure we don't accidently change the number of reserved words | Ting-Wei Lan | 2015-11-11 | 1 | -0/+5 |
| | |||||
* | All actions in lexer.l return the currect token | kugwa | 2015-11-11 | 1 | -27/+47 |
| | | | | | Define tokens in enum for reserved words and the action of {ID} will return the currect token. Other actions also return tokens. | ||||
* | Change the action of the comment token | kugwa | 2015-11-09 | 1 | -1/+6 |
| | | | | Don't print comment. line_number increases when there are newlines in the comment. | ||||
* | Move all source files to the new src directory | Ting-Wei Lan | 2015-11-09 | 6 | -12/+14 |
| | |||||
* | CONST_FLOAT now matchs some fucking cases like '1.' or '.1'HW2 | kugwa | 2015-10-23 | 1 | -1/+1 |
| | |||||
* | CONST_FLOAT can now match 1e9 | kugwa | 2015-10-23 | 1 | -1/+1 |
| | |||||
* | Exit after an unknown token is found | Ting-Wei Lan | 2015-10-23 | 1 | -0/+2 |
| | |||||
* | line_number starts from 1 instead of 0 | kugwa | 2015-10-23 | 1 | -1/+1 |
| | |||||
* | More complex format of int and float can be match | kugwa | 2015-10-23 | 1 | -3/+3 |
| | |||||
* | Don't include file generated by flex in submitted homework | Ting-Wei Lan | 2015-10-21 | 1 | -0/+3 |
| | |||||
* | Follow the format required by TA | Ting-Wei Lan | 2015-10-21 | 2 | -10/+14 |
| | |||||
* | Use AX_COMPILER_FLAGS | Ting-Wei Lan | 2015-10-21 | 13 | -3/+899 |
| | | | | | Source files generated by flex cannot use warning flags because there are too many errors that we cannot fix. | ||||
* | Don't export non-namespaced symbols | Ting-Wei Lan | 2015-10-21 | 4 | -34/+34 |
| | |||||
* | symbol-table.h needs a header guard | Ting-Wei Lan | 2015-10-21 | 1 | -0/+4 |
| | |||||
* | Don't export linenumber global variable | Ting-Wei Lan | 2015-10-21 | 3 | -8/+7 |
| | |||||
* | Print sorted list of identifiers in main | Ting-Wei Lan | 2015-10-21 | 1 | -3/+20 |
| | |||||
* | Move main function to a separate file | Ting-Wei Lan | 2015-10-21 | 3 | -12/+21 |
| | |||||
* | Break a long line | Ting-Wei Lan | 2015-10-21 | 1 | -1/+2 |
| | |||||
* | Show undefined characters in error messages | Ting-Wei Lan | 2015-10-21 | 1 | -1/+4 |
| | |||||
* | Change the usage of fillTab() | kugwa | 2015-10-21 | 2 | -3/+16 |
| | |||||
* | Add fillTab() for hw2 | kugwa | 2015-10-21 | 2 | -0/+15 |
| | |||||
* | Replace tabs with spaces in symbol-table.c | kugwa | 2015-10-21 | 1 | -8/+8 |
| | |||||
* | Add modelines for vim | Ting-Wei Lan | 2015-10-21 | 3 | -0/+5 |
| | |||||
* | Replace all tabs with spaces in symbol-table.h | Ting-Wei Lan | 2015-10-21 | 1 | -5/+5 |
| | |||||
* | Show line numbers in error messages | Ting-Wei Lan | 2015-10-21 | 1 | -1/+1 |
| | |||||
* | Ignore ylwrap generated by automake | Ting-Wei Lan | 2015-10-21 | 1 | -0/+1 |
| | |||||
* | Fix coding style and remove all tabs | Ting-Wei Lan | 2015-10-21 | 2 | -74/+69 |
| | |||||
* | Deal with identifiers and reserved words differently | kugwa | 2015-10-21 | 1 | -15/+19 |
| | |||||
* | Complete lexer.l | kugwa | 2015-10-19 | 3 | -74/+135 |
| | |||||
* | Add a simple autotools build system | Ting-Wei Lan | 2015-10-19 | 3 | -0/+57 |
| | |||||
* | Rename header.h to symbol-table.h | Ting-Wei Lan | 2015-10-19 | 4 | -3/+3 |
| | |||||
* | Rewrite Makefile to use default rules specified by POSIX | Ting-Wei Lan | 2015-10-19 | 2 | -21/+10 |
| | |||||
* | Add a .gitignore file for autotools | Ting-Wei Lan | 2015-10-19 | 1 | -0/+64 |
| | |||||
* | Import files provided by TATA | Ting-Wei Lan | 2015-10-19 | 4 | -0/+211 |