<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="defineparallel" level="style" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupparallel" level="style" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-list"/>
            <cd:assignments list="yes">
                <cd:parameter name="setups">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="start">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="n">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="criterium">
                    <cd:constant type="all"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="placeparallel" level="document" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-list"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupparallel"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelseparallel" level="style" category="conditional" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:keywords delimiters="braces" list="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="all" default="yes"/>
            </cd:keywords>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifparallelelse" level="style" category="conditional" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:keywords delimiters="braces" list="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="all" default="yes"/>
            </cd:keywords>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetparallel" level="style" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes" optional="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="all" default="yes"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="parallel" type="environment" generated="yes" variant="example" level="document" file="buff-par.mkvi">
        <cd:sequence>
            <cd:variable value="parallel"/>
        </cd:sequence>
    </cd:command>

</cd:interface>