npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cyklang/core

v0.25.3

Published

XML script language

Downloads

342

Readme


lang: fr permalink: /language-syntax/ title: Noyau layout: default

Instructions du noyau du cadriciel

Sommaire

Conventions typographiques

| Elément | Description | |-------- |-------------| | literal | nom de commandes ou options à taper tel quel | | [ ] | les éléments optionnels sont entre crochets. Les attributs optionnels sont encadrés par des crochets avec un fond différent | | normal | un élément défini par une autre règle syntaxique | | | | la barre verticale sépare des éléments optionnels alternatifs exclusifs les uns des autres | | ... | les points de suspension indiquent que l'élément précédent peut être répété une ou plusieurs fois | | { } | les accolades regroupent les éléments situés entre elles en un seul élément pour appliquer un opérateur ... ou | |

Types de données

  • Texte :
  • Nombre : <number/>
  • Heure : <datetime/>
  • Booléen : <boolean/>
  • Object : <object/>
  • Module : <module/>
  • Fonction : <function/>
  • Undefined

Déclaration de données primitives

Déclaration de string (chaine de caractères)

<string [ name="identifier" ] [ literal="" ] > 
  expression  | text_literal  | 
</string>
  • Si l'attribut literal est spécifié, le contenu de la balise n'est pas évalué en tant qu'expression mais considéré comme un texte litéral
  • Un contenu de balise vide est équivalent à la valeur undefined
  • La XML CDATA est acceptée
  • L'attribut name est facultatif : utile dans le cas de l'initialisation d'une liste de données anonymes

Exemples

<string name="person_1"> "John Doe" </string>
<string name="person_2" literal="">John Doe</string>
<string name="math_formula_1"> <![CDATA[ "x < y" ]]> </string>
<string name="math_formula_2" literal=""> <![CDATA[ x < y ]]> </string>

Déclaration de nombre

<number [ name="identifier" ] > *expression* | undefined | </number>  

Exemples

<number name="id"/>
<number name="intvalue"> 12 </number>
<number name="amount"> 10.25 </number>

Déclaration de datatime

Instructions de Contrôle

Instruction Conditionelle

conditional_instruction :

<if>   
  <condition> expression </condition>   
  <then>  
    instruction ...    
  </then>  
  [      
  <condition> expression </condition>   
  <then>   
    instruction ...  
  </then>   
  ] ...   
  [   
  <else>   
    instruction ...     
  </else>  
  ]    
</if>

Instruction While

while_instruction :

<while>    
  <condition> expression </condition>   
  <then>   
    instruction ...   
  </then>  
</while>

Sortie de boucle par <break/> Itération suivante par '`

Instruction Loop

loop_instruction :

<loop>   
  instruction ...      
</loop>

Instruction break

break_instruction :

<break>   
  [ expression ]   
</break>

Si expression est présente, elle est évaluée Si le résultat est équivalent à VRAI, le programme quitte le bloc en cours Si expression est absente, le programme quitte le bloc en cours

Instruction Affectation

set_instruction :

<set name="identifier"> expression </set>
<let name="identifier"> expression </let>

Les noms de balise set et let ont la même signification

Instruction Stringexec

<stringexec> expression </stringexec>

L'expression est évaluée en tant que chaine, puis considérée comme un texte de programme qui est exécuté

Instruction Parallel

<parallel>   
  instruction ...     
</parallel>

Chaque instruction dans le bloc est exécuté en parallèle des autres. L'instruction <parallel/> se termine lorsque toutes les intrutions du bloc sont terminées.

Définition de fonction

Exemple : la fonction factorielle

    <function name="fact" returns="result: number">
        <number name="N"/>
        <block>
            <if>
                <condition><![CDATA[ N <= 0]]></condition>
                <then>
                    <let name="result">1</let>
                </then>
                <else>
                    <number name="fact1">1</number>
                    <call function="fact" returns="fact1">
                        <number name="N">N - 1</number>
                    </call>
                    <let name="result">N * fact1</let>
                </else>
            </if>
        </block>
    </function>

Instruction Appel de Fonction

Function

<call function="identifier" [ returns="identifier : datatype" ] >   
  declare_instruction ...   
</call>

Methode d'Objet

<call object="identifier" method="identifier" [ returns="identifier : datatype" ] >   
  declare_instruction ...    
</call>

Méthode d'un Module

<call module="identifier" method="identifier" [ returns="identifier: datatype*" ] >   
  declare_instruction ...    
</call>

Format des expressions