Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/openmath/gap/   (GAP Algebra Version 4.15.1©)  Datei vom 25.1.2023 mit Größe 1 kB image not shown  

Quelle  xmltree.gi   Sprache: Shell

 

#############################################################################
##
#W  xmltree.gi          OpenMath Package              Andrew Solomon
#W                                                    Marco Costantini
##
#Y    Copyright (C) 1999, 2000, 2001, 2006
#Y    School Math and Comp. Sci., University of St.  Andrews, Scotland
#Y    Copyright (C) 2004, 2005, 2006 Marco Costantini
##
##  The main function in this file converts the OpenMath XML into a tree
##  (using the function ParseTreeXMLString from package GapDoc) and
##  parses it.
##


InstallGlobalFunction( OMParseXmlObj, function ( node )
    local obj;

    if not IsBound( OMObjects.(node.name) )  then
        Error( "unknown OpenMath object ", node.name );
    fi;

    if IsBound( node.content ) and 
       IsList( node.content ) and 
        not (node.name = "OMSTR" or node.name = "OMI" or node.name = "OMB")  then
        node.content := Filtered( node.content, OMIsNotDummyLeaf );
    fi;
    obj := OMObjects.(node.name)( node );

    if IsBound( node.attributes.id )  then
        OMTempVars.OMREF.( node.attributes.id ) := obj;
    fi;

    return obj;
end );




InstallGlobalFunction( OMgetObjectXMLTree, function ( string )
    local  node;

    # TODO: this maybe be reset in the middle of the session
    # making references invalid. We need either to keep this
    # for the whole session or to create another record to 
    # store such objects
    
    OMTempVars.OMBIND := rec(  );
    OMTempVars.OMREF := rec(  );

    node := ParseTreeXMLString( string ).content[1];
    # DisplayXMLStructure( node );
    node.content := Filtered( node.content, OMIsNotDummyLeaf );

    return OMParseXmlObj( node.content[1] );

end );


#############################################################################
#E

Messung V0.5 in Prozent
C=68 H=100 G=85

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

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.