next up previous contents index
Next: Predefined Macros Up: The Xic Scripting Language Previous: The Xic Scripting Language   Contents   Index


The Macro Preprocessor

As part of the scripting language support, a macro preprocessor package is provided, which is used by Xic when reading various types of input. This input includes scripts, library and menu (``.scm'') files, and the technology file. This section describes the common features of this macro processing system.

A macro is a text token that usually references another piece of text. When lines of text are ``macro expanded'', the tokens that are recognized as macro names are removed, and replaced by the text associated with the macro name. This is done recursively, as the replacement text may itself contain macro names.

In other cases, macros can be used to identify blocks of text to be discarded when a file is being read. The macro system applies conditional testing based on the existence of a defined macro name, or whether a macro name is set to a certain value, and marks blocks of text for inclusion or exclusion accordingly.

This section will describe the common functionality of the macro preprocessor, and will be referred to in the sections describing the format of the various types of input. Not all features are used in all cases, and the exact keyword names (but not the functionality) will vary for different input types. For example, the keyword which defines a macro is ``#define'' in scripts, but ``Define'' may be used in other types of file.



Subsections
next up previous contents index
Next: Predefined Macros Up: The Xic Scripting Language Previous: The Xic Scripting Language   Contents   Index
Stephen R. Whiteley 2022-05-28