[ZILF] synonyms for adjectives

W?GIGANTIC:: .ZWORD "gigantic"
	.WORD 0
	.BYTE 4

1 Like

zork0dat.zap in the r393 source has the same W?LARGE pointer as historicalsource, but appears on line 18029 instead of 19113.

you have also piped uniq(1) ?

Best regards from Italy,
dott. Piergiorgio.

I’m not sure what you mean but 1st I extracted all <SYNTAX… to a file.

grep -hR "<SYNTAX " obsessively_complete_infocom/ | sort -u > infocom_syntax.txt

Then I used this file and extracted all variations of the first flag (HAVE, HELD, CARRIED, EVERYTHING, IN-ROOM, ON-GROUND, TAKE and MANY):

grep -h -Eo '.\(HAVE.{0,40}' infocom_syntax.txt | sort -u > infocom_syntax_have.txt

Lastly I imported all 8 files into OpenCalc, made formulas that extracted each word individually, concatinated all together again with all flags in alphabetical order. Finally I sorted the list and removed all duplicates.

1 Like

After a bit experimenting (both in ZILF’s zillib and in Infocom’s standard parser) I think I have found the following about the search-flags in the SYNTAX:

HAVE, TAKE, MANY
These establish a “rule”. You need to HAVE the OBJECT or the parser tries to make an implicit TAKE or the nounphrase can contain multiple (MANY) OBJECTs.

HELD, CARRIED, IN-ROOM, ON-GROUND
Hint the parser to where it is fruitful to search for the OBJECT. If the search fails in the hinted scope the parser continues the search for the OBJECT in the scope not hinted. This is used to optimize the parser.

;"Foo the object (look first in the inventory)"
<SYNTAX FOO OBJECT (HELD CARRIED) = V-FOO>

;"Take the object. Look first on the ground and then inside objects on the ground."
<SYNTAX TAKE OBJECT (ON-GROUND IN-ROOM) = V-TAKE>

Have I understood this correct?

1 Like

Indeed sort -u roughly equates sort | uniq :slight_smile:

man uniq should explain what I mean :wink:

Best regards from Italy,
dott. Piergiorgio.