Bonjour,

Je construis actuellement un interpréteur.
Dans mon .y, j'ai ajouté un %union et voici les messages d'erreurs que j'ai :

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
interpreter.l:21: error: âyylvalâ undeclared (first use in this function)
interpreter.l:21: error: (Each undeclared identifier is reported only once
interpreter.l:21: error: for each function it appears in.)
interpreter.l:21: error: âINTâ undeclared (first use in this function)
interpreter.l:22: error: âSTRINGâ undeclared (first use in this function)
interpreter.l:23: error: âIFâ undeclared (first use in this function)
interpreter.l:24: error: âELSEâ undeclared (first use in this function)
interpreter.l:25: error: âEGALâ undeclared (first use in this function)
interpreter.l:26: error: âDIFFERENTâ undeclared (first use in this function)
interpreter.l:27: error: âAFFECTERâ undeclared (first use in this function)
interpreter.l:28: error: âINFâ undeclared (first use in this function)
interpreter.l:29: error: âINFEGALâ undeclared (first use in this function)
interpreter.l:30: error: âSUPEGALâ undeclared (first use in this function)
interpreter.l:31: error: âPLUSâ undeclared (first use in this function)
interpreter.l:32: error: âMOINSâ undeclared (first use in this function)
interpreter.l:33: error: âFOISâ undeclared (first use in this function)
interpreter.l:34: error: âDIVISEâ undeclared (first use in this function)
interpreter.l:35: error: âPAR_GAUCHEâ undeclared (first use in this function)
interpreter.l:36: error: âPAR_DROITEâ undeclared (first use in this function)
interpreter.l:37: error: âACCOL_GAUCHEâ undeclared (first use in this function)
interpreter.l:38: error: âACCOL_DROITEâ undeclared (first use in this function)
interpreter.l:39: error: âVIRGULEâ undeclared (first use in this function)
interpreter.l:40: error: âPVIRGULEâ undeclared (first use in this function)
interpreter.l:41: error: âVARINTâ undeclared (first use in this function)
interpreter.l:42: error: âVARSTRâ undeclared (first use in this function)
gcc: interpreter.lex.o: Aucun fichier ou dossier de ce type
gcc: interpreter.yy.o: Aucun fichier ou dossier de ce type
La console me dit que tous les terminaux que j'ai déclaré dans mon .l ne le sont pas. Le problème vient du fait que yylval n'est selon lui pas déclaré.
J'ai essayé de mettre :
Mais ça ne change rien. D'où vient le problème ?

[EDIT] Précision : J'ai regard dans le header y.tab.h qui est généré automatiquement et il contient pourtant bien :
Cordialement,