Fixed Renaming Errors
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
31929878b0
commit
ceb1231632
53
readme.md
53
readme.md
@ -43,20 +43,63 @@ 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)
|
||||||
- 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/)
|
- [ANTLR4 v.13.1](https://www.antlr.org/)
|
||||||
- Used to parse the input Java code into the Abstract Syntax Tree.
|
- Used to parse the input Java code into the Abstract Syntax Tree.
|
||||||
|
|
||||||
|
@ -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());
|
||||||
|
@ -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
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user