Bonjour,
Je dois faire un compilateur Caml en Caml, et quand je lance mon makefile, j'ai une erreur de syntaxe dans mon arbre de syntaxe abstraite que je ne comprend pas...

File "ast.mli", line 17, characters 3-14:
Syntax error
make: *** [main.cma] Erreur 2


Voilà le fichier complet avec en rouge la ligne qui me pose problème... :

Je soupçonne l'erreur stupide. Je ne suis ni à laise avec la compilation, ni avec caml donc...

Merci pour votre aide

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
type fichier = decl list

and decl =
    | Let of motif*expr
    | Let of string*motif*expr
    | Let of expr
    
and motif =
    | Var of string
    
and expr =
    | simple_expr
    | Fun of motif*expr
    | Unop of unop*expr
    | Op of expr*op*expr
    | EsE of expr*simple_expr
    | Concat of expr*expr
    | If of expr*expr*expr
    | Letin of motif*expr*expr
    | Letin of ident*motif*expr*expr
    | Match of expr*ewpr
    | AddList of motif*motif*expr
    
and simple_expr =
    | expr
    | Var of string
    | Cst of const
    
and op = Sum | Diff | Mult | Div | SumF | DiffF | MultF | InfEq | SupEq | Sup | Inf | Diff | Eq | Et | Ou

and unop = Minus | MinusF | Not

and const =
    | Cst of int
    | Cst of float
    | Cst of bool
    | String of string
;;