Maintain order in the file? [message #693081] |
Tue, 05 July 2011 14:30  |
Eclipse User |
|
|
|
Hello!
I have a little problem. The editor and the parsed tree it seems it doesn't keep the order. That is, for example for the code:
#textdomain wesnoth-dw
[textdomain]
name="wesnoth-dw"
[/textdomain]
It generates the tree (which can be seen in the outline):
textdomain
|--name
#textdomain
while the order should be the one in the file. How I can fix it? Also, the same problem arises when, let's say, I get an instance of the root node, and call
iterator. The iterator will give me the same order as in the outline of the file.
I think it's the way I've defined the grammar, but is there any chance to make it parse in the order in the file?
This is a bit of grammar for the specified code:
WMLRoot:
( Tags += WMLTag
| MacroCalls += WMLMacroCall
| MacroDefines += WMLMacroDefine
| Textdomains += WMLTextdomain
| IfDefs += WMLPreprocIF
)*
;
Where WMLTag is the "[textdomain]" tag, while the ifdef is the "#textdomain" thingy.
Thanks,
Timo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07308 seconds