210 lines
No EOL
3.9 KiB
INI
210 lines
No EOL
3.9 KiB
INI
{./macros.cfg}
|
|
[wml_schema]
|
|
[type]
|
|
name="regex"
|
|
value=".*"
|
|
[/type]
|
|
[type]
|
|
name="glob"
|
|
value=".*"
|
|
[/type]
|
|
[type]
|
|
name="string"
|
|
value=".*"
|
|
[/type]
|
|
[type]
|
|
name="id"
|
|
value="[a-zA-Z0-9_~$]+"
|
|
[/type]
|
|
[type]
|
|
name="path"
|
|
[list]
|
|
min=1
|
|
split="/"
|
|
[element]
|
|
link="id"
|
|
[/element]
|
|
[/list]
|
|
[/type]
|
|
[type]
|
|
name="path_list"
|
|
[list]
|
|
min=1
|
|
[element]
|
|
link="path"
|
|
[/element]
|
|
[/list]
|
|
[/type]
|
|
[type]
|
|
name="id_list"
|
|
[list]
|
|
min=1
|
|
[element]
|
|
link="id"
|
|
[/element]
|
|
[/list]
|
|
[/type]
|
|
[type]
|
|
name="int"
|
|
value="\d+"
|
|
[/type]
|
|
[type]
|
|
name="inf"
|
|
value="infinite"
|
|
[/type]
|
|
[type]
|
|
name="bool"
|
|
value="yes|no|true|false"
|
|
[/type]
|
|
[tag]
|
|
name="root"
|
|
min=1
|
|
[tag]
|
|
name="wml_schema"
|
|
min=1
|
|
[tag]
|
|
name="type"
|
|
max=infinite
|
|
super="type"
|
|
{REQUIRED_KEY name id}
|
|
[if]
|
|
[union]
|
|
[/union]
|
|
[then]
|
|
[tag]
|
|
name="union"
|
|
min=1
|
|
[tag]
|
|
name="type"
|
|
max=infinite
|
|
super="wml_schema/type"
|
|
# Override the required name with an optional name
|
|
# Technically name is not really allowed here at all,
|
|
# but the schema can't override a supertag key with its absence.
|
|
{SIMPLE_KEY name string}
|
|
[/tag]
|
|
[/tag]
|
|
[/then]
|
|
[elseif]
|
|
[intersection]
|
|
[/intersection]
|
|
[then]
|
|
[tag]
|
|
name="intersection"
|
|
min=1
|
|
{LINK_TAG "wml_schema/type"}
|
|
[tag]
|
|
name="type"
|
|
max=infinite
|
|
super="wml_schema/type"
|
|
# Override the required name with an optional name
|
|
# Technically name is not really allowed here at all,
|
|
# but the schema can't override a supertag key with its absence.
|
|
{SIMPLE_KEY name string}
|
|
[/tag]
|
|
[/tag]
|
|
[/then]
|
|
[/elseif]
|
|
[elseif]
|
|
[list]
|
|
[/list]
|
|
[then]
|
|
[tag]
|
|
name="list"
|
|
min=1
|
|
{DEFAULT_KEY min int 0}
|
|
{DEFAULT_KEY max int,inf infinite}
|
|
{DEFAULT_KEY split regex "\s*,\s*"}
|
|
[tag]
|
|
name="element"
|
|
max=infinite
|
|
super="wml_schema/type"
|
|
# Override the required name with an optional name
|
|
# Technically name is not really allowed here at all,
|
|
# but the schema can't override a supertag key with its absence.
|
|
{SIMPLE_KEY name string}
|
|
[/tag]
|
|
[/tag]
|
|
[/then]
|
|
[/elseif]
|
|
[elseif]
|
|
glob_on_value=*
|
|
[then]
|
|
{SIMPLE_KEY value regex}
|
|
[/then]
|
|
[/elseif]
|
|
[else]
|
|
{SIMPLE_KEY link id}
|
|
[/else]
|
|
[/if]
|
|
[/tag]
|
|
[tag]
|
|
name="tag"
|
|
min=1
|
|
{REQUIRED_KEY name glob}
|
|
{DEFAULT_KEY min int 0}
|
|
{DEFAULT_KEY max int,inf 1}
|
|
{SIMPLE_KEY super path_list}
|
|
{DEFAULT_KEY any_tag bool no}
|
|
{DEFAULT_KEY deprecated bool no}
|
|
[tag]
|
|
name="key"
|
|
max=infinite
|
|
{REQUIRED_KEY name glob}
|
|
{REQUIRED_KEY type id_list}
|
|
{DEFAULT_KEY mandatory bool no}
|
|
{SIMPLE_KEY default string}
|
|
{DEFAULT_KEY deprecated bool no}
|
|
[/tag]
|
|
{LINK_TAG "wml_schema/tag"}
|
|
[tag]
|
|
name="link"
|
|
max=infinite
|
|
{REQUIRED_KEY name path}
|
|
[/tag]
|
|
[tag]
|
|
name="switch"
|
|
max=infinite
|
|
{REQUIRED_KEY key id}
|
|
[tag]
|
|
name="case"
|
|
max=infinite
|
|
super="wml_schema/tag"
|
|
{REQUIRED_KEY value string}
|
|
{DEFAULT_KEY trigger_if_missing bool no}
|
|
[/tag]
|
|
[tag]
|
|
name="else"
|
|
super="wml_schema/tag"
|
|
[/tag]
|
|
[/tag]
|
|
[tag]
|
|
name="if"
|
|
max="infinite"
|
|
any_tag=yes
|
|
{ANY_KEY string}
|
|
[tag]
|
|
name="then"
|
|
super="wml_schema/tag"
|
|
[/tag]
|
|
[tag]
|
|
name="elseif"
|
|
max=infinite
|
|
super="wml_schema/tag"
|
|
any_tag=yes
|
|
{ANY_KEY string}
|
|
[tag]
|
|
name="then"
|
|
min=1
|
|
super="wml_schema/tag"
|
|
[/tag]
|
|
[/tag]
|
|
[tag]
|
|
name="else"
|
|
super="wml_schema/tag"
|
|
[/tag]
|
|
[/tag]
|
|
[/tag]
|
|
[/tag]
|
|
[/tag]
|
|
[/wml_schema] |