Alias Expansion of the Line (DBX Mode only)

The assembled line is now subjected to alias expansion. This is done by scanning the line, looking for pound (#), semicolon (;), and left brace ({) characters that are not inside strings.

The debugger performs alias expansion as follows:

  1. At the beginning of the line, and immediately after semicolon (;) or left brace ({) characters not inside strings, the debugger checks for the occurrence of an alias identifier.

  2. If it finds an alias identifier, it associates the formal parameters of the alias with the specified actual parameters.

    If the alias has no formal parameters, this match consumes no more of the input.

    1. If there are formal parameters, white space is skipped, and then a '(' character is checked for and skipped. The characters following the '(' up to the first non-nested ',' or ')' character are associated with the formal parameter.

      Again, the characters within strings are not tested. Nesting is caused by '(' and ')' characters outside of strings.

    2. If there are more formal parameters, the ',' character is treated as the terminator of the actual parameter. It is skipped and processing continues as for the first parameter.
  3. After the alias and the correct number of actuals have been identified, all the characters from the start of the alias identifier to its end (no parameters) or the trailing ')' (one or more parameters) are replaced by the expansion.

  4. Within the definition of the alias, all occurrences of the formal parameter are replaced by the actual parameter, regardless of whether or not it is in a string.