Author: ai0867
Date: Mon Sep 29 10:38:02 2008
New Revision: 29752

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29752&view=rev
Log:
* Re-ordered and commented wmlgrammar.py some.

Modified:
    trunk/data/tools/wesnoth/wmlgrammar.py

Modified: trunk/data/tools/wesnoth/wmlgrammar.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmlgrammar.py?rev=29752&r1=29751&r2=29752&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmlgrammar.py (original)
+++ trunk/data/tools/wesnoth/wmlgrammar.py Mon Sep 29 10:38:02 2008
@@ -1,34 +1,38 @@
 """
 This file is used to store the grammar of WML for wmltest.
+Format: The grammar is a dictionary mapping every recognised tag 
+ plus the pseudo-tag WML to a pair of lists.
+The first list contains all tags recognised in it,
+ the second all keys.
 """
 grammar = {
+# This is the top-level pseudo-tag that everything is a child of.
+# It should have no keys
 'WML' : (
-    [ 'textdomain', 'game_config', 'about' ],
+    [ 'about', 'game_config', 'textdomain', ],
     [] ),
+# Attempt to keep everything alphabetically ordered
+'about' : (
+    [ 'entry', ],
+    [ 'images', 'title', ]),
+'color_palette' : (
+    [],
+    [ 'ellipse_red', 'flag_green', 'magenta', ]),
+'color_range' : (
+    [],
+    [ 'id', 'name', 'rgb', ]),
+'entry' : (
+    [],
+    [ 'comment', 'email', 'ircuser', 'name', 'wikiuser', ]),
+'game_config' : (
+    [ 'color_palette', 'color_range', 'server', ],
+    [ 'ally_ball_image', 'base_income', 'buttons_x', 'buttons_y', 
'buttons_padding', 'cross_image', 'default_defeat_music', 
'default_victory_music', 'defense_color_scale', 'ellipsis_image', 
'enemy_ball_image', 'energy_image', 'flag_icon_image', 'flag_image', 
'flag_rgb', 'footprint_prefix', 'footprint_teleport_enter', 
'footprint_teleport_exit', 'grid_image', 'hp_bar_scaling', 'icon', 
'kill_experience', 'level_image', 'lobby_music', 'lobby_refresh', 'logo', 
'logo_x', 'logo_y', 'moved_ball_image', 'observer_image', 
'partmoved_ball_image', 'poison_amount', 'recall_cost', 'rest_heal_amount', 
'terrain_mask_image', 'tip_padding', 'tip_width', 'tip_x', 'title', 
'title_music', 'tod_bright_image', 'unmoved_ball_image', 'unreachable_image', 
'village_income', 'wesnothd_name', 'xp_bar_scaling', ]),
+'server' : (
+    [],
+    [ 'address', 'name', ]),
 'textdomain' : (
     [],
-    [ 'name' ]),
-'game_config' : (
-    [ 'server', 'color_range', 'color_palette' ],
-    [ 'wesnothd_name', 'base_income', 'village_income', 'poison_amount', 
'rest_heal_amount', 'recall_cost', 'kill_experience', 'lobby_refresh', 'icon', 
'title', 'logo', 'title_music', 'lobby_music', 'logo_x', 'logo_y', 'buttons_x', 
'buttons_y', 'buttons_padding', 'tip_x', 'tip_width', 'tip_padding', 
'energy_image', 'moved_ball_image', 'unmoved_ball_image', 
'partmoved_ball_image', 'enemy_ball_image', 'ally_ball_image', 'flag_image', 
'flag_icon_image', 'cross_image', 'hp_bar_scaling', 'xp_bar_scaling', 
'lobby_refresh', 'footprint_prefix', 'footprint_teleport_enter', 
'footprint_teleport_exit', 'terrain_mask_image', 'grid_image', 
'unreachable_image', 'observer_image', 'tod_bright_image', 'level_image', 
'ellipsis_image', 'default_victory_music', 'default_defeat_music', 
'defense_color_scale', 'flag_rgb' ]),
-'color_palette' : (
-    [],
-    [ 'magenta', 'flag_green', 'ellipse_red' ]),
-'about' : (
-    [ 'entry' ],
-    [ 'images', 'title' ]),
-'entry' : (
-    [],
-    [ 'name', 'comment', 'wikiuser', 'email', 'ircuser' ]),
-'server' : (
-    [],
-    [ 'name', 'address' ]),
-'color_range' : (
-    [],
-    [ 'id', 'rgb', 'name' ]),
-'color_palette' : (
-    [],
-    [ 'magenta', 'flag_green', 'ellipse_red' ]),
+    [ 'name', ]),
 
 }
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to