I’ve been having trouble with my ZVM interpeter for version 3. After double checking everything and comparing to several other implementations, I still can’t figure out why the parser is having trouble. It works for Inform games (such as the z3 version of Curses) but not for ZIL games, whether Infocom or ZILF (examples: minizork.z3 and advent.z3).
I would greatly appreciate another pair of eyes looking over my code, or if any other interpreter authors have any advice.
Potentially relevant functions:
- parse_dict(): parses and caches the dictionary
- read()
- handle_line_input(): adds the zero terminator and stores the text buffer, then calls tokenise
- tokenise(): splits the text buffer into words, finds the relevant dictionary entries, and then fills the parse buffer
From logging the results of these functions at various points it seems to me like the text and parse buffers are both being correctly filled. This makes me wonder if perhaps the bug is somewhere else entirely. Does anyone know if the ZIL library might be using some opcode which Inform never does?
Lastly, if you have node, you can install the ifvms package globally, and then run it with the zvm command:
npm install -g ifvms
zvm advent.z3