Fixed Renaming Errors
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
i22035 2024-07-04 17:02:02 +02:00
parent 31929878b0
commit ceb1231632
3 changed files with 52 additions and 13 deletions

View File

@ -43,20 +43,63 @@ src/
└── resources/
test/
└── java/
│ ├── main/ -> MainTest, E2ETests, UtilityTests
├── parser/ -> Performs tests on the parser
│ └── semantic/ -> Performs tests on the semantic check
└── resources/ -> Ressources for running the Tests
│ ├── main/ -> Running E2E tests
├── parser/ -> Performs tests on the parser
│ ├── semantic/ -> Performs tests on the semantic check
└── resources/ -> Ressources for running the Tests
```
## Class-Diagramm AST
![AST Diagramm](ast.png)
## Distribution of the realisation
### i22030 & i22035
Parser:
- Grammar -> (src/main/java/parser/grammar)
- Scanner
- Parser
- Abstract Syntax Tree (AST) -> (src/main/java/ast)
- AstBuilder -> (src/main/java/parser/astBuilder)
Parser tests:
- ParserTests -> (src/test/java/parser)
- TestCases -> (src/test/resources/input/singeFeatureTests)
Other:
- Documentation -> (README.md)
- Ast Class-Diagramm -> (ast.png)
- PowerPoint
### i22005
Semantic check:
- Set all types and check whether types have been used correctly
- Contexts -> (src/main/java/semantic/context)
- Exceptions Handling -> (src/main/java/semantic/exceptions)
Semantic Tests:
- Typing and Type checking -> (src/test/java/semantic/EndToTypedAstTest)
- Exception and feature test -> (src/test/resources/input/typedAstExceptionsTests)
### i22007
Bytecode generation:
- Complete bytecode generation -> (src/mein/java/bytecode)
### i22011
Tests and execution:
- Makefile
- Running Compiler -> (src/main/main)
- Running E2E tests -> (src/test/main)
- Typing and Type checking -> (src/test/java/semantic/EndToTypedAstTest)
## Used Tools
- [Maven 4.0](https://maven.apache.org/index.html)
- Used for automating the build process and managing dependencies.
- Used for automating the build process and managing dependencies.
- [ANTLR4 v.13.1](https://www.antlr.org/)
- Used to parse the input Java code into the Abstract Syntax Tree.

View File

@ -33,7 +33,7 @@ import com.sun.jdi.IntegerType;
import semantic.context.ClassContext;
import semantic.context.Context;
import semantic.exceptions.*;
import typechecker.TypeCheckResult;
import semantic.TypeCheckResult;
public class SemanticAnalyzer implements SemanticVisitor {
@ -480,8 +480,8 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(DotNode toCheck) {
if (toCheck.dotSubstractionExpression != null) {
var result = toCheck.dotSubstractionExpression.accept(this);
if (toCheck.dotSubtractionExpression != null) {
var result = toCheck.dotSubtractionExpression.accept(this);
toCheck.setType(result.getType());
return result;
}
@ -489,7 +489,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
@Override
public TypeCheckResult analyze(DotSubstractionNode toCheck) {
public TypeCheckResult analyze(DotSubtractionNode toCheck) {
if (toCheck.value != null) {
var result = toCheck.value.accept(this);
toCheck.setType(result.getType());

View File

@ -2,8 +2,6 @@ package main;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import parser.ParserTest;
import parser.ScannerTest;
import semantic.EndToTypedAstTest;
import semantic.SemanticTest;
@ -15,8 +13,6 @@ import semantic.SemanticTest;
@RunWith(Suite.class)
@Suite.SuiteClasses({
InputFilesTest.class,
ScannerTest.class,
ParserTest.class,
SemanticTest.class,
EndToTypedAstTest.class
})