diff --git a/.gitignore b/.gitignore index c1a9cb2..5bf12f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ ### CS323 Template ### #### Ignore generated #### src/main/java/generated +out/ *.tar *.tar.gz diff --git a/out/production/CS323-Compilers-2025F-Projects/Main.class b/out/production/CS323-Compilers-2025F-Projects/Main.class deleted file mode 100644 index 60cb356..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/Main.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/AbstractCompiler.class b/out/production/CS323-Compilers-2025F-Projects/framework/AbstractCompiler.class deleted file mode 100644 index 06b4c3c..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/AbstractCompiler.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/AbstractGrader.class b/out/production/CS323-Compilers-2025F-Projects/framework/AbstractGrader.class deleted file mode 100644 index f4a3239..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/AbstractGrader.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/Utils.class b/out/production/CS323-Compilers-2025F-Projects/framework/Utils.class deleted file mode 100644 index 0a2f6b7..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/Utils.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/lang/Type.class b/out/production/CS323-Compilers-2025F-Projects/framework/lang/Type.class deleted file mode 100644 index af97480..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/lang/Type.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Grader.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Grader.class deleted file mode 100644 index 346d86c..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Grader.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$DefinitionOfIncompleteType.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$DefinitionOfIncompleteType.class deleted file mode 100644 index 840ee01..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$DefinitionOfIncompleteType.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$MemberError.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$MemberError.class deleted file mode 100644 index b7ff75b..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$MemberError.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$RedeclarationError.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$RedeclarationError.class deleted file mode 100644 index 41ae1bd..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$RedeclarationError.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$RedefinitionError.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$RedefinitionError.class deleted file mode 100644 index 2921c83..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$RedefinitionError.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$UndeclaredUseError.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$UndeclaredUseError.class deleted file mode 100644 index cb30da7..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError$UndeclaredUseError.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError.class b/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError.class deleted file mode 100644 index 15dc103..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/framework/project3/Project3SemanticError.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/Splc.interp b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/Splc.interp deleted file mode 100644 index c487a61..0000000 --- a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/Splc.interp +++ /dev/null @@ -1,100 +0,0 @@ -token literal names: -null -'int' -'char' -'struct' -'return' -'if' -'else' -'while' -'=' -'+' -'-' -'*' -'/' -'%' -'<' -'<=' -'>' -'>=' -'==' -'!=' -'&&' -'||' -'!' -'++' -'--' -'.' -'->' -'&' -';' -',' -'(' -')' -'{' -'}' -'[' -']' -null -null -null -null -null -null - -token symbolic names: -null -INT -CHAR -STRUCT -RETURN -IF -ELSE -WHILE -ASSIGN -PLUS -MINUS -STAR -DIV -MOD -LT -LE -GT -GE -EQ -NEQ -AND -OR -NOT -INC -DEC -DOT -ARROW -AMP -SEMI -COMMA -LPAREN -RPAREN -LBRACE -RBRACE -LBRACK -RBRACK -Identifier -Number -Char -WS -LINE_COMMENT -BLOCK_COMMENT - -rule names: -program -globalDef -specifier -varDec -funcArgs -statement -expression - - -atn: -[4, 1, 41, 219, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 1, 0, 5, 0, 16, 8, 0, 10, 0, 12, 0, 19, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 30, 8, 1, 10, 1, 12, 1, 33, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 41, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 48, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 61, 8, 2, 10, 2, 12, 2, 64, 9, 2, 1, 2, 3, 2, 67, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 77, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 83, 8, 3, 10, 3, 12, 3, 86, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 5, 4, 94, 8, 4, 10, 4, 12, 4, 97, 9, 4, 3, 4, 99, 8, 4, 1, 5, 1, 5, 5, 5, 103, 8, 5, 10, 5, 12, 5, 106, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 113, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 124, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 139, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 154, 8, 6, 10, 6, 12, 6, 157, 9, 6, 3, 6, 159, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 176, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 214, 8, 6, 10, 6, 12, 6, 217, 9, 6, 1, 6, 0, 2, 6, 12, 7, 0, 2, 4, 6, 8, 10, 12, 0, 4, 1, 0, 11, 13, 1, 0, 9, 10, 1, 0, 14, 17, 1, 0, 18, 19, 258, 0, 17, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 66, 1, 0, 0, 0, 6, 76, 1, 0, 0, 0, 8, 98, 1, 0, 0, 0, 10, 138, 1, 0, 0, 0, 12, 175, 1, 0, 0, 0, 14, 16, 3, 2, 1, 0, 15, 14, 1, 0, 0, 0, 16, 19, 1, 0, 0, 0, 17, 15, 1, 0, 0, 0, 17, 18, 1, 0, 0, 0, 18, 20, 1, 0, 0, 0, 19, 17, 1, 0, 0, 0, 20, 21, 5, 0, 0, 1, 21, 1, 1, 0, 0, 0, 22, 23, 3, 4, 2, 0, 23, 24, 5, 36, 0, 0, 24, 25, 5, 30, 0, 0, 25, 26, 3, 8, 4, 0, 26, 27, 5, 31, 0, 0, 27, 31, 5, 32, 0, 0, 28, 30, 3, 10, 5, 0, 29, 28, 1, 0, 0, 0, 30, 33, 1, 0, 0, 0, 31, 29, 1, 0, 0, 0, 31, 32, 1, 0, 0, 0, 32, 34, 1, 0, 0, 0, 33, 31, 1, 0, 0, 0, 34, 35, 5, 33, 0, 0, 35, 48, 1, 0, 0, 0, 36, 37, 3, 4, 2, 0, 37, 40, 3, 6, 3, 0, 38, 39, 5, 8, 0, 0, 39, 41, 3, 12, 6, 0, 40, 38, 1, 0, 0, 0, 40, 41, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 43, 5, 28, 0, 0, 43, 48, 1, 0, 0, 0, 44, 45, 3, 4, 2, 0, 45, 46, 5, 28, 0, 0, 46, 48, 1, 0, 0, 0, 47, 22, 1, 0, 0, 0, 47, 36, 1, 0, 0, 0, 47, 44, 1, 0, 0, 0, 48, 3, 1, 0, 0, 0, 49, 67, 5, 1, 0, 0, 50, 67, 5, 2, 0, 0, 51, 52, 5, 3, 0, 0, 52, 67, 5, 36, 0, 0, 53, 54, 5, 3, 0, 0, 54, 55, 5, 36, 0, 0, 55, 62, 5, 32, 0, 0, 56, 57, 3, 4, 2, 0, 57, 58, 3, 6, 3, 0, 58, 59, 5, 28, 0, 0, 59, 61, 1, 0, 0, 0, 60, 56, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 65, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 65, 67, 5, 33, 0, 0, 66, 49, 1, 0, 0, 0, 66, 50, 1, 0, 0, 0, 66, 51, 1, 0, 0, 0, 66, 53, 1, 0, 0, 0, 67, 5, 1, 0, 0, 0, 68, 69, 6, 3, -1, 0, 69, 77, 5, 36, 0, 0, 70, 71, 5, 30, 0, 0, 71, 72, 3, 6, 3, 0, 72, 73, 5, 31, 0, 0, 73, 77, 1, 0, 0, 0, 74, 75, 5, 11, 0, 0, 75, 77, 3, 6, 3, 1, 76, 68, 1, 0, 0, 0, 76, 70, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 77, 84, 1, 0, 0, 0, 78, 79, 10, 2, 0, 0, 79, 80, 5, 34, 0, 0, 80, 81, 5, 37, 0, 0, 81, 83, 5, 35, 0, 0, 82, 78, 1, 0, 0, 0, 83, 86, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 7, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 88, 3, 4, 2, 0, 88, 95, 3, 6, 3, 0, 89, 90, 5, 29, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 3, 6, 3, 0, 92, 94, 1, 0, 0, 0, 93, 89, 1, 0, 0, 0, 94, 97, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 99, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 98, 87, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 9, 1, 0, 0, 0, 100, 104, 5, 32, 0, 0, 101, 103, 3, 10, 5, 0, 102, 101, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 107, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 107, 139, 5, 33, 0, 0, 108, 109, 3, 4, 2, 0, 109, 112, 3, 6, 3, 0, 110, 111, 5, 8, 0, 0, 111, 113, 3, 12, 6, 0, 112, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 5, 28, 0, 0, 115, 139, 1, 0, 0, 0, 116, 117, 5, 5, 0, 0, 117, 118, 5, 30, 0, 0, 118, 119, 3, 12, 6, 0, 119, 120, 5, 31, 0, 0, 120, 123, 3, 10, 5, 0, 121, 122, 5, 6, 0, 0, 122, 124, 3, 10, 5, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 139, 1, 0, 0, 0, 125, 126, 5, 7, 0, 0, 126, 127, 5, 30, 0, 0, 127, 128, 3, 12, 6, 0, 128, 129, 5, 31, 0, 0, 129, 130, 3, 10, 5, 0, 130, 139, 1, 0, 0, 0, 131, 132, 5, 4, 0, 0, 132, 133, 3, 12, 6, 0, 133, 134, 5, 28, 0, 0, 134, 139, 1, 0, 0, 0, 135, 136, 3, 12, 6, 0, 136, 137, 5, 28, 0, 0, 137, 139, 1, 0, 0, 0, 138, 100, 1, 0, 0, 0, 138, 108, 1, 0, 0, 0, 138, 116, 1, 0, 0, 0, 138, 125, 1, 0, 0, 0, 138, 131, 1, 0, 0, 0, 138, 135, 1, 0, 0, 0, 139, 11, 1, 0, 0, 0, 140, 141, 6, 6, -1, 0, 141, 176, 5, 36, 0, 0, 142, 176, 5, 37, 0, 0, 143, 176, 5, 38, 0, 0, 144, 145, 5, 30, 0, 0, 145, 146, 3, 12, 6, 0, 146, 147, 5, 31, 0, 0, 147, 176, 1, 0, 0, 0, 148, 149, 5, 36, 0, 0, 149, 158, 5, 30, 0, 0, 150, 155, 3, 12, 6, 0, 151, 152, 5, 29, 0, 0, 152, 154, 3, 12, 6, 0, 153, 151, 1, 0, 0, 0, 154, 157, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 158, 150, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 176, 5, 31, 0, 0, 161, 162, 5, 23, 0, 0, 162, 176, 3, 12, 6, 14, 163, 164, 5, 24, 0, 0, 164, 176, 3, 12, 6, 13, 165, 166, 5, 9, 0, 0, 166, 176, 3, 12, 6, 12, 167, 168, 5, 10, 0, 0, 168, 176, 3, 12, 6, 11, 169, 170, 5, 22, 0, 0, 170, 176, 3, 12, 6, 10, 171, 172, 5, 11, 0, 0, 172, 176, 3, 12, 6, 9, 173, 174, 5, 27, 0, 0, 174, 176, 3, 12, 6, 8, 175, 140, 1, 0, 0, 0, 175, 142, 1, 0, 0, 0, 175, 143, 1, 0, 0, 0, 175, 144, 1, 0, 0, 0, 175, 148, 1, 0, 0, 0, 175, 161, 1, 0, 0, 0, 175, 163, 1, 0, 0, 0, 175, 165, 1, 0, 0, 0, 175, 167, 1, 0, 0, 0, 175, 169, 1, 0, 0, 0, 175, 171, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 215, 1, 0, 0, 0, 177, 178, 10, 7, 0, 0, 178, 179, 7, 0, 0, 0, 179, 214, 3, 12, 6, 8, 180, 181, 10, 6, 0, 0, 181, 182, 7, 1, 0, 0, 182, 214, 3, 12, 6, 7, 183, 184, 10, 5, 0, 0, 184, 185, 7, 2, 0, 0, 185, 214, 3, 12, 6, 6, 186, 187, 10, 4, 0, 0, 187, 188, 7, 3, 0, 0, 188, 214, 3, 12, 6, 5, 189, 190, 10, 3, 0, 0, 190, 191, 5, 20, 0, 0, 191, 214, 3, 12, 6, 4, 192, 193, 10, 2, 0, 0, 193, 194, 5, 21, 0, 0, 194, 214, 3, 12, 6, 3, 195, 196, 10, 1, 0, 0, 196, 197, 5, 8, 0, 0, 197, 214, 3, 12, 6, 1, 198, 199, 10, 20, 0, 0, 199, 214, 5, 23, 0, 0, 200, 201, 10, 19, 0, 0, 201, 214, 5, 24, 0, 0, 202, 203, 10, 18, 0, 0, 203, 204, 5, 34, 0, 0, 204, 205, 3, 12, 6, 0, 205, 206, 5, 35, 0, 0, 206, 214, 1, 0, 0, 0, 207, 208, 10, 17, 0, 0, 208, 209, 5, 25, 0, 0, 209, 214, 5, 36, 0, 0, 210, 211, 10, 16, 0, 0, 211, 212, 5, 26, 0, 0, 212, 214, 5, 36, 0, 0, 213, 177, 1, 0, 0, 0, 213, 180, 1, 0, 0, 0, 213, 183, 1, 0, 0, 0, 213, 186, 1, 0, 0, 0, 213, 189, 1, 0, 0, 0, 213, 192, 1, 0, 0, 0, 213, 195, 1, 0, 0, 0, 213, 198, 1, 0, 0, 0, 213, 200, 1, 0, 0, 0, 213, 202, 1, 0, 0, 0, 213, 207, 1, 0, 0, 0, 213, 210, 1, 0, 0, 0, 214, 217, 1, 0, 0, 0, 215, 213, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 13, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 19, 17, 31, 40, 47, 62, 66, 76, 84, 95, 98, 104, 112, 123, 138, 155, 158, 175, 213, 215] \ No newline at end of file diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/Splc.tokens b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/Splc.tokens deleted file mode 100644 index 66553e7..0000000 --- a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/Splc.tokens +++ /dev/null @@ -1,76 +0,0 @@ -INT=1 -CHAR=2 -STRUCT=3 -RETURN=4 -IF=5 -ELSE=6 -WHILE=7 -ASSIGN=8 -PLUS=9 -MINUS=10 -STAR=11 -DIV=12 -MOD=13 -LT=14 -LE=15 -GT=16 -GE=17 -EQ=18 -NEQ=19 -AND=20 -OR=21 -NOT=22 -INC=23 -DEC=24 -DOT=25 -ARROW=26 -AMP=27 -SEMI=28 -COMMA=29 -LPAREN=30 -RPAREN=31 -LBRACE=32 -RBRACE=33 -LBRACK=34 -RBRACK=35 -Identifier=36 -Number=37 -Char=38 -WS=39 -LINE_COMMENT=40 -BLOCK_COMMENT=41 -'int'=1 -'char'=2 -'struct'=3 -'return'=4 -'if'=5 -'else'=6 -'while'=7 -'='=8 -'+'=9 -'-'=10 -'*'=11 -'/'=12 -'%'=13 -'<'=14 -'<='=15 -'>'=16 -'>='=17 -'=='=18 -'!='=19 -'&&'=20 -'||'=21 -'!'=22 -'++'=23 -'--'=24 -'.'=25 -'->'=26 -'&'=27 -';'=28 -','=29 -'('=30 -')'=31 -'{'=32 -'}'=33 -'['=34 -']'=35 diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcBaseListener.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcBaseListener.class deleted file mode 100644 index b620eba..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcBaseListener.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcBaseVisitor.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcBaseVisitor.class deleted file mode 100644 index f8216dc..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcBaseVisitor.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.class deleted file mode 100644 index 2acc155..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.interp b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.interp deleted file mode 100644 index 16e5e50..0000000 --- a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.interp +++ /dev/null @@ -1,140 +0,0 @@ -token literal names: -null -'int' -'char' -'struct' -'return' -'if' -'else' -'while' -'=' -'+' -'-' -'*' -'/' -'%' -'<' -'<=' -'>' -'>=' -'==' -'!=' -'&&' -'||' -'!' -'++' -'--' -'.' -'->' -'&' -';' -',' -'(' -')' -'{' -'}' -'[' -']' -null -null -null -null -null -null - -token symbolic names: -null -INT -CHAR -STRUCT -RETURN -IF -ELSE -WHILE -ASSIGN -PLUS -MINUS -STAR -DIV -MOD -LT -LE -GT -GE -EQ -NEQ -AND -OR -NOT -INC -DEC -DOT -ARROW -AMP -SEMI -COMMA -LPAREN -RPAREN -LBRACE -RBRACE -LBRACK -RBRACK -Identifier -Number -Char -WS -LINE_COMMENT -BLOCK_COMMENT - -rule names: -INT -CHAR -STRUCT -RETURN -IF -ELSE -WHILE -ASSIGN -PLUS -MINUS -STAR -DIV -MOD -LT -LE -GT -GE -EQ -NEQ -AND -OR -NOT -INC -DEC -DOT -ARROW -AMP -SEMI -COMMA -LPAREN -RPAREN -LBRACE -RBRACE -LBRACK -RBRACK -Identifier -Number -Char -WS -LINE_COMMENT -BLOCK_COMMENT - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[4, 0, 41, 242, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 5, 35, 188, 8, 35, 10, 35, 12, 35, 191, 9, 35, 1, 36, 1, 36, 1, 36, 5, 36, 196, 8, 36, 10, 36, 12, 36, 199, 9, 36, 3, 36, 201, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 207, 8, 37, 1, 37, 1, 37, 1, 38, 4, 38, 212, 8, 38, 11, 38, 12, 38, 213, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 222, 8, 39, 10, 39, 12, 39, 225, 9, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 233, 8, 40, 10, 40, 12, 40, 236, 9, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 234, 0, 41, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 1, 0, 8, 3, 0, 65, 90, 95, 95, 97, 122, 3, 0, 48, 57, 65, 90, 97, 122, 1, 0, 49, 57, 1, 0, 48, 57, 4, 0, 10, 10, 13, 13, 39, 39, 92, 92, 5, 0, 39, 39, 48, 48, 92, 92, 110, 110, 116, 116, 3, 0, 9, 10, 13, 13, 32, 32, 2, 0, 10, 10, 13, 13, 248, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 1, 83, 1, 0, 0, 0, 3, 87, 1, 0, 0, 0, 5, 92, 1, 0, 0, 0, 7, 99, 1, 0, 0, 0, 9, 106, 1, 0, 0, 0, 11, 109, 1, 0, 0, 0, 13, 114, 1, 0, 0, 0, 15, 120, 1, 0, 0, 0, 17, 122, 1, 0, 0, 0, 19, 124, 1, 0, 0, 0, 21, 126, 1, 0, 0, 0, 23, 128, 1, 0, 0, 0, 25, 130, 1, 0, 0, 0, 27, 132, 1, 0, 0, 0, 29, 134, 1, 0, 0, 0, 31, 137, 1, 0, 0, 0, 33, 139, 1, 0, 0, 0, 35, 142, 1, 0, 0, 0, 37, 145, 1, 0, 0, 0, 39, 148, 1, 0, 0, 0, 41, 151, 1, 0, 0, 0, 43, 154, 1, 0, 0, 0, 45, 156, 1, 0, 0, 0, 47, 159, 1, 0, 0, 0, 49, 162, 1, 0, 0, 0, 51, 164, 1, 0, 0, 0, 53, 167, 1, 0, 0, 0, 55, 169, 1, 0, 0, 0, 57, 171, 1, 0, 0, 0, 59, 173, 1, 0, 0, 0, 61, 175, 1, 0, 0, 0, 63, 177, 1, 0, 0, 0, 65, 179, 1, 0, 0, 0, 67, 181, 1, 0, 0, 0, 69, 183, 1, 0, 0, 0, 71, 185, 1, 0, 0, 0, 73, 200, 1, 0, 0, 0, 75, 202, 1, 0, 0, 0, 77, 211, 1, 0, 0, 0, 79, 217, 1, 0, 0, 0, 81, 228, 1, 0, 0, 0, 83, 84, 5, 105, 0, 0, 84, 85, 5, 110, 0, 0, 85, 86, 5, 116, 0, 0, 86, 2, 1, 0, 0, 0, 87, 88, 5, 99, 0, 0, 88, 89, 5, 104, 0, 0, 89, 90, 5, 97, 0, 0, 90, 91, 5, 114, 0, 0, 91, 4, 1, 0, 0, 0, 92, 93, 5, 115, 0, 0, 93, 94, 5, 116, 0, 0, 94, 95, 5, 114, 0, 0, 95, 96, 5, 117, 0, 0, 96, 97, 5, 99, 0, 0, 97, 98, 5, 116, 0, 0, 98, 6, 1, 0, 0, 0, 99, 100, 5, 114, 0, 0, 100, 101, 5, 101, 0, 0, 101, 102, 5, 116, 0, 0, 102, 103, 5, 117, 0, 0, 103, 104, 5, 114, 0, 0, 104, 105, 5, 110, 0, 0, 105, 8, 1, 0, 0, 0, 106, 107, 5, 105, 0, 0, 107, 108, 5, 102, 0, 0, 108, 10, 1, 0, 0, 0, 109, 110, 5, 101, 0, 0, 110, 111, 5, 108, 0, 0, 111, 112, 5, 115, 0, 0, 112, 113, 5, 101, 0, 0, 113, 12, 1, 0, 0, 0, 114, 115, 5, 119, 0, 0, 115, 116, 5, 104, 0, 0, 116, 117, 5, 105, 0, 0, 117, 118, 5, 108, 0, 0, 118, 119, 5, 101, 0, 0, 119, 14, 1, 0, 0, 0, 120, 121, 5, 61, 0, 0, 121, 16, 1, 0, 0, 0, 122, 123, 5, 43, 0, 0, 123, 18, 1, 0, 0, 0, 124, 125, 5, 45, 0, 0, 125, 20, 1, 0, 0, 0, 126, 127, 5, 42, 0, 0, 127, 22, 1, 0, 0, 0, 128, 129, 5, 47, 0, 0, 129, 24, 1, 0, 0, 0, 130, 131, 5, 37, 0, 0, 131, 26, 1, 0, 0, 0, 132, 133, 5, 60, 0, 0, 133, 28, 1, 0, 0, 0, 134, 135, 5, 60, 0, 0, 135, 136, 5, 61, 0, 0, 136, 30, 1, 0, 0, 0, 137, 138, 5, 62, 0, 0, 138, 32, 1, 0, 0, 0, 139, 140, 5, 62, 0, 0, 140, 141, 5, 61, 0, 0, 141, 34, 1, 0, 0, 0, 142, 143, 5, 61, 0, 0, 143, 144, 5, 61, 0, 0, 144, 36, 1, 0, 0, 0, 145, 146, 5, 33, 0, 0, 146, 147, 5, 61, 0, 0, 147, 38, 1, 0, 0, 0, 148, 149, 5, 38, 0, 0, 149, 150, 5, 38, 0, 0, 150, 40, 1, 0, 0, 0, 151, 152, 5, 124, 0, 0, 152, 153, 5, 124, 0, 0, 153, 42, 1, 0, 0, 0, 154, 155, 5, 33, 0, 0, 155, 44, 1, 0, 0, 0, 156, 157, 5, 43, 0, 0, 157, 158, 5, 43, 0, 0, 158, 46, 1, 0, 0, 0, 159, 160, 5, 45, 0, 0, 160, 161, 5, 45, 0, 0, 161, 48, 1, 0, 0, 0, 162, 163, 5, 46, 0, 0, 163, 50, 1, 0, 0, 0, 164, 165, 5, 45, 0, 0, 165, 166, 5, 62, 0, 0, 166, 52, 1, 0, 0, 0, 167, 168, 5, 38, 0, 0, 168, 54, 1, 0, 0, 0, 169, 170, 5, 59, 0, 0, 170, 56, 1, 0, 0, 0, 171, 172, 5, 44, 0, 0, 172, 58, 1, 0, 0, 0, 173, 174, 5, 40, 0, 0, 174, 60, 1, 0, 0, 0, 175, 176, 5, 41, 0, 0, 176, 62, 1, 0, 0, 0, 177, 178, 5, 123, 0, 0, 178, 64, 1, 0, 0, 0, 179, 180, 5, 125, 0, 0, 180, 66, 1, 0, 0, 0, 181, 182, 5, 91, 0, 0, 182, 68, 1, 0, 0, 0, 183, 184, 5, 93, 0, 0, 184, 70, 1, 0, 0, 0, 185, 189, 7, 0, 0, 0, 186, 188, 7, 1, 0, 0, 187, 186, 1, 0, 0, 0, 188, 191, 1, 0, 0, 0, 189, 187, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 72, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 192, 201, 5, 48, 0, 0, 193, 197, 7, 2, 0, 0, 194, 196, 7, 3, 0, 0, 195, 194, 1, 0, 0, 0, 196, 199, 1, 0, 0, 0, 197, 195, 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, 198, 201, 1, 0, 0, 0, 199, 197, 1, 0, 0, 0, 200, 192, 1, 0, 0, 0, 200, 193, 1, 0, 0, 0, 201, 74, 1, 0, 0, 0, 202, 206, 5, 39, 0, 0, 203, 207, 8, 4, 0, 0, 204, 205, 5, 92, 0, 0, 205, 207, 7, 5, 0, 0, 206, 203, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 5, 39, 0, 0, 209, 76, 1, 0, 0, 0, 210, 212, 7, 6, 0, 0, 211, 210, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 6, 38, 0, 0, 216, 78, 1, 0, 0, 0, 217, 218, 5, 47, 0, 0, 218, 219, 5, 47, 0, 0, 219, 223, 1, 0, 0, 0, 220, 222, 8, 7, 0, 0, 221, 220, 1, 0, 0, 0, 222, 225, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 226, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 227, 6, 39, 0, 0, 227, 80, 1, 0, 0, 0, 228, 229, 5, 47, 0, 0, 229, 230, 5, 42, 0, 0, 230, 234, 1, 0, 0, 0, 231, 233, 9, 0, 0, 0, 232, 231, 1, 0, 0, 0, 233, 236, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 234, 232, 1, 0, 0, 0, 235, 237, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 237, 238, 5, 42, 0, 0, 238, 239, 5, 47, 0, 0, 239, 240, 1, 0, 0, 0, 240, 241, 6, 40, 0, 0, 241, 82, 1, 0, 0, 0, 8, 0, 189, 197, 200, 206, 213, 223, 234, 1, 6, 0, 0] \ No newline at end of file diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.tokens b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.tokens deleted file mode 100644 index 66553e7..0000000 --- a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcLexer.tokens +++ /dev/null @@ -1,76 +0,0 @@ -INT=1 -CHAR=2 -STRUCT=3 -RETURN=4 -IF=5 -ELSE=6 -WHILE=7 -ASSIGN=8 -PLUS=9 -MINUS=10 -STAR=11 -DIV=12 -MOD=13 -LT=14 -LE=15 -GT=16 -GE=17 -EQ=18 -NEQ=19 -AND=20 -OR=21 -NOT=22 -INC=23 -DEC=24 -DOT=25 -ARROW=26 -AMP=27 -SEMI=28 -COMMA=29 -LPAREN=30 -RPAREN=31 -LBRACE=32 -RBRACE=33 -LBRACK=34 -RBRACK=35 -Identifier=36 -Number=37 -Char=38 -WS=39 -LINE_COMMENT=40 -BLOCK_COMMENT=41 -'int'=1 -'char'=2 -'struct'=3 -'return'=4 -'if'=5 -'else'=6 -'while'=7 -'='=8 -'+'=9 -'-'=10 -'*'=11 -'/'=12 -'%'=13 -'<'=14 -'<='=15 -'>'=16 -'>='=17 -'=='=18 -'!='=19 -'&&'=20 -'||'=21 -'!'=22 -'++'=23 -'--'=24 -'.'=25 -'->'=26 -'&'=27 -';'=28 -','=29 -'('=30 -')'=31 -'{'=32 -'}'=33 -'['=34 -']'=35 diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcListener.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcListener.class deleted file mode 100644 index b148f03..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcListener.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$BracketContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$BracketContext.class deleted file mode 100644 index e45b5dd..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$BracketContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ExprStmtContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ExprStmtContext.class deleted file mode 100644 index 7d84c0d..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ExprStmtContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ExpressionContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ExpressionContext.class deleted file mode 100644 index c69f877..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ExpressionContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$FuncArgsContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$FuncArgsContext.class deleted file mode 100644 index d5c74c4..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$FuncArgsContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$GlobalDefContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$GlobalDefContext.class deleted file mode 100644 index f830717..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$GlobalDefContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$IfStmtContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$IfStmtContext.class deleted file mode 100644 index 7488d6b..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$IfStmtContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ProgramContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ProgramContext.class deleted file mode 100644 index 898e569..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ProgramContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ReturnStmtContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ReturnStmtContext.class deleted file mode 100644 index 26c8bad..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$ReturnStmtContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$SpecifierContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$SpecifierContext.class deleted file mode 100644 index 267ba8d..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$SpecifierContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$StatementContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$StatementContext.class deleted file mode 100644 index b3b1653..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$StatementContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$VarDecContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$VarDecContext.class deleted file mode 100644 index c8503bf..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$VarDecContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$VarDecStmtContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$VarDecStmtContext.class deleted file mode 100644 index b6b4660..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$VarDecStmtContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$WhileStmtContext.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$WhileStmtContext.class deleted file mode 100644 index 2017d7f..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser$WhileStmtContext.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser.class deleted file mode 100644 index 749d7ab..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcParser.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcVisitor.class b/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcVisitor.class deleted file mode 100644 index 4242d4a..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/generated/Splc/SplcVisitor.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$ArrayType.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$ArrayType.class deleted file mode 100644 index ec1364f..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$ArrayType.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$BasicType$Kind.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$BasicType$Kind.class deleted file mode 100644 index 6e5204b..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$BasicType$Kind.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$BasicType.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$BasicType.class deleted file mode 100644 index 479945a..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$BasicType.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$FunctionType.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$FunctionType.class deleted file mode 100644 index 0ddfe67..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$FunctionType.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$PointerType.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$PointerType.class deleted file mode 100644 index 137e388..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$PointerType.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$SemanticAnalyzer.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$SemanticAnalyzer.class deleted file mode 100644 index 6215066..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$SemanticAnalyzer.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$StructType$Member.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$StructType$Member.class deleted file mode 100644 index 5c354ca..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$StructType$Member.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$StructType.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$StructType.class deleted file mode 100644 index 2886f80..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$StructType.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$Symbol$Kind.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$Symbol$Kind.class deleted file mode 100644 index d62ed05..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$Symbol$Kind.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$Symbol.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$Symbol.class deleted file mode 100644 index 1871616..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$Symbol.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$SymbolTable.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$SymbolTable.class deleted file mode 100644 index 23ca8fb..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler$SymbolTable.class and /dev/null differ diff --git a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler.class b/out/production/CS323-Compilers-2025F-Projects/impl/Compiler.class deleted file mode 100644 index 0a66988..0000000 Binary files a/out/production/CS323-Compilers-2025F-Projects/impl/Compiler.class and /dev/null differ diff --git a/src/main/java/impl/Compiler.java b/src/main/java/impl/Compiler.java index b8503d9..615dd0e 100644 --- a/src/main/java/impl/Compiler.java +++ b/src/main/java/impl/Compiler.java @@ -602,9 +602,15 @@ public Type visitGlobalDef(SplcParser.GlobalDefContext ctx) { // Check for incomplete type - if (!isCompleteType(varType)) { + // For arrays, the element type must be complete immediately + // For direct struct types, we can defer the check per v4 spec + if (requiresImmediateCompletenessCheck(varType)) { + if (!isCompleteType(varType)) { + grader.reportSemanticError(Project3SemanticError.definitionIncomplete(getIdentifierNode(ctx.varDec()))); + } + } else if (!isCompleteType(varType)) { + // Defer check for direct struct types incompleteGlobals.put(new Symbol(varName, varType, Symbol.Kind.VARIABLE, 0), getIdentifierNode(ctx.varDec())); - } // Check redefinition @@ -624,11 +630,19 @@ public Type visitGlobalDef(SplcParser.GlobalDefContext ctx) { // Function declaration: specifier Identifier LPAREN funcArgs RPAREN SEMI TerminalNode funcName = ctx.Identifier(); List paramTypes = new ArrayList<>(); + Set paramNames = new HashSet<>(); if (ctx.funcArgs().specifier() != null && !ctx.funcArgs().specifier().isEmpty()) { for (int i = 0; i < ctx.funcArgs().specifier().size(); i++) { Type paramSpecType = visitSpecifier(ctx.funcArgs().specifier(i)); Type paramType = buildTypeFromVarDec(ctx.funcArgs().varDec(i), paramSpecType); paramTypes.add(paramType); + + // Check for duplicate parameter names + String paramName = extractIdentifierFromVarDec(ctx.funcArgs().varDec(i)); + if (paramNames.contains(paramName)) { + grader.reportSemanticError(Project3SemanticError.redefinition(getIdentifierNode(ctx.funcArgs().varDec(i)))); + } + paramNames.add(paramName); } } @@ -862,5 +876,19 @@ private boolean isCompleteType(Type type) { } return false; } + + // Check if this type requires immediate completeness check (for arrays) + // vs deferred check (for global struct variables per v4 spec) + private boolean requiresImmediateCompletenessCheck(Type type) { + if (type instanceof ArrayType) { + // Arrays always require immediate check of element type + return true; + } else if (type instanceof PointerType) { + // Pointers don't require immediate check + return false; + } + // Direct struct types can be deferred for global variables + return false; + } } } \ No newline at end of file diff --git a/test_runner.sh b/test_runner.sh new file mode 100755 index 0000000..c19ed54 --- /dev/null +++ b/test_runner.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Simple test runner for project3 test cases + +for testfile in testcases/project3/*.splc; do + basename=$(basename "$testfile" .splc) + expected="testcases/project3/${basename}.txt" + + echo "Testing: $basename" + + # Create a temporary Main.java + cat > /tmp/TempMain.java << EOF +import framework.AbstractGrader; +import framework.project3.Grader; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +public class TempMain { + public static void main(String[] args) throws IOException { + InputStream input = new FileInputStream("$testfile"); + AbstractGrader grader = new Grader(input, System.out); + grader.run(); + } +} +EOF + + # Compile and run + javac -cp "libs/antlr-4.13.2-complete.jar:out/production" /tmp/TempMain.java -d /tmp 2>/dev/null + actual=$(java -cp "libs/antlr-4.13.2-complete.jar:out/production:/tmp" TempMain 2>&1) + expected_output=$(cat "$expected") + + if [ "$actual" = "$expected_output" ]; then + echo " ✓ PASS" + else + echo " ✗ FAIL" + echo " Expected: $expected_output" + echo " Actual: $actual" + fi + echo +done diff --git a/testcases/project3/err_04.txt b/testcases/project3/err_04.txt index e69de29..504fa50 100644 --- a/testcases/project3/err_04.txt +++ b/testcases/project3/err_04.txt @@ -0,0 +1 @@ +3:9: error: Definition of incomplete type 'b2'