The script parser interprets C-like ``preprocessor'' keywords. Unlike C, there is only a single pass through the text, so ``preprocessor'' is a misnomer.
The script preprocessor utilizes the generic macro preprocessor (see 18.1) used in various places within Xic. In the present context, the keywords start with the comment `#' character.
In addition to the predefined macros of the generic macro preprocessor, the following predefined macro is used in scripts.
Print("The name of this script is THIS_SCRIPT")
The following ``preprocessor'' keywords are understood in scripts. These pretty much follow the C/C++ standards and behave similarly, and correspond to the generalized keywords described for the macro preprocessor. These are:
|#define||Define a macro.|
|#if||Conditional evaluated test.|
|#ifdef||Conditional definition test.|
|#ifndef||Conditional non-definition test.|
|#else||Conditional else clause.|
|#endif||Conditional end clause.|
In addition, the following keyword, which has no counterpart in the generic macro preprocessor, is recognized in scripts:
Throughout the script, each line is macro expanded. The actual arguments replace the formal arguments (if any) in the substitution text, which replaces the macro reference. The macro is recognized as a text token, i.e., it must be surrounded by punctuation or white space.