This appendix contains the following sections:
Format Error Messages
Error Messages
This appendix describes the error messages produced by the Macro Preprocessor mppxa. On each error that is detected by the macro preprocessor the following message is put into the output file (the .src file):
On each occurrence of an error the macro preprocessor generates an error message on the standard output. These error messages are of the following format:
where,
eee is the error number
file is the source file containing the error
nnn is the number of the line on which the error occurred
lll is the number of the line on which the last error occurred
message is the error message corresponding to the error number
Error messages are, if appropriate, followed by a trace of the macro call/expansion stack, i.e., a series of lines which print out the nesting of macro calls, expansions, INCLUDE files etc.
The macro preprocessor produces numbered error messages. This section explains the meaning of the numeric codes. The codes 301 till 320 correspond closely, but not completely, to the error codes from Intel's preprocessor.
The text following a metacharacter (initial "%") is not a recognized use function or built-in function. The reference is ignored and processing continues with the character following the name.
The built-in macro EXIT is not valid in the context. The call is ignored. A call to "EXIT" must allow an exit through a user function, or the WHILE or REPEAT built-in functions.
A numeric expression was required as a parameter to one of the built-in functions EVAL , IF , WHILE , REPEAT and SUBSTR or as a parameter to the predefined macro SET . continues with the character following the illegal expression.
The IF built-in function did not have a FI terminator. The macro is processed but may not be interpreted as you intended.
The IF built-in macro did not have a THEN clause following the conditional expression clause. The call to IF is aborted and processing continues at the point in the string at which the error was discovered.
It is illegal for a built-in function name or a parameter name to be redefined (with the DEFINE or MATCH built-in functions). Also, a user function cannot be redefined inside an expansion of itself.
In a DEFINE macro an identifier is missing, e.g., an identifier type delimiter was expected after the occurrence of "@". The DEFINE is aborted and scanning continues from the point at which the error was detected.
A balanced string "(...)" in a call to a built-in function is not present. The macro function call is aborted and scanning continues from the point at which the error was detected.
In a built-in function, an item in its argument list is missing. The macro function call is aborted and scanning continues from the point at which the error was detected.
A delimiter required by the scanning of a user-defined function is not present. The macro function call is aborted and scanning continues from the point at which the error was detected.
The end of the input file occurred while the call to the macro was being scanned. This usually occurs when a delimiter to a macro call is omitted, causing the macro preprocessor to scan to the end of the file searching for the missing delimiter.
Either a macro argument is too long (possibly of a missing delimiter), or not enough space is available because of the number and size of macro definitions. All pending and active macros and INCLUDE's are popped and scanning continues in the primary source file.
The macro context stack has overflowed. The cause of this error is excessive recursion in macro calls, expansions, or INCLUDE's. All pending and active macros and INCLUDE's are popped and scanning continues in the primary source file.
The input stack is used in conjunction with the macro stack to save pointers to strings under analyses. The cause and recovery is the same as for the macro stack overflow.
An element of a pattern, an identifier or delimiter, is longer than 31 characters, or the total pattern is longer than 255 characters. In case of an identifier only the first 31 characters are recognized as the identifier name. In the other cases the corresponding and scanning continues from the point at which the error was detected.
The METACHARACTER built-in function has specified a character that cannot legally be used as a metacharacter: a blank, letter, digit, left or right parenthesis, or asterisk. The current metacharacter remains unchanged.
During the scan of a user-defined macro, the parenthesis count went negative, indicating an unmatched right parenthesis. The macro function call is aborted and scanning continues from the point at which the error was detected.
Ascending calls are not permitted in the macro language. If a call is not complete when the end of a macro expansion is encountered, this message is issued and the call is aborted. A macro call beginning inside the body of a user-defined or built-in macro was incompletely contained inside that body, possibly because of a missing delimiter for the macro call.
The given name of the include file does not exist or cannot be opened. Processing continues in the current source file.
The maximum number of nested include files is 32. An INCLUDE call trying to nest the 33rd include file is just ignored. Processing continues in the current source file (i.e. 32nd nested include file).
The syntax of the INCLUDE call is incorrect, e.g., a newline is scanned between INCLUDE and the corresponding filename. The call is ignored and scanning continues from the point at which the error was detected.
No identifier is specified in the SET call. The macro function call is aborted and scanning continues from the point at which the error was detected.
The token returned to the parser was not valid in the current state of the parser, signaling a general syntax error. (Most of the other errors are naturally also a kind of syntax errors, but are recognized and recovered before the parser would generate this error).
The parser encountered an error from which it cannot recover, so the parsing is aborted. This error only occurs under very rare circumstances (most probably a parser stack overflow caused by very nested macro calls).
An identifier is missing in the MATCH call. The macro function call is aborted and scanning continues from the point at which the error was detected.
The macro preprocessor is called without specifying an input source file on the command line.
The macro preprocessor is called with more than two arguments.
The input file specified on the command line does not exist or cannot be opened.
The input file is of the form *.src or an output file was specified identical to the input file.
The errors 328 and 330 till 333 cause the macro preprocessor to exit immediately.
The specified option does not exist. See the usage for a list of valid options.
Check if you have enough free disk space and that you have write permissions.
Check if you have enough free disk space and that you have write permissions.
There is not enough memory to continue. Close some other running programs and try again or add more memory.
The -D option must always contain the '=' character.
The errors 328 and 330 till 337 cause the macro preprocessor
to exit immediately.
-D -D -D With the -D option of the asm51 assembler you can specify a specific .sfr file to be included. You don't need to include this file with the $INCLUDE statement.