<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.39 from ./xcdesign.texi on 12 June 2005 --> <TITLE>Designing Games with Xconq - Summary of GDL Syntax</TITLE> </HEAD> <BODY> Go to the <A HREF="xcdesign_1.html">first</A>, <A HREF="xcdesign_57.html">previous</A>, <A HREF="xcdesign_59.html">next</A>, <A HREF="xcdesign_61.html">last</A> section, <A HREF="xcdesign_toc.html">table of contents</A>. <HR> <H1><A NAME="SEC287" HREF="xcdesign_toc.html#SEC287">Summary of GDL Syntax</A></H1> <P> Whitespace is never significant, except to separate two symbols or within a string or escaped symbols. </P> <P> Regular expression for symbol is <CODE>[-a-z0-9A-Z]*</CODE> or <CODE>|[^|]*|</CODE>. </P> <P> Number is <CODE>[-]*[0-9][0-9]*</CODE> optional <CODE>[d]*[0-9][0-9]*</CODE>, <CODE>[+]*[0-9][0-9]*</CODE>. </P> <P> String is <CODE>"[^"]*"</CODE>. </P> <P> Comments extend from <CODE>;</CODE> to end of the line, or may be everything enclosed between <CODE>#|</CODE> and <CODE>|#</CODE> (which nest properly). </P> <PRE> <I>form</I> ::= <I>module-form</I> | ( include <I>module-name</I> [ <I>variant-setting</I> ]* ) | ( if <I>test-form</I> [ <I>symbol</I> ] ) | ( else [ <I>symbol</I> ] ) | ( end-if [ <I>symbol</I> ] ) | <I>world-form</I> | <I>area-form</I> | <I>side-form</I> | <I>side-defaults-form</I> | <I>independent-units-form</I> | <I>doctrine-form</I> | <I>player-form</I> | <I>agreement-form</I> | <I>unit-form</I> | <I>unit-defaults-form</I> | <I>scorekeeper-form</I> | <I>exu-form</I> | <I>evt-form</I> | <I>unit-type-form</I> | <I>terrain-type-form</I> | <I>material-type-form</I> | <I>advance-type-form</I> | <I>namer-form</I> | <I>table-form</I> | <I>add-form</I> | <I>imf-form</I> | <I>palette-form</I> | <I>color-form</I> | ( define <I>symbol</I> <I>value</I> ) | ( set <I>symbol</I> <I>value</I> ) | ( undefine <I>symbol</I> <I>value</I> ) | ( print <I>value</I> ) | <I>value</I> </PRE> <PRE> <I>module-form</I> ::= ( game-module [ <I>module-name</I> ] [ <I>game-module-property-binding</I> ]* ) <I>module-name</I> ::= <I>string</I> <I>game-module-property-binding</I> ::= ( <I>game-module-property-name</I> <I>value</I> ) <I>game-module-property-name</I> ::= base-game | title | blurb | picture-name | instructions | notes | design-notes | program-version | base-module | default-base-module | variants | version <I>variant-definition</I> ::= ( [ <I>string</I> ] <I>var-type</I> [ <I>var-default</I> ] [ <I>var-range</I> ] [ <I>var-clause</I> ]* ) <I>var-type</I> ::= world-size | world-seen | see-all | sequential | real-time | <I>symbol</I> <I>var-default</I> ::= <I>value</I> <I>var-range</I> ::= ( <I>value</I> <I>value</I> ) <I>var-clause</I> ::= ( [ <I>string</I> ] <I>value</I> [ <I>form</I> ]* ) </PRE> <PRE> <I>variant-setting</I> ::= ( <I>var-type</I> <I>value</I> ) </PRE> <PRE> <I>world-form</I> ::= ( world [ <I>circumference</I> ] [ <I>world-property-binding</I> ]* ) <I>world-property-binding</I> ::= ( <I>world-property-name</I> <I>value</I> ) <I>world-property-name</I> ::= axial-tilt | circumference | day-length | year-length <I>circumference</I> ::= <I>value</I> </PRE> <PRE> <I>area-form</I> ::= ( area [ <I>width</I> [ <I>height</I> ] ] [ <I>area-restriction</I> ] [ <I>area-property-binding</I> ]* ) <I>area-restriction</I> ::= ( restrict <I>width</I> <I>height</I> <I>a-x</I> <I>a-y</I> ) <I>area-property-binding</I> ::= ( <I>area-property-name</I> <I>value</I> ) | ( terrain [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( aux-terrain <I>terrain-type</I> [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( features <I>feature-list</I> [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( material <I>material-type</I> [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( people-sides [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( control-sides [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( elevations [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( temperatures [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( winds [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( clouds [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( cloud-bottoms [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) | ( cloud-heights [ <I>layer-subform</I> ]* [ <I>string</I> ]* ) <I>area-property-name</I> ::= width | height | latitude | longitude | cell-width <I>layer-subform</I> ::= ( constant <I>n</I> ) | ( subarea <I>a-x</I> <I>a-y</I> <I>width</I> <I>height</I> ) | ( xform <I>mul</I> <I>add</I> ) | ( by-bits ) | ( by-char <I>string</I> ) | ( by-name <I>name-list</I> ) <I>width</I> ::= <I>value</I> <I>height</I> ::= <I>value</I> <I>a-x</I> ::= <I>value</I> <I>a-y</I> ::= <I>value</I> <I>n</I> ::= <I>value</I> <I>mul</I> ::= <I>value</I> <I>add</I> ::= <I>value</I> </PRE> <PRE> <I>side-form</I> ::= ( side [ <I>side-id</I> ] [ <I>side-property-binding</I> ]* ) <I>side-defaults-form</I> ::= ( side-defaults [ <I>side-property-binding</I> ]* ) <I>side-property-binding</I> ::= ( <I>side-property-name</I> <I>value</I> ) <I>side-property-name</I> ::= name | long-name | short-name | noun | plural-noun | adjective | color | emblem-name | names-locked | class | active | status | advantage | advantage-min | advantage-max | controlled-by | trusts | trades | next-numbers | unit-namers | feature-namers | tech | init-tech | terrain-view | unit-view | unit-view-dates | turn-time-used | total-time-used | timeouts | timeouts-used | finished-turn | willing-to-draw | doctrines | doctrines-locked | self-unit | priority | scores | ui-data | ai-data | player </PRE> <PRE> <I>doctrine-form</I> ::= ( doctrine ... ) </PRE> <PRE> <I>player-form</I> ::= ( player [ <I>player-id</I> ] [ <I>player-property-binding</I> ]* ) <I>player-id</I> ::= <I>number</I> <I>player-property-binding</I> ::= ( <I>player-property-name</I> <I>value</I> ) <I>player-property-name</I> ::= name | config-name | display-name | ai-type-name | password | initial-advantage </PRE> <PRE> <I>agreement-form</I> ::= ( agreement [ <I>agreement-id</I> ] [ <I>agree-prop-bdg</I> ]* ) <I>agreement-id</I> ::= <I>value</I> <I>agree-prop-bdg</I> ::= ( <I>agreement-property-name</I> <I>value</I> ) <I>agreement-property-name</I> ::= type-name | title | terms | drafters | proposers | signers | willing-to-sign | known-to | enforcement | state </PRE> <PRE> <I>unit-form</I> ::= ( unit [ <I>unit-id</I> ] [ <I>unit-property-bdg</I> ]* ) | ( <I>unit-type-name</I> <I>u-x</I> <I>u-y</I> <I>u-side</I> [ <I>unit-property-bdg</I> ]* ) <I>unit-defaults-form</I> ::= ( unit-defaults [ reset ] [ <I>unit-property-bdg</I> ]* ) <I>unit-property-bdg</I> ::= ( <I>unit-property-name</I> <I>value</I> ) | ( act <I>action-type-name</I> [ <I>action-property-binding</I> ]* ) | ( plan <I>plan-type-name</I> [ <I>plan-property-binding</I> ]* ) | ( task <I>task-type-name</I> [ <I>task-property-binding</I> ]* ) | ( x [ <I>unit-x-property-binding</I> ]* ) <I>unit-property-name</I> ::= @ | # | cp | cxp | hp | in | m | mo | n | nb | opinions | s | tp | z <I>unit-id</I> ::= <I>value</I> <I>u-x</I> ::= <I>value</I> <I>u-y</I> ::= <I>value</I> <I>u-side</I> ::= <I>value</I> <I>unit-x-property-binding</I> ::= ( <I>unit-x-property-name</I> <I>value</I> ) ( <I>symbol</I> <I>value</I> ) <I>unit-x-property-name</I> ::= appear | disappear </PRE> <PRE> <I>action-type-name</I> ::= add-terrain | alter-terrain | attack | build | capture | change-side | change-type | create-at | create-in | detonate | disband | enter | fire-at | fire-into | move | none | overrun | produce | remove-terrain | repair | research | toolup | transfer | transfer-part <I>action-property-binding</I> ::= ( <I>action-property-name</I> <I>value</I> ) <I>action-property-name</I> ::= a | aa | acp | acp0 | am </PRE> <PRE> <I>plan-type-name</I> ::= defensive | exploratory | none | offensive | passive | random <I>plan-property-binding</I> ::= ( <I>plan-property-name</I> <I>value</I> ) | ( goal <I>goal-type-name</I> ... ) <I>plan-property-name</I> ::= ai-control | asleep | delayed | formation | goal | reserve | supply-alarm | supply-is-low </PRE> <PRE> <I>goal-type-name</I> ::= cell-is-occupied | has-material-type | has-unit-type | has-unit-type-near | keep-formation | lost-game | no-goal | positions-known | vicinity-is-held | vicinity-is-known | won-game | world-is-known </PRE> <PRE> <I>task-type-name</I> ::= build | capture | do-action | hit-position | hit-unit | move-dir | move-to | none | occupy | pickup | repair | research | resupply | sentry </PRE> <PRE> <I>scorekeeper-form</I> ::= ( scorekeeper [ <I>sk-id</I> ] [ <I>sk-property-binding</I> ]* ) <I>sk-id</I> ::= <I>value</I> <I>sk-property-binding</I> ::= ( <I>sk-property-name</I> <I>value</I> ) <I>sk-property-name</I> ::= applies-to | do | initial | known-to | messages | title | trigger | triggered | when <I>sk-when</I> ::= after-action | after-event | after-turn | before-turn </PRE> <PRE> <I>exu-form</I> ::= ( exu <I>id</I> <I>type</I> <I>x</I> <I>y</I> <I>side</I> [ <I>exu-property-binding</I> ]* ) <I>exu-property-binding</I> ::= ( <I>exu-property-name</I> <I>value</I> ) <I>exu-property-name</I> ::= n | nb | z <I>evt-form</I> ::= ( evt turn <I>evt-type-name</I> <I>observers</I> [ <I>value</I> ]* ) </PRE> <PRE> <I>evt-type-name</I> ::= action-done | action-error | action-ok | cannot-do | cannot-leave-world | capture-failed | capture-succeeded | destination-full | fire-into-outside-world | game-ended | game-restarted | game-saved | game-started | insufficient-acp | insufficient-material | insufficient-mp | log-ended | log-started | overrun-failed | overrun-succeeded | side-joined | side-lost | side-withdrew | side-won | too-far | too-near | unit-acquired | unit-assaulted | unit-captured | unit-completed | unit-created | unit-damaged | unit-disbanded | unit-garrisoned | unit-killed | unit-left-world | unit-moved | unit-name-changed | unit-started-with | unit-starved | unit-type-changed | unit-vanished | unit-wrecked </PRE> <PRE> <I>unit-type-form</I> ::= ( unit-type <I>unit-type-name</I> [ <I>unit-type-property-binding</I> ]* ) <I>unit-type-name</I> ::= <I>symbol</I> <I>unit-type-property-binding</I> ::= ( <I>unit-type-property-name</I> <I>value</I> ) <I>unit-type-property-name</I> ::= acp-damage-effect | acp-max | acp-min | acp-per-turn | acp-per-turn-max | acp-per-turn-min | acp-season-effect | acp-temperature-effect | acp-to-change-side | acp-to-detonate | acp-to-disband | acp-to-fire | acp-to-move | acp-to-transfer-part | action-priority | already-seen | already-seen-independent | assign-number | available | can-be-self | capacity | char | color | consumption-temperature-effect | country-units-max | cp | cp-per-self-build | cp-to-self-build | cxp-max | cxp-on-capture-effect | description-format | detonate-on-death | direct-control | elevation-at-max-range | free-acp | free-mp | generic-name | has-opinions | help | hit-falloff-range | hp-max | hp-per-detonation | hp-per-disband | hp-recovery | image-name | independent-growth-chance | independent-near-start | independent-takeover-chance | initial-seen-radius | long-name | move-range | mp-to-leave-world | name | name-internal | namer | notes | occupant-total-max | parts-max | point-value | possible-sides | range | range-min | revolt-chance | see-always | see-occupants | self-changeable | self-resurrects | short-name | speed | speed-damage-effect | speed-max | speed-min | speed-wind-angle-effect | speed-wind-effect | spot-action | spy-chance | spy-range | stack-order | start-with | tech-from-ownership | tech-leakage | tech-max | tech-per-turn-max | tech-to-build | tech-to-own | tech-to-see | tech-to-use | temperature-attrition | type-in-game-max | type-per-side-max | unit-growth-chance | unit-takeover-chance | vision-bend | vision-range | wrecked-type | zz-b | zz-bb | zz-bw | zz-c | zz-cc | zz-cm | zz-transport </PRE> <PRE> <I>terrain-type-form</I> ::= ( terrain-type <I>terrain-type-name</I> [ <I>terrain-type-property-bdg</I> ]* ) ) <I>terrain-type-name</I> ::= <I>symbol</I> <I>terrain-type-property-bdg</I> ::= ( <I>terrain-type-property-name</I> <I>value</I> ) <I>terrain-type-property-name</I> ::= alt-percentile-max | alt-percentile-min | capacity | char | clouds-max | clouds-min | country-growth-chance | country-people-chance | country-takeover-chance | country-terrain-max | country-terrain-min | elevation-max | elevation-min | help | image-name | independent-people-chance | liquid | maze-passage-occurrence | maze-room-occurrence | name | notes | occurrence | people-max | river-chance | subtype | subtype-x | temperature-average | temperature-max | temperature-min | temperature-variability | thickness | wet-percentile-max | wet-percentile-min | wind-force-average | wind-force-max | wind-force-min | wind-force-variability | wind-variability | zz-fr </PRE> <PRE> <I>material-type-form</I> ::= ( material-type <I>material-type-name</I> [ <I>m-type-property-binding</I> ]* ) ) <I>material-type-name</I> ::= <I>symbol</I> <I>m-type-property-binding</I> ::= ( <I>m-type-property-name</I> <I>value</I> ) <I>m-type-property-name</I> ::= char | help | image-name | initial-treasury | name | notes | people | resource-icon | treasury </PRE> <PRE> <I>advance-type-form</I> ::= ( advance-type <I>advance-type-name</I> [ <I>m-type-property-binding</I> ]* ) ) <I>advance-type-name</I> ::= <I>symbol</I> <I>a-type-property-binding</I> ::= ( <I>a-type-property-name</I> <I>value</I> ) <I>a-type-property-name</I> ::= char | help | image-name | name | notes | occurrence | rp </PRE> <PRE> <I>namer-form</I> ::= ( namer [ <I>namer-id</I> ] <I>naming-method</I> <I>state</I> ) <I>namer-id</I> ::= <I>value</I> <I>naming-method</I> ::= junky | ( random [ <I>string</I> ]* ) | ( in-order [ <I>string</I> ]* ) | ( grammar <I>symbol</I> <I>number</I> [ <I>grammar-rule</I> ]* ) <I>grammar-rule</I> ::= ( <I>symbol</I> ( [ <I>rule-type</I> ] [ <I>weight</I> ] <I>data</I> ) <I>rule-type</I> ::= any | or | reject | capitalize <I>state</I> ::= <I>value</I> </PRE> <PRE> <I>table-form</I> ::= ( table <I>table-name</I> [ add ] [ <I>table-clause</I> ]* ) <I>table-clause</I> ::= <I>value</I> | ( <I>type-or-types</I> <I>type-or-types</I> <I>value</I> ) <I>table-name</I> ::= <I>uu-table-name</I> | <I>ut-table-name</I> | <I>um-table-name</I> | <I>tt-table-name</I> | <I>tm-table-name</I> | <I>mm-table-name</I> </PRE> <PRE> <I>uu-table-name</I> ::= | acp-for-retreat | acp-occupant-effect | acp-to-attack | acp-to-be-fired-on | acp-to-build | acp-to-capture | acp-to-change-type | acp-to-create | acp-to-defend | acp-to-enter-unit | acp-to-repair | acp-to-research | acp-to-toolup | attack-range | attack-range-min | bridge | build-range | can-enter-independent | capture-chance | control-chance | control-chance-adjacent | control-chance-at | control-range | cp-on-creation | cp-per-build | create-range | cxp-per-capture | cxp-per-combat | damage | damage-cxp-effect | detonate-on-approach-range | detonate-on-capture | detonate-on-hit | detonation-damage-adjacent | detonation-damage-at | detonation-unit-range | ferry-on-departure | ferry-on-entry | hit-at-max-range-effect | hit-chance | hit-cxp-effect | hp-min | hp-per-repair | hp-to-garrison | hp-to-repair | independent-capture-chance | mp-to-enter-unit | mp-to-enter-zoc | mp-to-leave-unit | mp-to-leave-zoc | mp-to-traverse-zoc | occupant-can-construct | occupant-combat | occupant-escape-chance | occupant-max | occupant-vision | protection | retreat-chance | road-chance | scuttle-chance | see-chance | see-chance-adjacent | see-chance-at | speed-occupant-effect | spy-quality | stack-protection | surrender-chance | surrender-chance-per-attack | surrender-range | tech-crossover | tech-per-research | temperature-protection | tp-attrition | tp-crossover | tp-max | tp-per-toolup | tp-to-build | unit-capacity-x | unit-size-as-occupant | withdraw-chance-per-attack | zoc-range | zz-basic-capture-worth | zz-basic-hit-worth | zz-basic-transport-worth </PRE> <PRE> <I>ut-table-name</I> ::= accident-damage | accident-hit-chance | accident-vanish-chance | acp-night-effect | acp-to-add-terrain | acp-to-remove-terrain | alter-terrain-range | altitude-max | altitude-min | attack-terrain-effect | attrition | defend-terrain-effect | detonation-accident-chance | detonation-terrain-damage-chance | detonation-terrain-range | eye-height | favored-terrain | independent-density | mp-to-enter-terrain | mp-to-leave-terrain | mp-to-traverse | people-surrender-chance | productivity | terrain-capacity-x | unit-size-in-terrain | vanishes-on | visibility | vision-night-effect | wrecks-on | zoc-from-terrain-effect | zoc-into-terrain </PRE> <PRE> <I>um-table-name</I> ::= acp-to-load | acp-to-produce | acp-to-unload | base-consumption | base-production | consumption-as-occupant | consumption-on-creation | consumption-per-attack | consumption-per-build | consumption-per-move | consumption-per-repair | hit-by | hp-per-starve | in-length | load-max | material-per-production | material-to-act | material-to-build | material-to-change-type | material-to-create | material-to-fight | material-to-move | material-to-produce | material-to-repair | occupant-base-production | out-length | people-see-chance | people-surrender-effect | productivity-max | productivity-min | recycleable-material | supply-on-completion | supply-on-creation | supply-per-disband | unit-initial-supply | unit-storage-x | unload-max </PRE> <PRE> <I>tt-table-name</I> ::= adjacent-terrain-effect | coating-depth-max | coating-depth-min | drawable-terrain | road-into-chance | terrain-damaged-type </PRE> <PRE> <I>tm-table-name</I> ::= change-on-exhaustion-chance | consumption-per-add-terrain | material-per-remove-terrain | see-material-always | terrain-consumption | terrain-exhaustion-type | terrain-initial-supply | terrain-production | terrain-storage-x </PRE> <PRE> <I>mm-table-name</I> ::= people-consumption | people-production </PRE> <PRE> <I>add-form</I> ::= ( add <I>type-or-types</I> <I>property-name</I> <I>value</I> ) </PRE> <PRE> <I>imf-form</I> ::= ( imf <I>string</I> [ <I>imf-property-binding</I> ]* [ <I>image</I> ]* ) <I>imf-property-binding</I> ::= ... <I>image</I> ::= ( ( <I>w</I> <I>h</I> [ tile ] ) [ <I>image-property-binding</I> ]* [ <I>subimage</I> * ] ) <I>image-property-binding</I> ::= ( <I>image-property-name</I> <I>value</I> ) <I>image-property-name</I> ::= actual | embed | embed-at | palette | pixel-size | row-bytes <I>subimage</I> ::= ( <I>subimage-type</I> <I>string</I> * ) <I>subimage-type</I> ::= color | mono | mask <I>palette-form</I> ::= ( palette ... ) <I>color-form</I> ::= ( color <I>string</I> <I>r</I> <I>g</I> <I>b</I> ) </PRE> <PRE> <I>type-or-types</I> ::= <I>type</I> | <I>symbol</I> | ( [ <I>type</I> | <I>symbol</I> ]* ) <I>value</I> ::= <I>number</I> | <I>symbol</I> | <I>global-variable</I> | <I>predefined-symbols</I> | ( [ <I>value</I> ]* ) | ( <I>operation-name</I> [ <I>value</I> ]* ) <I>operation-name</I> ::= quote | list | append | remove | /= | < | <= | = | > | >= <I>global-constant</I> ::= true | false | u* | t* | m* | non-unit | non-terrain | non-material | border | cell | coating | connection | over-all | over-border | over-nothing | over-own | no-x | river-x | road-x | valley-x </PRE> <PRE> <I>global-variable</I> ::= action-messages | advantage-default | advantage-max | advantage-min | alt-blob-density | alt-blob-height | alt-blob-size | alt-smoothing | calendar | country-radius-max | country-radius-min | country-separation-max | country-separation-min | edge-terrain | elapsed-real-time | event-messages | extra-turn-chance | feature-namers | feature-types | grid-color | growth-stop-chance | initial-date | initial-day-part | initial-year-part | last-turn | maze-passage-density | maze-room-density | player-sides-locked | random-events | random-state | real-time-for-game | real-time-per-side | real-time-per-turn | river-sink-terrain | scorefile-name | season-names | see-all | see-terrain-always | see-weather-always | self-required | side-library | sides-max | sides-min | sides-wanted | synthesis-methods | temperature-floor | temperature-floor-elevation | temperature-moderation-range | temperature-year-cycle | terrain-seen | turn | units-in-game-max | units-per-side-max | unseen-char | unseen-color | unseen-image-name | use-side-priority | wet-blob-density | wet-blob-height | wet-blob-size | wet-smoothing | wind-mix-range </PRE> <PRE> <I>synthesis-methods</I> ::= make-countries | make-earthlike-terrain | make-fractal-percentile-terrain | make-independent-units | make-initial-materials | make-maze-terrain | make-random-date | make-random-terrain | make-rivers | make-roads | make-weather | name-geographical-features | name-units-randomly </PRE> <PRE> <I>random-event-method</I> ::= accidents-in-terrain | attrition-in-terrain | units-revolt | unit-surrender </PRE> <HR> Go to the <A HREF="xcdesign_1.html">first</A>, <A HREF="xcdesign_57.html">previous</A>, <A HREF="xcdesign_59.html">next</A>, <A HREF="xcdesign_61.html">last</A> section, <A HREF="xcdesign_toc.html">table of contents</A>. </BODY> </HTML>