I've been holding in most of my questions, and I've found most of the answers. I can't figure out how ZILF knows if a word is a noun, verb, preposition, or direction when just using <SYNONYM>
.
Specifically, we can look at lines 8 - 43 in the H2G2 SYNTAX.ZIL file.
https://github.com/KVonGit/hitchhikersguide-gold/blob/master/syntax.zil#L8-L43
Lines 8 through 11:
<SYNONYM ALL EVERYTHING>
<SYNONYM AGAIN G>
<SYNONYM OOPS O>
<SYNONYM TO TOWARD TOWARDS>
That seems to be NOUN, VERB, VERB, PREPOSITION, with no rhyme or reason. How does ZILF know which is which?
Let's jump ahead a few lines:
<SYNTAX SUPER = V-SUPERBRIEF>
<SYNONYM SUPER SUPERBRIEF>
Here, I assume that <SYNTAX>
sets up W?SUPER
as a verb. Then, I also assume that <SYNONYM>
checks whether the first word (here being "SUPER") is already set up (a la W?SUPER
). If it is set up, I proceed to assume that <SYNONYM>
then sets each word in this instance up as verbs to match the first word in the group.
Furthermore, I can see how a SYNONYM
block of code within an OBJECT
block of code is easily recognized as a noun. (And adjectives are a no-brainer (I think).)
But I seriously wonder how ZILF knows what type of words it is dealing with in a SYNONYM
block when the first word isn't already declared?
Wait, wait, wait. . .
The buzz words are declared first in that file. So, I see how that part works.
If the prepositions are declared somewhere outside of the game files, then that makes sense, too.
The primary direction words are also probably set up somewhere outside of the game files. So, that's probably how ZILF has something to check against there.
Hmm. I may have answered my own question while typing this. . .
Did I get it right in the end? BUZZ, PREPOSITIONS, and DIRECTIONS all have the "main" word declared before any synonyms are created in the game file? And anything "wild" is created as a verb?
Also, is there a ZILF forum I should be using to ask things such as this?
I have a ZILF question. I know what a MILF is, but not a ZILF. Is that a Zombie I'd Like to...?
Sorry, I guess that does not help you much.
Ha ha!
A good bit of silliness is always helpful, as far as I'm concerned. (A smile a day keeps the ex-wife away!)
https://foss.heptapod.net/zilf/zilf#readme
For the record, though, ZILF compiles ZIL files to ZAP files. Then ZAPF assembles ZAP files to Z-machine games.
I only asked about it here because the author of ZILF was helping me out with stuff in a different thread on this site the other day, and I don't know where else said notable might see my question.
Not to exclude mrangel, he was helping me out on that thread, too, but I don't think he is at all familiar with ZILF.
I can't figure out how ZILF knows if a word is a noun, verb, preposition, or direction when just using
It doesn't. SYNONYM
basically just makes all the synonym words have the same meaning as the original word.
The word's part of speech is determined by how it's used in the rest of the program. Verbs and prepositions come from SYNTAX
directives, nouns and adjectives come from the SYNONYM
and ADJECTIVE
properties, and buzzwords have to be explicitly listed with the BUZZ
directive.
Directions are usually listed with the DIRECTIONS
directive as well, but they can also be defined implicitly: adding a property like (STARBOARD TO GALLEY)
anywhere will make "starboard" a direction if it isn't already.
Also, is there a ZILF forum I should be using to ask things such as this?
There's a section on intfiction.org: https://intfiction.org/c/authoring/zil/61
A Facebook group: https://www.facebook.com/groups/ZILcom
And a Discord server: https://discord.gg/pMJM7RBPap
Groovy!
I just perused the intficiton forum for half an hour and learned all sorts of good stuff (mostly from your posts).
Thanks, again! I truly do appreciate all of this!