home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
v
/
veriverb.zip
/
README
< prev
next >
Wrap
Text File
|
1992-12-12
|
6KB
|
119 lines
VERIVERB
----------
Verb Verifier for TADS .T files.
version 1.0
Rick LaBach
December 9, 1992
VERIVERB is a verb call and uniqueness verifier for TADS adventure games.
It is intended as a supplement for the TC compiler to check for possible
problems that would show up during run-time. It does not replace or duplicate
any of the compiler functions; your program should first compile without
errors before VERIVERB can give you any meaningful information.
BACKGROUND:
The sequence of Verb Calls (also known as methods) during run-time
execution of a TADS .GAM file as described in the author's manual is as
follows:
if ( An indirect object was specified )
direct_object.verDo_Verb_( actor, indirect_object )
if ( No Output resulted from verDo_Verb )
indirect_object.verIo_Verb( actor )
if (No Output resulted from verIo_Verb )
indirect_object.io_Verb( actor, direct_object )
else if ( A direct object was specified )
direct_object.verDo_Verb_( actor )
if ( No Output resulted from verDo_Verb )
direct_object.do_Verb( actor )
else
_Verb.action( actor )
The compiler checks to be sure all the objects you use are properly defined
and unique, but it does not check that the correct number of arguments are
supplied in each case. For instance, if one of your objects contained the call
io_Verb( actor )
the compiler would process it without errors. During run-time, however,
activating that call would result in a run-time error, either displayed
explicitly or inherent in the game's actions. There are usually a large number
of verb calls in a game, and since many are only activated on rare occasions
finding all the bugs during testing is an iffy proposition.
Another potential set of problems can arise from multiple Verb objects
being assigned the same name. A verb's names are the entities defined in the
" verb = " line of the Verb object's definition e.g. in the ADV.T file, the
verb "attackVerb" defines its names as 'attack', 'kill', and 'hit'. If you
have defined a gun in your game and included 'kill' as a name for shootVerb,
you are likely headed for a problem. Which verb 'kill' refers to during run-
time depends on the version of TADS and which one the compiler sees first.
WHAT VERIBERB DOES:
VERIVERB reads the .T game file and all of the #include files and creates
an index of all the verbs used and where they are defined. It then checks all
the verb calls to be sure the correct number of arguments are provided and that
all io verb calls have a corresponding ioAction defined. VERIVERB then checks
to be sure all verb names are unique and refer to only one verb object.
VERIVERB will also check to be sure you are sending an valid object name, not a
number.
VERIVERB creates two output files, VERIVERB.LST and VERIVERB.ERR. The LST
file is the index of all verb object definitions showing in which file and line
number they occur. The ERR file lists any errors which should be addressed.
The ERR file also shows if any verb objects containing non-unique ioAction or
doAction verb actions. This is not necessarily a problem unless it is
accidental; you should check these verbs to be sure it is what you intended.
USAGE: VERIVERB { adventure_file.T }
LIMITATIONS:
VERIBERB can keep track of up to 1000 verb objects and 5000 verb actions
and names. The actual number that can fit in your computer's conventional
memory is probably less, depending on name lengths, etc. However, this should
be more than enough: DEEP SPACE DRIFTER contains only 98 verb objects, 213
verb names, and 121 verb actions.
VERIVERB assumes the standard convention regarding verb object definitions
as recommended in the TADS author's manual. All verb objects must be in the
form of " {verbname}Verb: ". The 'V' must be capitalized, and there must be no
space before the colon. Also, the verb names following " verb = " must all be
on the same line as " verb = " in order to be recognized. Beyond this, all
that compiles will verify.
VERIVERB ignores any code which has been commented out. (This is my
preferred way of customizing ADV.T for individual games.)
VERIVERB has no way of knowing if the verb calls contain properly defined
objects, or that the objects specified are the ones you intend. These are
functions of the TC compiler and beta-testing respectively; only the number of
arguments is checked. Also, functions and daemons are not verified since they
are less numerous and easier to check manually.
This version of VERIVERB will flag as errors any verb call which contains
imbedded functions calls inside the parentheses.
REMEMBER, BE SURE YOUR GAME COMPILES WITHOUT ERRORS FIRST, OTHERWISE THE
RESULTS WILL BE UNPREDICTABLE.
-----------------------------------------------------------------------------
VERIVERB is a public domain program for users of TADS on MS-DOS compatibles,
written in Borland C++. The program is copyright, but you may copy and use the
software under the following conditions:
* You may make copies of the program for your own use or to give them away. No
money whatsoever is to be charged for copies of the program or for any part of
it. (Who would want to pay for it, anyway?)
* Use of the software is at your own risk. This program was written and
provided in good faith, however I accept no responsibility for the operation
or use of this program.