This repository was archived by the owner on Jun 28, 2024. It is now read-only.
Tags: sghng/ghuang3-compiler
Tags
Code Generator * Modify typechecker test cases to cover return type error * Improve a boolean expression * Add support for function rtype and prototype checking * Condense Makefile * Create scratch.c and scratch.h * Create label.c and label.h * Create codegen.c and codegen.h * Protect type_print() from null pointer * Implement decl_codegen() * Implement symbol_codegen() * Implement stmt_codegen() * Implement expr_codegen() * Format library.c * Add --codegen option in bminor.c * Add codegen_test * Create codegen test cases
Introduce type-checker * Move #include directives out of header files * Improve function documenting in expr.h * Redirect both stdout and stderr in runtest.sh * Fix a typo in comment in lex.yy.l * Add const quantifiers to arg of several functions * Fix 2D array size not resolved issue * Improve parsing logic in bminor.c * Support function prototype resolving * Cover function prototype and nested scope in resolver test cases * Fix a bug that causes a resolve error printed to stdout * Fix a bug that causes float literal not created correctly * Extract get_operator() function * Create typechecker.c and typechecker.h * Define type_errors in type.h * Implement type_equals() * Implement expr_typecheck() * Implement stmt_typecheck() * Implement param_typecheck() * Implement decl_typecheck() and type_typecheck() * Add --typecheck option in bminor.c * Create test cases for typechecker * Add test-typecheck option in runtest.sh * Refactor Makefile using macros
Introduce resolver * Improve bminor.c readability * Improve readability of Makefile * Improve error handling in scanner and parser * Fix assignment expression parsing issue * Fix an issue in decl_print() * Modify printer to directly print to stdout * Change printer_test() in runtest.sh to use diff * Add .tmp for testing output to .gitignore * Create test cases for resolver * Add test for resolver in runtest.sh * Create symbol.c and symbol.h * Create scope.c and scope.h * Create resolver.c and resolver.h * Implement decl_resolve() * Implement stmt_resolve() * Implement param_list_resolve() * Implement expr_resolve() * Add rules for resolver in Makefile * Add --resolve option in bminor.c * Fix no prototype warning in hash_table.c
Introduce printer * Create test cases for printer * Add printer test in runtest.sh * Add --print option * Add rules for printer and other improvements * Create printer.c * Define semantic values in lex.yy.l * Modify parse() to support parsing consecutive files * Modify parse() to return AST root * Add actions after reduction in grammar.y * Add param_list_create() and param_list_print() * Add expr_create() and expr_print() * Add type_create() and type_print() * Add stmt_create() and stmt_print() * Add decl_create() and decl_print() * Pass file pointers to decode(), scan(), and parse() * Modify parse() to take file pointer * Modify scan() to take file pointer * Modify decode() to take file pointer * Move definition of MAX_STRING_LEN * Add grammar.output to .gitignore