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,16 +43,59 @@ src/
└── resources/ └── resources/
test/ test/
└── java/ └── java/
│ ├── main/ -> MainTest, E2ETests, UtilityTests │ ├── main/ -> Running E2E tests
├── parser/ -> Performs tests on the parser ├── parser/ -> Performs tests on the parser
│ └── semantic/ -> Performs tests on the semantic check │ ├── semantic/ -> Performs tests on the semantic check
└── resources/ -> Ressources for running the Tests └── resources/ -> Ressources for running the Tests
``` ```
## Class-Diagramm AST ## Class-Diagramm AST
![AST Diagramm](ast.png) ![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 ## Used Tools
- [Maven 4.0](https://maven.apache.org/index.html) - [Maven 4.0](https://maven.apache.org/index.html)

View File

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

View File

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