Defines an editing token for use with the EXPAND command. Format DEFINE TOKEN token-name token body END DEFINE or DEFINE TOKEN token-name /PLACEHOLDER= placeholder-name
1 – Qualifiers
1.1 /DESCRIPTION
/DESCRIPTION=string Specifies some text to be displayed along with the token name when the token name appears in a menu during an EXPAND operation or in a SHOW TOKEN display.
1.2 /LANGUAGE
/LANGUAGE=language-name Specifies the language associated with the token. By default, the token is defined for use with the current language.
1.3 /PLACEHOLDER
/PLACEHOLDER=placeholder-name Specifies the name of a defined placeholder that expands in place of the token. The token gets its description, topic string, and body from the defining placeholder. Note that the /PLACEHOLDER qualifier is mutually exclusive with the /DESCRIPTION and /TOPIC_STRING qualifiers and the END DEFINE command must not be used on the DEFINE TOKEN command when /PLACEHOLDER is specified. No token body is specified with the /PLACEHOLDER qualifier.
1.4 /TOPIC_STRING
/TOPIC_STRING=string Specifies a quoted string that LSE uses to retrieve help text for this token. This string is appended to the /TOPIC_STRING qualifier specified in the DEFINE LANGUAGE command to form the complete string of topics that LSE uses to look up the help text for this token.
2 – Parameter
token-name Specifies the name for the token being defined. Each token for a particular language must have a unique name. Token and alias names must not conflict. A token name can be any character including a blank space, but not a leading or trailing space. token body Is the text of the token expansion. When the token is expanded, the token name is replaced with the text of the token body. A token can have more than one quoted string in each body line. For the expansion of the token, you can set the indentation of each string by using the /INDENTATION qualifier and its associated keywords described in the following section: Each quoted string in the body line of a token can take the qualifier and keywords described in the following section. Nonterminal Body QualiDefaults /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 and 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.