diff --git a/README.md b/README.md index c0610f9..588dc54 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,55 @@ # TP2 PDS - VSL+ -Ce projet VSCode contient tout le nécessaire pour commencer à programmer le compilateur. - -Vous pouvez forker ce dépôt, mais devez impérativement garder votre dépôt privé. - -Ce fichier `README.md` doit être complété au fur et à mesure de votre avancement. - - -func::=Func(String,) - +Réalisé par Thibaut ROCHAS et Tuan Minh VU +#### Program +``` +Program ::= Program(Function+) +``` +#### Function +``` +Function ::= Function(Type, String, Var*, Instruction) + | Prototype(Type, String, Var*) +``` +#### Var +``` +Var ::= Var(String) +``` +#### Declaration +``` +Declaration ::= Declaration(Type, String+) +``` +#### Instruction +``` +Instruction ::= Assign(String, Expression) + | Return(Expression) + | Bloc(Instruction+) + | BlocWithDecl(DeclarationList, Instruction+) + | VoidFunctionCall(String, Expression*) + | IfThen(Expression, Instruction) + | IfThenElse(Expression, Instruction, Instruction) + | While(Expression, Instruction) + | Read(Var+) + | Print(ExpressionOuText+) +``` +#### Expression +``` +ExpressionOuText ::= Expression + | Text(String) +Expression ::= Binop(Op, Expression, Expression) + | Const(Int) + | Var(String) + | Call(String, Expression*) + | Paren(Expression) +``` +#### Autres +``` +Op ::= PLUS | MINUS | TIMES | DIV | MOD +Type ::= INT | VOID +``` +## Etat ## Compatibilité diff --git a/a.out b/a.out index f0013e8..4d71261 100755 Binary files a/a.out and b/a.out differ