Appendix C: Example ZurkParser Semantic Validation

Note that some of the strings in this validation have been wrapped for readability. In the actual ZurkParser output, they MUST NOT be wrapped.

(ROOM (NAME garden)
(DESCRIPTION (STRING "A lovely garden filled with lillies,
snapdragons, roses, petunias, and poison ivy.  There is a door here to
the South.  Through the window beside the door, you can see the
study.")
)
(OBJECTS (OBJREF door)
(OBJREF rose)
)
(MOVEMENTS (MOVE south (COND ((EQ door.open true)
(EQ Player.location (ROOMREF study)
)
(PRINT (STRING "The door remains open behind you.")
)
)
((AND (EQ door.open false)
(EQ rose.location Inventory)
)
(PRINT (STRING "Your fairy godmother appears and grants your every
wish.  Game over.  You win. Congratulations.")
)
(END)
)
(DEFAULT (PRINT (STRING "You bump your nose on the door.  Ow!")
)
)
)
)
)
)
(ACTION throw 1 (COND (EQ $3.location $2.location)
(END)
)
)

ERROR: Room(garden) references ObjRef(rose), but no Object(rose) has
been declared.
ERROR: Room(garden) references ObjRef(door), but no Object(door) has
been declared.
ERROR: Move(south) references RoomRef(study), but no Room(study) has
been declared.
ERROR: Move(south) references Variable(door.open), but no
Variable(door.open) has been declared.
ERROR: Move(south) references Variable(rose.location), but no
Variable(rose.location) has been declared.
ERROR: Action(throw) has arity 1, but accesses relative lval $3
ERROR: Action(throw) has arity 1, but accesses relative lval $2



Terran Lane 2005-02-28