int automat (int xreal, int xtext) { int flag = 0; if (strlen (text) <= xtext) return 1; if (realstateschar [xreal] == CONTROLSTATE) { if (realstates1 [xreal] == realstates2 [xreal]) flag = automat (realstates1 [xreal], xtext); else flag = automat (realstates1 [xreal], xtext) || automat (realstates2 [xreal], xtext); } else if ((realstateschar [xreal] >= 'a') \&\& (realstateschar [xreal] <= 'z')) { if (realstateschar [xreal] == text [xtext]) flag = 1; if (realstates1 [xreal] == realstates2 [xreal]) flag \&= automat (realstates1 [xreal], xtext+1); else flag \&= (automat (realstates1 [xreal], xtext+1) || automat (realstates2 [xreal], xtext+1)); } return flag; }