A.1.4. Restrictions on top-level LISA

Disabling #include and macro expansion ensures that tools that can read, modify and write LISA+ code, like System Canvas, can write the LISA+ code without making the textual changes of the preprocessor to the LISA+ code permanent in the LISA+ files.

After #includes and macros are expanded, there is no obvious way to undo the expansion and this restricts how the top-level LISA+ is preprocessed.

The final goal of all tools that can edit LISA+ code is to keep as much as possible of the LISA+ source code untouched. Applying a preprocessor to source code always removes all preprocessor statements and macro occurrences from this source code. Performing this action on the original source code is not desirable.

In practice these restrictions are easy to live with. Most preprocessor symbols are used in the C++ code in behaviors where they work as expected. There are special includes-sections to make constants and types defined in header files visible in all behavior code. It is easy to avoid redundancy in the code by using the LISA+ language features rather than preprocessor macros.

Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0372G
Non-Confidential