pretty printer mais en mieu
This commit is contained in:
@@ -9,12 +9,29 @@ public class ASD_Turtle implements TurtleASD {
|
|||||||
sealed interface Complement{}
|
sealed interface Complement{}
|
||||||
sealed interface Entity{}
|
sealed interface Entity{}
|
||||||
|
|
||||||
record TurtleImp(List<PhraseImp> phrases) implements Turtle{}
|
record TurtleImp(List<PhraseImp> phrases) implements Turtle{
|
||||||
|
public String toString(){
|
||||||
|
String str = "";
|
||||||
|
for (PhraseImp phrase : this.phrases) {
|
||||||
|
str+= phrase.toString();
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
}
|
||||||
record PhraseImp(EntityImp entity, List<AffectationImp> affs) implements Phrase{}
|
record PhraseImp(EntityImp entity, List<AffectationImp> affs) implements Phrase{}
|
||||||
record AffectationImp(EntityImp entity, List<Complement> complements) implements Affectation{}
|
record AffectationImp(EntityImp entity, List<Complement> complements) implements Affectation{}
|
||||||
record Complement_EntityImp(EntityImp entity) implements Complement{}
|
record Complement_EntityImp(EntityImp entity) implements Complement{}
|
||||||
record Complement_TextImp(String string) implements Complement{}
|
record Complement_TextImp(String string) implements Complement{
|
||||||
record EntityImp(String string) implements Entity{}
|
public String toString(){
|
||||||
|
return " \" " + this.string + " \"";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
record EntityImp(String string) implements Entity{
|
||||||
|
public String toString(){
|
||||||
|
return this.string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void prettyPrinter(TurtleImp t){
|
public void prettyPrinter(TurtleImp t){
|
||||||
for (PhraseImp phrase : t.phrases) {
|
for (PhraseImp phrase : t.phrases) {
|
||||||
|
|||||||
Reference in New Issue
Block a user