summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | | | | 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 statementskugwa2015-11-131-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 arraysTing-Wei Lan2015-11-131-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_exprkugwa2015-11-131-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 speckugwa2015-11-131-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.ckugwa2015-11-121-0/+2
|
* It finally works for some simple programskugwa2015-11-121-21/+43
| | | | Complete actions of some nonterminals derived from global_decl.
* 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
| | | | | | 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_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
| | | | | 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 tokenkugwa2015-11-091-1/+6
| | | | Don't print comment. line_number increases when there are newlines in the comment.
* 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
| | | | | Source files generated by flex cannot use warning flags because there are too many errors that we cannot fix.
* 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