Skip to content
Snippets Groups Projects
Commit f605cb1a authored by hannah.blech's avatar hannah.blech :dancer:
Browse files

comitt files

parent 20d0f3e1
Branches main
No related tags found
No related merge requests found
import java.util.List;
public class Analyse {
private String eingabe;
private List<Token> tokenliste;
private Parser parser;
private Scanner scanner;
public Analyse(String pEingabe){
public Analyse(String pEingabe) {
tokenliste = new <List>;
eingabe = pEingabe;
}
public void analysiere(){
analysiere();
public void analysiere () {
if (eingabe != "") {
scanner = new Scanner(eingabe, tokenliste);
scanner.scanne();
if (!scanner.isFehler()) {
parser = new Parser(scanner.getTokenliste());
System.out.println("Parsen hat funktioniert: " + parser.parse());
} else {
System.out.println("Scannen wurde aufgrund eines Fehlers abgebrochen: Bitte versuche es mit einer richtigen Eingabe erneut");
}
} else {
System.out.println("Die Eingabe ist leer. Das Programm wird beendet.");
}
}
}}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment