Лексика языков программирования. Конечные автоматы без памяти для обнаружения слов в тексте программы, страница 5

                        switch(lexAcceptor->getIndex())

                        {

                        case 0:     // Автомат: main

                              switch(Lexem.groupIndex)

                              {

                              case -1: //EOF

                                    Lexem.groupIndex = 0;break;

                              case -2: //слова

                                    break;

                              case -3: //константа_вещественный

                                    break;

                              case -4: //арифметические операции

                                    break;

                              case -5: //разделители

                                    break;

                              case -6: //скобки

                                    break;

                              case -7: //вход_константа_символьная

                                    lexAcceptor=lexAcceptors[1];break;

                              case -8: //символы_форматирования

                                    ignoreLastWord=true;break;

                              case -9: //особый символ

                                    break;

                              case -10: //идендификатор

                                    break;

                              case -11: //идендификатор 7-ричные

                                    break;

                              case -12: //комментарии_вход

                                    lexAcceptor=lexAcceptors[2];break;

                              case -13: //оператор присваивания

                                    break;

                              case -14: //операции_отношения

                                    break;

                              case -15: //константы_выбора

                                    break;

                              }

                              break;

                        case 1:     // Автомат: symb

                              switch(Lexem.groupIndex)

                              {

                              case -1: //EOF

                                    Lexem.groupIndex = 0;break;

                              case -2: //константа_символьная

                                    break;

                              case -3: //слэш

                                    lexAcceptor=lexAcceptors[3];break;

                              case -4: //выход_константа_символьная

                                    break;

                              }

                              break;

                        case 2:     // Автомат: priv

                              switch(Lexem.groupIndex)

                              {

                              case -1: //EOF

                                    Lexem.groupIndex = 0;break;

                              case -2: //комментарии

                                    break;

                              case -3: //комментарии_выход

                                    lexAcceptor=lexAcceptors[0];break;

                              }

                              break;

                        case 3:     // Автомат: apog

                              switch(Lexem.groupIndex)

                              {

                              case -1: //EOF

                                    Lexem.groupIndex = 0;break;

                              case -2: //апостраф

                                    lexAcceptor=lexAcceptors[1];break;

                              }

                              break;

                        }

                  }

                  return Lexem;

            }

};