c2caf8f94844b82e7fc35b106ecad0b825c1ba20
[substrate.git] / documentation / zil.md
1 # Zork Implentation Language
2 This document covers the Zork Implementation Language, as originally 
3 developed and used by Infocom for their games.
4
5 ## Format
6 This document is written using CommonMark, a markup language. More 
7 information about CommonMark can be found at <http://commonmark.org>.
8
9 ## Copyright And Licensing
10 Permission is granted to copy, distribute and/or modify this document 
11 under the terms of the GNU Affero General Public License as published 
12 by the Free Software Foundation ("FSF"), either version 3 of the 
13 License, or (at your option) any later version published by the FSF.
14
15 You should have received a copy of the GNU Affero General Public 
16 License along with this document. If not see 
17 <https://gnu.org/licenses/>.
18
19 ## Definitions
20
21 A "definition" is used to describe a room, object, routine, etc. in or 
22 used by the game. Each definition consists of a number of properties, 
23 flags, and/or instructions. A program written in ZIL can be thought of 
24 as consisting of one or more of these definitions. Definitions, 
25 properties, flags, and instructions include brackets which must be 
26 correctly paired and nested.
27
28 ## Syntax Definitions
29 Syntax definitions are used by the parser to determine valid sentence 
30 structures.
31
32 A simple example might be:
33
34     <syntax xyzzy = v-magic>
35
36 Using this example, should the parser match the player's input to 
37 "xyzzy" then the PRSA is set to magic. PRSI and PRSO would be set to 
38 false.