Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/sksl/lex/   (Fast Lexical Analyzer Version 2.6©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  DFAState.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_DFASTATE
#define SKSL_DFASTATE

#include "src/sksl/lex/LexUtil.h"

#include <vector>
#include <string>

struct DFAState {
    struct Label {
        std::vector<int> fStates;

        Label(std::vector<int> states)
        : fStates(std::move(states)) {}

        bool operator==(const Label& other) const {
            return fStates == other.fStates;
        }

        bool operator!=(const Label& other) const {
            return !(*this == other);
        }

#ifdef SK_DEBUG
        std::string description() const {
            std::string result = "<";
            const char* separator = "";
            for (int s : fStates) {
                result += separator;
                result += std::to_string(s);
                separator = ", ";
            }
            result += ">";
            return result;
        }
#endif
    };

    DFAState()
    : fId(INVALID)
    , fLabel({}) {}

    DFAState(int id, Label label)
    : fId(id)
    , fLabel(std::move(label)) {}

    DFAState(const DFAState& other) = delete;

    int fId;

    Label fLabel;

    bool fIsScanned = false;
};

namespace std {
    template<> struct hash<DFAState::Label> {
        size_t operator()(const DFAState::Label& s) const {
            size_t result = 0;
            for (int i : s.fStates) {
                result = result * 101 + i;
            }
            return result;
        }
    };
// namespace

#endif

Messung V0.5
C=98 H=89 G=93

¤ Dauer der Verarbeitung: 0.13 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.