Author: ai0867
Date: Mon Sep 29 10:38:19 2008
New Revision: 29757
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29757&view=rev
Log:
* Allowed separate references to tags or keys.
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=29757&r1=29756&r2=29757&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmlgrammar.py (original)
+++ trunk/data/tools/wesnoth/wmlgrammar.py Mon Sep 29 10:38:19 2008
@@ -50,12 +50,33 @@
'toplevel' : (
[],
[ 'sections', 'topics', ]),
-
}
def grammar(self):
out = {}
for key in self._grammar.keys():
out.update( { key : self._grammar[key] } )
- while isinstance(self._grammar[key], str):
- out.update( { key : self._grammar[self._grammar[key]] } )
+ while isinstance(out[key], str):
+ out.update( { key :
+ self._grammar[
+ out[key]
+ ]
+ } )
+ while isinstance(out[key][0], str):
+ out.update( { key :
+ (
+ self._grammar[
+ out[key][0]
+ ][0],
+ out[key][1]
+ )
+ } )
+ while isinstance(out[key][1], str):
+ out.update( { key :
+ (
+ out[key][0],
+ self._grammar[
+ out[key][1]
+ ][1]
+ )
+ } )
return out
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits