/// <summary> /// /// </summary> /// <param name="typeCarat"></param> private void Avancer(ENCaract typeCarat) { ENCaract typeCaractCourant = LitCaractere(_phraseCourante[_posCourant]); while (LitCaractere(_phraseCourante[_posCourant]) == typeCarat) { _posCourant++; typeCaractCourant = LitCaractere(_phraseCourante[_posCourant]); } }
/// <summary> /// Initialisation de la liste des types de caractères /// </summary> private static void InitListeTypeCaract() { _typeChar = new ENCaract[256]; for (int i = 0; i < 256; i++) { _typeChar[i] = ENCaract.ENElement; } for (int i = 'a'; i <= 'z'; i++) { _typeChar[i] = ENCaract.ENLettre; } for (int i = 'A'; i <= 'Z'; i++) { _typeChar[i] = ENCaract.ENLettre; } for (int i = '0'; i <= '9'; i++) { _typeChar[i] = ENCaract.ENChiffre; } _typeChar['\t'] = ENCaract.ENSeparateur; _typeChar[' '] = ENCaract.ENSeparateur; _typeChar['+'] = ENCaract.ENOperande; _typeChar['-'] = ENCaract.ENOperande; _typeChar['*'] = ENCaract.ENOperande; _typeChar['/'] = ENCaract.ENOperande; _typeChar['='] = ENCaract.ENOperande; _typeChar['('] = ENCaract.ENParenthese; _typeChar[')'] = ENCaract.ENParenthese; _typeChar[','] = ENCaract.ENSepVariable; _typeChar['.'] = ENCaract.ENVirgule; _typeChar['\0'] = ENCaract.ENFin; }