Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  DFA.h   Sprache: C

 
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#ifndef SKSL_DFA
#define SKSL_DFA

#include <string>
#include <vector>

/**
 * Tables representing a deterministic finite automaton for matching regular expressions.
 */

struct DFA {
    DFA(std::vector<int> charMappings, std::vector<std::vector<int>> transitions,
        std::vector<int> accepts)
    : fCharMappings(charMappings)
    , fTransitions(transitions)
    , fAccepts(accepts) {}

    // maps chars to the row index of fTransitions, as multiple characters may map to the same row.
    // starting from state s and looking at char c, the new state is
    // fTransitions[fCharMappings[c]][s].
    std::vector<int> fCharMappings;

    // one row per character mapping, one column per state
    std::vector<std::vector<int>> fTransitions;

    // contains, for each state, the token id we should report when matching ends in that state (-1
    // for no match)
    std::vector<int> fAccepts;
};

#endif

Messung V0.5
C=98 H=94 G=95

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge