Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61010

Infix ";" can take only one argument
Submitted by: Brendan Barnwell, Gunther Schmidl and Torbjörn Andersson     Appeared in: Library 6/10     Fixed in: Library 6/11
Problem

Infix has trouble parsing commands containing commas. For example

  >; MyRoutine(1)

works, while

  >; MyRoutine(1,2)

doesn't. This is probably related to a bugfix in the 6/10 library, so it probably doesn't affect earlier versions. The NextWord() family of functions used to assume that neither , nor . could be found in a game's dictionary, so it only checked for them on encountering unknown words in the parse buffer, converting them to comma_word and THEN1__WD respectively.

When Infix arrived, this assumption was broken. All of a sudden we did have , and . (',//' and './/' in Inform's wacky syntax for one-letter dictionary words) in the dictionary, but the Inform parser didn't know how to handle them since it was expecting comma_word and THEN1__WD.

Library 6/10 fixed this, but broke Infix in the process, since Infix doesn't know what to make of comma_word and THEN1__WD. It was expecting ',//' and './/'.

Solution

So, assuming that Infix never peeks directly at the words in the parse buffer, all we have to do is to replace all occurences in infix.h of ',//' with comma_word and, even though it's not directly related to the original bug report, './/' with THEN1__WD, and it should work again. (The irony here is that with those changes, we could probably go back to the pre-6/10 version of NextWord(), and it should all still work.)


Last updated 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.