]> icculus.org git repositories - divverent/nexuiz.git/blob - TeamNexuiz/menuqc/dotmenu.txt
now menu qc respects g_campaign_name
[divverent/nexuiz.git] / TeamNexuiz / menuqc / dotmenu.txt
1 Parser documentation/.menu docs:\r
2 ==================================\r
3 \r
4 A token is a sequence of letters that are not whitespaces.\r
5 If the parser expects something, it will error out if it doesnt find the expected token/type.\r
6 \r
7 The parser supports the following token types which refer to the keyword:\r
8 \r
9 Type                            Keyword\r
10 -----                           -------\r
11 ITEM                            Item\r
12 TEMPLATE                        Template\r
13 DERIVE                          Derive\r
14 DERIVETEMPLATE                  DeriveTemplate\r
15 NAMESPACE                       Namespace\r
16 IGNORE                          Ignore\r
17 DEFINE                          #define\r
18 UNDEF                           #undef\r
19 INCLUDE                         #include\r
20 BRACEOPEN                       {\r
21 BRACECLOSE                      }\r
22 BRACKETOPEN                     [\r
23 BRACKETCLOSE                    ]\r
24 TOKEN                           any other token\r
25 \r
26 You can use either the " or the ' to start a string - mind to use the same char to finish it!\r
27 DP only supports the \n and \\ escape chars currently.\r
28 \r
29 Now Im going to explain the behavior of the parser after it encounters a specific token:\r
30 \r
31 Ignore\r
32 \r
33  The parser expects a { next and reads over everything until it encounters the corresponding }.\r
34  Mind that corresponding means you can comment out/make it ignore bigger parts of the .menu files,\r
35  since it keeps the number { while parsing and only exits from the ignore loop if it has found the\r
36  same count of }.\r
37 \r
38  Example:\r
39 \r
40         Ignore {\r
41                 blabla {\r
42                   { blub }\r
43                    { } }\r
44         }\r
45 \r
46 Item\r
47 \r
48  The parser expects an item type/control name next, eg. Rect or Window and afterwards the name\r
49  of the item that should be defined. Next expects a { and then a number of key value pairs that\r
50  define the entity or one of the other keywords. You can nest everything in everything\r
51 \r