ID:1938245
 
Resolved
The -o option in dm.exe did not output valid XML for cases when an item in a list used compile-time text such as "[A_CONSTANT]".
BYOND Version:509.1300
Operating System:Windows 8 64-bit
Web Browser:Chrome 45.0.2454.93
Applies to:Dream Maker
Status: Resolved (509.1301)

This issue has been resolved.
Descriptive Problem Summary:
While a lot of bugs in dm.exe's -o param have been fixed, there is still an issue with lists:

    <var file="code\modules\virus2\antibodies.dm:18">ANTIGENS
<val file="code\modules\virus2\antibodies.dm:18">
<list>list
<val file="code\modules\virus2\antibodies.dm:19">"A"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:20">"B"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:21">"RH"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:22">"Q"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:23">"U"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:24">"V"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:25">"Z"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:26">"M"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:27">"N"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:28">"P"</val>
</item>
<val file="code\modules\virus2\antibodies.dm:29">"O"</val>
</item>
</list>
</val>
</var>


As you can see, the opening tag for is missing, as well as there being missing data.

The code in question that's causing issues is this:

var/global/const/ANTIGEN_A  = 1
var/global/const/ANTIGEN_B = 2
var/global/const/ANTIGEN_RH = 4
var/global/const/ANTIGEN_Q = 8
var/global/const/ANTIGEN_U = 16
var/global/const/ANTIGEN_V = 32
var/global/const/ANTIGEN_X = 64
var/global/const/ANTIGEN_Y = 128
var/global/const/ANTIGEN_Z = 256
var/global/const/ANTIGEN_M = 512
var/global/const/ANTIGEN_N = 1024
var/global/const/ANTIGEN_P = 2048
var/global/const/ANTIGEN_O = 4096

var/global/list/ANTIGENS = list(
"[ANTIGEN_A]" = "A",
"[ANTIGEN_B]" = "B",
"[ANTIGEN_RH]" = "RH",
"[ANTIGEN_Q]" = "Q",
"[ANTIGEN_U]" = "U",
"[ANTIGEN_V]" = "V",
"[ANTIGEN_Z]" = "Z",
"[ANTIGEN_M]" = "M",
"[ANTIGEN_N]" = "N",
"[ANTIGEN_P]" = "P",
"[ANTIGEN_O]" = "O"
)


I realise that the above code shouldn't even be compiling in the first place (since the params are non constant)
Lummox JR resolved issue with message:
The -o option in dm.exe did not output valid XML for cases when an item in a list used compile-time text such as "[A_CONSTANT]".
Operators and whitespace are omitted from text expressions:

var/test = "[1 + 2 / 3 * 4 - 5]"
var/test2 = "[1 + 1] + [2 + 2]"

/* becomes:
<?xml * ?>
<dm>

<var file=*>test
<val file=*>"[12345]"</val>
</var>
<var file=*>test2
<val file=*>"[11] + [22]"</val>
</var>

*/


I believe you said you wouldn't do constant folding on tree generation, but if you ever do I'd like a flag to disable it.
In response to Crashed
New issues need new threads. Although this one is not likely to be fixed any time soon.