ASSIGNMENT directives are used to set the switches and counters
which control compilation and parsing. Switches may have the value
TRUE (T), or FALSE (F), while counters may take on any non-negative
integer value. Integers may not be assigned to switches, nor may the
values TRUE and FALSE be assigned to counters. Switch and counter
settings remain in effect until a new value is assigned.
The general form of a switch assignment is
*SWITCH=T
or
*SWITCH=F
The switches in the compiler and parser are:
- DRAWSW
- if TRUE, a graphical form of the parse tree is
printed after each successful parse. If the
tree is too wide to fit on the output device (as
determined by the value of LWIDTH), it will be
automatically split into smaller trees for
printing. Initially FALSE.
- FULLTRACE
- if FALSE, operators inside of a routine are not
printed when a restriction or transformation is
traced. If TRUE, all operators are shown in the
trace. (Applicable only to parser). Initially FALSE.
- FULLTREE
- if TRUE, each node in a parse tree is assigned a
separate line in the parse tree print-out.
(Applicable only to parser). Initially FALSE.
- HOUSE
- if TRUE, a housing directory is printed at the
conclusion of link-editing. This directory
shows which restrictions are housed on each
element and option of each definition. Any
assignment to HOUSE must precede the *LKED()
directive; otherwise it will have no effect.
Initially FALSE.
- LXTRAC
- if TRUE, the lexical scanner prints out for each
word its entry in array SENTE [a table in the
lexical scanner] and a list of all the lexical
types it has been assigned. (Applicable only to
compiler). Initially FALSE.
- MATPRT
- if TRUE, a message is printed each time
something is added to the sublist of a minword
attribute (MAT). These messages appear
immediately after the tree print-outs for each
parse. (Applies to parser). Initially FALSE.
- OBJSW
- if TRUE, the generated object grammar is written
onto file lun=2 (logical unit
number 2). If a new grammar is to be
written, an *OBJSW=T directive should precede the
first statement in the source file. (Applicable
only to compiler). Initially FALSE.
- OPRINT
- if TRUE, the generated object grammar is printed
out in lithp format after each statement is
parsed. (Applicable only to compiler).
Initially FALSE.
- PUTTRC
- if TRUE, a one-line message is printed for each
word written into the object grammar buffer by a
generator. (Applicable only to compiler).
Initially FALSE.
- RECURTRACE
- if TRUE, a two-line message is printed for each
call to RECUR, the routine in the parser which
handles the recursive mechanism. Initially
FALSE.
- STREAM
- controls the function of the WRITE operation in
restrictions and transformations. If FALSE,
each type of item occupies a fixed number of
columns, and writing continues on a line until a
WRITE END-OF-LINE command is given. If TRUE,
each item occupies only as many columns as the
individual item requires, and writing continues
automatically on the next line when one line is
complete. (Applies only to parser). Initially
FALSE.
- TRACE
- if TRUE, a trace is printed of all nodes
attached and detached during a parse, together
with the names of all restrictions executed and
an indication of whether they succeeded or
failed. Initially FALSE.
- TRACER
- if TRUE, a trace is printed of all restrictions
executed during parsing, showing all operators
and whether they succeeded or failed. (Applies to
parser only). Initially FALSE.
- TREESW
- if TRUE, a linearized form of the parse tree is
printed out after each successful parse. If
FULLTREE is FALSE (the default value), only
strings (node on the STRING list) and their
elements will be displayed; intermediate levels
in the tree are surpressed. Initially FALSE.
- TSTTRC
- if TRUE, a one line message is printed for each
generator invoked during parsing. (Applicable
only to compiler). Initially FALSE.
- VERBOS
- if TRUE, the time required for the parse, the
number of nodes in the final tree, and the total
number of nodes used are printed after each
parse. Initially FALSE.
- WFFTRACE
- if TRUE, a one line message is printed each time
a wellformedness restriction fails. (Applicable
only to parser). Initially FALSE.
- XDRAWSW
- if TRUE, a graphical form of the decomposition
tree is printed after each successful
transformational decomposition (see also
DRAWSW). Initially FALSE.
- XON
- if TRUE, the transformations are executed after
each parse. (Applicable only to parser).
Initially FALSE.
- XREF
- if TRUE, the data required for generating symbol
and literal reference tables for the grammar is
written on lun=2 (logical unit
number 2). This data can be formatted
into tables suitable for printing by one of the
print utility programs. An assignment to XREF
must precede the *LKED() directive;
otherwise it will have no effect. Initially FALSE.
- XTRACE
- if TRUE, a trace is printed during the
transformational phase showing the name of each
transformation executed, and whether it
transformed the tree, succeeded, or failed.
(Applicable only to parser). Initially FALSE.
- XTRACER
- if TRUE, a trace is printed of all
transformations, showing all operators and
whether they succeeded or failed. (Applies to
parser only). Initially FALSE.
- XTREESW
- if TRUE, a linearized form of the decomposition
tree is printed after each successful
transformational decomposition (see also
TREESW). (Applies to parser only). Initially
FALSE.
In addition to the switches listed above, each BNF definition and
each restriction has a few switches of its own. These switches are set
by a qualified switch assignment, of the form
*SWITCH(SYMBOL)=T
or
*SWITCH(SYMBOL)=F
where SYMBOL is the name of the definition or restriction. Qualified
switch assignments can be used only in the parser and must appear after
the *ENGLISH directive.
The switches associated with each BNF definition are:
- COMPLETION
- if TRUE, each time a node corresponding to this
BNF definition is completed the message
NODE --- COMPLETED SUBSUMING
(followed by the words subsumed by this node) is
printed. For example,
*COMPLETION(ASSERTION)=T
will print a message each time an ASSERTION is
completed. Initially FALSE.
The switches associated with each restriction and transformation are:
- IGNORE
- if TRUE, the restriction will be totally
ignored. Initially FALSE.
- TRACER
- if TRUE, each time this restriction or
transformation is executed a trace will be
printed showing all operators and whether they
succeeded or failed. For example,
*TRACER(WAGREE)=T
will cause restriction WAGREE to be traced. A
restriction / transformation will be traced if
either the [overall] TRACER / XTRACER switch or
the individual switch for the restriction is
TRUE. Initially FALSE .
The general form of a counter assignment is
*COUNTER=INTEGER
with no embedded blanks. The counters in the parser are:
- LINLIM
- maximum number of lines of output which will be
generated during the parsing of a statement
(parsing terminates when this limit is reached).
Initially 2000.
- LWIDTH
- maximum width, in columns, of printed traces and
trees. Initially 86, maximum allowed value is 120.
- NODLIM
- maximum number of nodes which may be attached
during all parses of a statement. (Parsing
terminates when this limit is reached).
Initially 100000.
- PARLIM
- maximum number of parses which will be attempted
for each statement. Initially 99.
|