Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/jupyterkernel/gap/   (GAP Algebra Version 4.15.1©)  Datei vom 7.6.2024 mit Größe 1011 B image not shown  

Quelle  JupyterCompletion.gi   Sprache: Shell

 

# This is a rather basic helper function to do
# completion. It is related to the completion
# function provided in lib/cmdledit.g in the GAP
# distribution
InstallGlobalFunction(JUPYTER_Complete,
function(code, cursor_pos)
    local default, cand, i, matches, tokens, tok;

    default := rec( matches := [], cursor_start := 0,
                    cursor_end := cursor_pos, metadata := rec(),
                    status := "ok" );

    code := code{[1..cursor_pos]};
    if Length(code) = 0 then
        return default;
    fi;
    tokens := SplitString(code, "():=<>,.[]?-+*/; ");

    if tokens = [] then
        return default;
    fi;

    tok := tokens[Length(tokens)];
    cand := IDENTS_BOUND_GVARS();
    matches := Filtered(cand, i -> PositionSublist(i, tok) = 1);
    SortBy(matches, Length);
    return rec( matches := matches
              , cursor_start := cursor_pos - Length(tok)
              , cursor_end := cursor_pos
              , metadata := rec()
              , status := "ok" );
end);

Messung
CHZG
8510010095

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

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.