home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fatal Distractions!
/
fataldistractions.bin
/
appndxa
/
masters
/
agtlint.doc
< prev
next >
Wrap
Text File
|
1993-10-27
|
15KB
|
392 lines
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 1
Program and documentation by:
David S. Raley
13523 Demetrias Way
Germantown, MD 20874
Compuserve: [72247,1153]
Internet: 72247,1153@compuserve.com
INTRODUCTION
AGTLINT is an error analysis utility for use with David R. Malmberg's
Adventure Game Toolkit. While it is primarily intended for use with the
Master's Edition, AGTLINT is also useful in debugging Classic Edition and
AGTNUM source files.
AGTLINT reads through a source file (.AGT, .CMD, .DAT, or .MSG file)
and verifies that all the tokens in use are valid. With .AGT files, AGTLINT
also verifies that any labels that are defined are consistant with the uses
defined in the AGT manual. It then generates a file listing any errors or
warnings found, as well as a complete symbol table for the source file.
AGTLINT does not replace the compiler, but supplements it. First of all,
it does not generate an executable adventure file. Second, it concentrates on
those errors that the compiler doesn't recognize. Together, the two programs
should recognize almost any syntactic or symantic error.
AGTLINT cannot detect logical errors, of course, but with this utility,
you no longer have to worry about spending three days trying to debug an
error only to learn that the problem was that you used a noun label with a
flag token. You can now save your debugging skills for the true logical
errors that only the programmer can handle.
SHAREWARE
AGTLINT is distributed as shareware. If you find this utility useful in
debugging your adventure games, please send $10 to the author. This
includes an automatic upgrade to the next release of the program when it
is available. Once you are registered, you are considered registered for
all later releases. Registered users wishing to obtain a later release
directly from the author may upgrade at $5 (the upgrade is free if the
new version repairs a significant bug reported by the user). Please specify
size and density of disk, as well as the release number you presently have
when you register or upgrade.
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 2
USING AGTLINT
The syntax for AGTLINT is as follows:
AGTLINT Sourcefile [Switches]
The Sourcefile is the AGT source file AGTLINT is to analyze. This file
will generally be a .AGT file, though it may also be a .CMD, .MSG, or .DAT
file is you are using the Classic Edition. If no extension is provided,
AGTLINT will assume a .AGT file.
The following switches are recognized by AGTLINT. Note that the letters
in brackets are optional.
/? Display the help screen and exit.
/A[PPEND] This switch appends the report to an existing .LIN
file instead of overwriting the present one. This
switch has no effect if no such file exists.
/C[LASSIC] This switch tells AGTLINT that you are analyzing
a Classic Edition source file. This allows AGTNUM
to accept numbers (and macros evaluating to numbers)
as parameters for most tokens.
/I[GNORE]=str Tells AGTLINT to ignore any lines starting with the
specified string and assume that they are comments.
AGTLINT already accepts the following strings as
comment headers (b represents a space):
; !
( /
{ *
= <
REMb REM:
/N[UM] This switch tells AGTLINT that you are analyzing
an AGTNUM source file. This allows AGTNUM to
recognize multi-line macros and multiple labels
for VARIABLES, COUNTERS, and FLAGS.
/S[MALL] Tells AGTNUM that a Classic input is from the small
/S[TANDARD] (or standard) version (200 rooms, 100 nouns,
100 creatures). Big and Master's Edition source
files should not use this switch.
AGTLINT will then read through the file and generate its report file. It
will display its status, as well as any errors it finds, on the screen as
it finds them.
If you wish to exit AGTLINT during analysis, simply hit the ESC key.
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 3
THE REPORT FILE
After the banners and copyright message, the report file lists all
informational, warning, and error messages. Each message include the
message type, the line number of the file it is in, and finally the
message itself.
Informational messages indicate the status of the program. These
include the opening and closing of include files, and the start of each
pass. These are useful for tracing the file where any erros and warnings
are located.
Warning messages are issued when an unknown element is encountered.
This could be a comment, a token to a later version of AGT than the
current version of AGTLINT handles, a non-standard default token in an
object definition (such as using OPENABLE as an opposite case for CLOSABLE),
or a misspelled token. Note that the compiler has a limited number of
significant characters in a token name, while AGTLINT does not.
Error messages are issued when something is found that definitely must
be corrected before running the program. An example of an error is using a
noun label where a flag label is expected.
After the resource list is a list of the total number of errors and
warnings. If all is well, both should be 0.
After the number of errors, AGTLINT lists the resources used in the
program. Note that any flags or room flags that are defined as macros
are not listed here. The number of available items for each resource
is for the version of MCOMPILE corresponding to this version of AGTLINT.
After the resource list is a list of all macro definitions in the
source file, followed by a list of all symbols definitions in the file.
COMMENTS
AGTLINT assumes that anything it does not recognize is an error. To
do otherwise would defeat the purpose of the program. Unfortunately,
there is no standardized method for placing comments in the AGT file.
To avoid getting your comments flagged as errors, use one of the more
common comment separators. The ones AGTLINT recognizes are:
; !
( /
{ *
= <
REMb REM:
You may also define your own comment separator by using the /IGNORE
switch when you start AGTLINT. So, if you wanted to use COM: as a comment
separator, you should start AGTLINT with:
AGTLINT ADV_FILE /I=COM:
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 4
APPENDIX A
Informational Messages
Starting First Pass All
Starting Second Pass All
Displayed at the start of a pass.
End of main file All
Displayed at the end of Pass 2.
Opening include file All
End of include file All
Displayed when an include file is opened and closed. All messages
displayed between the opening and closing of an include file
refer to the line numbers within the include file.
Operation aborted by user All
User hit the ESC key during analysis.
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 5
Warnings
Unknown compiler directive All
An unrecognized compiler directive was found.
Unreachable token All
A token is placed after a closing token (DoneWithTurn,
ReDirectTo, QuitThisCMD, or QuitAllCMDs). Usually this
is a superfluous DoneWithTurn (which is innocuous); if
it's anything else, the token should probably be moved.
Token expected after NOT All
NOT should be followed by another token, but AGTLINT
didn't find one.
Unrecognized token All
AGTLINT found a token it did not recognize a token that was
found inside a command or item definition.
Description redefinition Master, AGTNUM
A description of this type has already been defined for this
item. This is usually the result of mislabelling either the
flagged description or the other one with the same label.
Descriptions include:
HELP SPECIAL
TALK_DESCR ASK_DESCR
PUSH_DESCR PULL_DESCR
TURN_DESCR PLAY_DESCR
TEXT CREATURE_DESCR
ROOM_DESCR NOUN_DESCR
Unknown entity All
An unknown token was found outside the scope of a message, command,
definition, or descriptor. This can either be a comment without a
recognized comment marker or a mispelled item.
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 6
Numerical token expected All
A paramter that should be a numerical value has a non-numeric
value instead.
Time parameter out of range Master, AGTNUM
A time parameter was not between 0000 and 2400.
Unknown direction Master, AGTNUM
A direction parameter was not between 1 and 12.
Symbol expected Master, AGTNUM
A symbolic parameter was expected, but a number was found instead.
Unknown parameter type All
A parameter is neither a symbol nor a number. Most likely, this
means that a parameter is missing and that a trailing comment
was taken for the parameter instead.
Incorrect Param type Master, AGTNUM
A symbol was found for a parameter, but of the wrong type for
the present token (such as using a flag for GetIt).
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 7
Errors
Symbol definition expected Master, AGTNUM
A symbol was expected for a NOUN, CREATURE, or ROOM definition,
but was not found.
Symbol redefinition Master, AGTNUM
A NOUN, CREATURE, or ROOM definition is using symbol that has
already been defined.
Macro name expected All
There was no symbol following #define.
Macro has no value Master
The macro being defined has no value. The macro is assigned a
null value. Note that if the input is an AGTNUM source (/NUM),
AGTLINT will assume that you are defining a multi-line macro
(the macro is still assigned a null value, and so is not
evaluated, but no error message is given).
Macro redefinition All
A macro has already been defined with this label.
Param1 must be <= Param2 All
This token requires the parameters to define a range. Tokens
with this requirement are: BetweenRooms, GoToRandomRoom,
RandomMessage, GetNumberInput, and PlayRandom.
Label expected to follow Master, AGTNUM
A description is not followed by a label.
Undefined label Master, AGTNUM
The label following a description header is not defined.
Incorrect label type Master, AGTNUM
The label following a description header is defined for an
inappropriate item (such as defining TEXT for a ROOM).
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 8
Missing Parameter Any
The present token has a missing parameter. This message may
be given on either a definition or a command in Master and
AGTNUM sources, but only on command in Classic sources.
Undefined parameter Master, Classic
The specified parameter label is not defined.
Too many items defined for resource Any
AGTLINT has found more definitions for the given resource than
are allowed. Note that limits are only defined for Masters 1.52+
and Small Classic source files. If you are using either the Big
Edition or an ealier version of the Master's Edition, use the
Master's numbers, since they are sufficient to cover those cases.
Unable to open include file Any
The given include file could not be opened.
Number too large Classic
Number too small Classic
A description's item number is either too large or too small.
Numeric parameter too large Classic
Numeric parameter too small Classic
A parameter's numeric value is either too large or too small.
AGTLINT 1.56-1 Copyright 1993 by David S. Raley 9
APPENDIX B
NOTE ON THE VERSION NUMBER
Release 1 supports versions of the Master's Edition up to 1.56--the
version number is this given as 1.56-1. This release works properly with
all version of the Master's Edition, as well as with inputs for the
Classic Edition. This release has been tested on AGTNUM source files,
though there are no guarantees that all of its features are supported.
VERSION HISTORY
Release 1 (supports up to Version 1.56) Released 27 October 1993
If you have any questions about this utility, please contact the author.
David S. Raley
13523 Demetrias Way
Germantown, MD 20874
Compuserve: [72247,1153]
Internet: 72247,1153@compuserve.com