@@ -66,6 +66,7 @@ ContenuCommentaire = ( [^*] | \*+[^*/] )*
66
66
Chaine = \" ( [^ \" ] | \\\" ) * \"
67
67
Caractere = \' ( [^ \\ ] | \\\\ ) \'
68
68
69
+ Identificateur_Type = [:uppercase:] ([:jletterdigit:] | [:jletter:] | "_" )*
69
70
Identificateur = ([:jletter:] | "_" ) ([:jletterdigit:] | [:jletter:] | "_" )*
70
71
71
72
@@ -131,10 +132,27 @@ Identificateur = ([:jletter:] | "_" ) ([:jletterdigit:] | [:jletter:] | "_" )*
131
132
"fst" { return symbolFactory. newSymbol(" Premier" , UL_Premier ); }
132
133
"snd" { return symbolFactory. newSymbol(" Second" , UL_Second ); }
133
134
"while" { return symbolFactory. newSymbol(" Tant que" , UL_Tant_Que ); }
135
+ "interface" { return symbolFactory. newSymbol(" Interface" , UL_Interface ); }
136
+ "extends" { return symbolFactory. newSymbol(" Extends" , UL_Extends ); }
137
+ "final" { return symbolFactory. newSymbol(" Final" , UL_Final ); }
138
+ "abstract" { return symbolFactory. newSymbol(" Abstract" , UL_Abstract ); }
139
+ "public" { return symbolFactory. newSymbol(" Public" , UL_Public ); }
140
+ "private" { return symbolFactory. newSymbol(" Private" , UL_Private ); }
141
+ "static" { return symbolFactory. newSymbol(" Static" , UL_Static ); }
142
+ "class" { return symbolFactory. newSymbol(" Class" , UL_Class ); }
143
+ "implements" { return symbolFactory. newSymbol(" Implements" , UL_Implements ); }
144
+ "protected" { return symbolFactory. newSymbol(" Protected" , UL_Protected ); }
145
+ "this" { return symbolFactory. newSymbol(" This" , UL_This ); }
146
+ "construct" { return symbolFactory. newSymbol(" Construct" , UL_Construct ); }
147
+ "String[] args" { return symbolFactory. newSymbol(" String[] args" , UL_ARGS ); }
148
+ "super" { return symbolFactory. newSymbol(" super" , UL_SUPER ); }
149
+
150
+
134
151
{Caractere} { return symbolFactory. newSymbol(" Caractère" , UL_Caractere , yytext()); }
135
152
{Chaine} { return symbolFactory. newSymbol(" Chaine de caractères" , UL_Chaine , yytext()); }
136
153
{Entier} { return symbolFactory. newSymbol(" Nombre Entier" , UL_Nombre_Entier , yytext()); }
137
154
{Flottant} { return symbolFactory. newSymbol(" Nombre Flottant" , UL_Nombre_Flottant , yytext()); }
155
+ {Identificateur_Type} { return symbolFactory. newSymbol(" Identificateur_Type" , UL_Identificateur_Type , yytext()); }
138
156
{Identificateur} { return symbolFactory. newSymbol(" Identificateur" , UL_Identificateur , yytext()); }
139
157
}
140
158
0 commit comments