Broken specification + code for grammar property
The Inform 6 standard library tries to distinguish between the return values 'verb' and -'verb' from a grammar
property routine. Here's the library code, for Z-code (line 1707 in parser.h):
if ((i ~= 0 or 1) &&
(UnsignedCompare(i, dict_start) < 0 ||
UnsignedCompare(i, dict_end) >= 0 ||
(i - dict_start) % dict_entry_size ~= 0)) {
usual_grammar_after = j;
i=-i;
}
If the dictionary spans the $8000 mark, and the first word in the dictionary starts at address a
where ($8000 - a) % dict_entry_size == 0
, the test to see if the value is a negative dictionary word may fail.
I suggested fixing this in the compiler, which is ugly but the only way to not change the specification of how the routine should work. Andrew Plotkin thinks the change should be done in the library though. Here's the ticket: https://github.com/DavidKinder/Inform6/issues/130
Changing the specification so the routine returns 'verb'+1 instead of -'verb', and changing the code accordingly, should do the trick. I can't see a way to fix this without making a breaking change.