Codes sources prototype 1

This commit is contained in:
SylvanCourtiol
2021-05-09 17:42:30 +02:00
parent 14d39af284
commit a1161d0399
16 changed files with 1144 additions and 73 deletions
@@ -6,6 +6,8 @@
package interpreteurlir.donnees;
import interpreteurlir.InterpreteurException;
/**
* Identificateur de chaîne
* @author Nicolas Caminade
@@ -19,13 +21,14 @@ public class IdentificateurChaine extends Identificateur {
/**
* Instantiation d'identificateur de chaîne
* @param identificateur a instancier
* @throws IllegalAccessException si l'identificateur est invalide
* @throws InterpreteurException si l'identificateur est invalide
*/
public IdentificateurChaine(String identificateur) {
super(identificateur);
super(identificateur.trim());
identificateur = identificateur.trim();
if(!isIdentificateurChaine(identificateur)) {
throw new IllegalArgumentException(identificateur
throw new InterpreteurException(identificateur
+ " n'est pas un identificateur"
+ " de chaine");
}