Creates a placeholder for use with a specific language and
establishes the characteristics of that placeholder.
Format
DEFINE PLACEHOLDER placeholder-name
placeholder body
END DEFINE
or
DEFINE PLACEHOLDER placeholder-name
/PLACEHOLDER= other-placeholder
1 – Qualifiers
1.1 /AUTO_SUBSTITUTE
/AUTO_SUBSTITUTE
/NOAUTO_SUBSTITUTE (D)
Specifies whether you want the next placeholder with this name
to be replaced with the same text you typed over the current
placeholder.
1.2 /DESCRIPTION
/DESCRIPTION=string
Specifies a single line of text to be displayed along with the
placeholder name when the placeholder name appears in a menu
during an EXPAND operation.
1.3 /DUPLICATION
/DUPLICATION=specifier
/DUPLICATION=CONTEXT_DEPENDENT (D)
Specifies the type of duplication to be performed when the
placeholder is duplicated (either by expanding it or by typing
over it). The specifier is one of the following keywords:
o CONTEXT_DEPENDENT
If the placeholder is the only item within its segment (that
is, if it is either the only item before or the only item
within a trailing comment), then LSE duplicates it vertically
(see the VERTICAL keyword in this list). Otherwise, LSE
duplicates it horizontally. White space may precede or follow
the placeholder.
o HORIZONTAL
LSE places the duplicate immediately to the right of the
original. If you specify a separation string, LSE places the
string between the original and the duplicate.
o VERTICAL
LSE places the duplicate on the next line, immediately under
the original. If a separation string is specified, LSE places
it at the end of the original. If the original placeholder is
in the commented segment of the line, then LSE also duplicates
the comment delimiters directly underneath the delimiters
in the original line. If necessary, LSE adds close comment
delimiters to the original line to close a bracketed comment on
that line.
1.4 /LANGUAGE
/LANGUAGE=language-name
Specifies the language associated with the placeholder. By
default, the new placeholder is defined for use with the current
buffer's language.
1.5 /LEADING
/LEADING=string
Specifies any leading text to be associated with the placeholder.
The ERASE PLACEHOLDER command recognizes this text and erases it
along with the placeholder. The leading text must not have any
trailing blank spaces because the ERASE PLACEHOLDER command always
skips over such spaces.
1.6 /PLACEHOLDER
/PLACEHOLDER=other-placeholder
Specifies the name of another defined placeholder from which this
placeholder inherits its definition. A placeholder defined with
the /PLACEHOLDER qualifier may not be named on the /PLACEHOLDER
qualifier of any other definition. The /PLACEHOLDER qualifier is
mutually exclusive with all other qualifiers except the /LANGUAGE
qualifier.
1.7 /PSEUDOCODE
/PSEUDOCODE (D)
/NOPSEUDOCODE
Specifies whether pseudocode can be entered at a specific
placeholder. If you specify the /NOPSEUDOCODE qualifier for a
placeholder, that placeholder cannot be used with pseudocode.
1.8 /SEPARATOR
/SEPARATOR=string
Specifies the string that separates each duplication of the
placeholder. See the /DUPLICATION qualifier description.
1.9 /TOPIC_STRING
/TOPIC_STRING=string
Specifies a quoted string that LSE uses to retrieve help text
for this placeholder. This string is appended to the string you
specify with the /TOPIC_STRING qualifier of the DEFINE LANGUAGE
command to form the complete string of topics that LSE uses for
looking up the help text for this placeholder.
1.10 /TRAILING
/TRAILING=string
Specifies any trailing text to be associated with the placeholder.
The ERASE PLACEHOLDER command recognizes this text and erases it
along with the placeholder. The trailing text must not have any
leading blank spaces because the ERASE PLACEHOLDER command always
skips over such spaces.
1.11 /TYPE
/TYPE=type-specifier
/TYPE=NONTERMINAL (D)
Specifies the kind of placeholder being defined. The type
specifier may be NONTERMINAL, MENU, or TERMINAL.
2 – Parameters
placeholder-name
Specifies the name of the placeholder being defined. A placeholder
name must be unique within a language and can be a quoted string.
To redefine an existing placeholder, you must first delete it
using the DELETE PLACEHOLDER command.
placeholder body
Is the body of the placeholder being defined. The interpretation
of the placeholder body depends on the type of placeholder. LSE
displays the body of a terminal placeholder when you attempt to
expand the placeholder. Note that displaying this text does not
replace the terminal placeholder and its delimiters.
The body of a nonterminal placeholder is the text of the
placeholder expansion; when a nonterminal placeholder is expanded,
the placeholder name and enclosing delimiters are replaced with
the text of the placeholder body.
A nonterminal placeholder can have more than one quoted string in
each body line. For the expansion of the placeholder, you can set
the indentation of each string by using the /INDENTATION qualifier
and its associated keywords.
Each quoted string in the body line of a nonterminal placeholder
can take the qualifier and keywords described in the following
section.
Nonterminal Body Qualifier
/INDENTATION=(keyword1 [,integer1, keyword2])
keyword1
You can specify any of the following options for keyword1:
Option Description
EXPAND Indents the string to the column of the first
character of the nonterminal placeholder being
expanded. This is the default value if the first body
line is not a null string.
CURRENT Indents the string to the indentation of the line
containing the placeholder or token. This is the
default value if the first body line is a null string.
PREVIOUS Indents the string to the indentation of the line
before the line containing the placeholder or token.
FIXED Indents the string to the specified column.
integer1
You can specify any integer for the integer1 option. The default
is 0. The integer is added to the column position as specified by
keyword1 and adjusts the indentation by that number of columns.
The integer can be negative. When the value for keyword1 is FIXED,
integer1 specifies the column position at which to put body text;
it must be positive.
keyword2
You can specify any of the following options for keyword2:
Option Description
TAB Specifies that integer1 should be interpreted as
specifying an adjustment in terms of tab increments
rather than columns. Integer1 is multiplied by the
tab increment for the buffer before it is added to the
column specified by keyword1.
SPACE Specifies that integer1 should be interpreted as
specifying an adjustment in terms of spaces. This is
the default.
Note that you cannot specify keyword2 when keyword1 has a FIXED
value.
If there is more than one quoted string in a body line, a comma
must separate the strings. For FORTRAN, if the body line is inside
of a comment or there is a tab in the body lines, the /INDENTATION
qualifier and associated keywords do not take effect for the first
quoted string for each body line.
For more information about the use of the /INDENTATION qualifier,
see the examples for the EXPAND command.
Each line of the body of a menu placeholder represents one option
in the menu. An option can be a string of text, a placeholder
name, or a token name. If the option is a string of text, it
must appear in quotes. If the option is a placeholder name or a
token name and does not appear in quotes, that placeholder name or
token name appears in uppercase letters in the menu display. For
a placeholder name or token name to appear in lowercase letters
in a menu, you must enter the placeholder name or token name as a
lowercase quoted string.
Each line in the body of a menu placeholder may take one or more
of the following qualifiers:
Menu Body Qualifiers Default
/DESCRIPTION=string
/[NO]LIST /NOLIST
/PLACEHOLDER
/TOKEN
/DESCRIPTION=string
Specifies a description string that is displayed in the right-
hand column of the menu. If this qualifier is omitted, then LSE
gets the description string from the corresponding definition if
the line has either the /TOKEN or the /PLACEHOLDER qualifier. If
neither /TOKEN nor /PLACEHOLDER is specified, then the line is a
literal string and the value of the /DESCRIPTION string defaults
to the empty string.
/LIST
/NOLIST (D)
Specifies whether the delimiters for the placeholder should be
list delimiters or not. Use this qualifier only in conjunction
with the /PLACEHOLDER qualifier.
/PLACEHOLDER
Specifies that the name or string is the name of a placeholder in
the language. This qualifier is mutually exclusive with the /TOKEN
qualifier.
/TOKEN
Specifies that the name or string is the name of a token in
the language. This qualifier is mutually exclusive with the
/PLACEHOLDER and /[NO]LIST qualifiers.