readme
This commit is contained in:
56
README.md
56
README.md
@@ -1,17 +1,55 @@
|
|||||||
# TP2 PDS - VSL+
|
# TP2 PDS - VSL+
|
||||||
|
|
||||||
Ce projet VSCode contient tout le nécessaire pour commencer à programmer le compilateur.
|
Réalisé par Thibaut ROCHAS et Tuan Minh VU
|
||||||
|
|
||||||
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,)
|
|
||||||
|
|
||||||
|
|
||||||
|
#### 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é
|
## Compatibilité
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user