B MACRO PREPROCESSOR ERROR MESSAGES

This appendix contains the following sections:

Format Error Messages
Error Messages

1 Format Error Messages

This appendix describes the error messages produced by the macro preprocessor mpp51. 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.

2 Error Messages

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.

ERROR 301: UNDEFINED MACRO NAME

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.

ERROR 302: ILLEGAL EXIT MACRO

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.

ERROR 304: ILLEGAL EXPRESSION

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.

ERROR 305: MISSING "FI" IN "IF"

The IF built-in function did not have a FI terminator. The macro is processed but may not be interpreted as you intended.

ERROR 306: MISSING "THEN" IN "FI"

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.

ERROR 307: ILLEGAL ATTEMPT TO REDEFINE MACRO

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.

ERROR 308: MISSING IDENTIFIER IN DEFINE PATTERN

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.

ERROR 309: MISSING BALANCED STRING

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.

ERROR 310: MISSING LIST ITEM

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.

ERROR 311: MISSING DELIMITER

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.

ERROR 312: PREMATURE EOF

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.

ERROR 313: DYNAMIC STORAGE (MACROS OR ARGUMENTS) OVERFLOW

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.

ERROR 314: MACRO STACK OVERFLOW

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.

ERROR 315: INPUT STACK OVERFLOW

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.

ERROR 317: PATTERN TOO LONG

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.

ERROR 318: ILLEGAL METACHARACTER: "char"

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.

ERROR 319: UNBALANCED ")" IN ARGUMENT TO USER DEFINED MACRO

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.

ERROR 320: ILLEGAL ASCENDING CALL

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.

ERROR 323: CANNOT OPEN INCLUDE FILE: "file"

The given name of the include file does not exist or cannot be opened. Processing continues in the current source file.

ERROR 324: INCLUDE FILE: "file" NESTED TOO DEEPLY

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).

ERROR 325: ILLEGAL INCLUDE CALL

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.

ERROR 326: MISSING IDENTIFIER IN SET PATTERN

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.

ERROR 327: SYNTAX ERROR

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).

ERROR 328: UNRECOVERABLE SYNTAX ERROR, PARSER TERMINATED

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).

ERROR 329: MISSING IDENTIFIER IN MATCH PATTERN

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.

ERROR 330: NO SOURCE FILE

The macro preprocessor is called without specifying an input source file on the command line.

ERROR 331: TOO MANY ARGUMENTS

The macro preprocessor is called with more than two arguments.

ERROR 332: CANNOT OPEN SOURCE FILE: "file"

The input file specified on the command line does not exist or cannot be opened.

ERROR 333: INPUT AND OUTPUT FILE ARE IDENTICAL

The input file is of the form *.src or an output file was specified identical to the input file.

ERROR 334: ILLEGAL OPTION: "name"

The specified option does not exist. See the usage for a list of valid options.

ERROR 335: CANNOT OPEN OUTPUT FILE: "file"

Check if you have enough free disk space and that you have write permissions.

ERROR 336: CANNOT OPEN TEMPORARY FILE: "file"

Check if you have enough free disk space and that you have write permissions.

ERROR 337: OUT OF MEMORY

There is not enough memory to continue. Close some other running programs and try again or add more memory.

ERROR 338: ILLEGAL DEFINE SYNTAX AT COMMAND LINE "-Darg"

The -D option must always contain the '=' character.

The errors 328 and 330 till 337 cause the macro preprocessor to exit immediately.

ERROR 339: REGISTER SFR INCLUDE FILE WILL BE INCLUDED BY THE ASSEMBLER, INCLUDE CAN BE REMOVED

-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.


Copyright © 2002 Altium BV