diff --git a/src/main/antlr/TurtleParser.g b/src/main/antlr/TurtleParser.g index dc8fa56..3f87d42 100644 --- a/src/main/antlr/TurtleParser.g +++ b/src/main/antlr/TurtleParser.g @@ -27,25 +27,24 @@ bloc : sujet listvc P ; sujet : LC entity RC ; -listvc : LC vc RC more +listvc : LC vc RC more // caca ; more : SEMI listvc | ; -vc : LC verbe RC listc +vc : LC verbe RC listc //REvoir avec un arbre car in géné avec listvc < com > ; listc : LC comp RC morec ; morec : V comp | ; +verbe : ID + ; +comp : ID + ; entity : ID ; -verbe : ID - ; -comp : ID - ; - - + turtle returns[TurtleAST t]: EOF { $t = null ; }; \ No newline at end of file diff --git a/src/main/java/TP1/Main.java b/src/main/java/TP1/Main.java index f68d23c..0015ed8 100644 --- a/src/main/java/TP1/Main.java +++ b/src/main/java/TP1/Main.java @@ -92,7 +92,7 @@ public class Main { } public static void main(String[] args) throws RecognitionException { // Switch between the two fonctions as you make progress - manualAST(); - // antlrAST(args); + //manualAST(); + antlrAST(args); } }