multi.i (1955B)
1 #ifndef __QUEX_INCLUDE_GUARD__MULTI_I 2 #define __QUEX_INCLUDE_GUARD__MULTI_I 3 /* PURPOSE: 4 * 5 * Solving the problem of multiple definitions of same functions when multiple 6 * analyzers are linked together. 7 * 8 * HOWTO: 9 * 10 * Compile all files of the lexical analyzer(s) with option 11 * 12 * -DQUEX_OPTION_MULTI 13 * 14 * must be defined. In one single file include 15 * 16 * #include <quex/code_base/multi.i> 17 * 18 * Option 'QUEX_OPTION_MULTI' avoids the inclusion of some critical files 19 * during the implementation of all files. Instead, the explicit inclusion of 20 * 'multi.i' in one file delivers the reqired implementations. A good candidate 21 * for '#includ'-ing is the interface module where the lexical analyzers are 22 * called. 23 * 24 * If the global quex namespace is chosen to be different from 'quex', the 25 * define option 26 * -DQUEX_NAMESPACE_QUEX=mySpace 27 * 28 * In the above example the user's quex namespace is 'mySpace'. 29 * 30 * EXPLANATION: 31 * 32 * This file includes implementations of functions which supposedly are exactly 33 * the same for any instance of a lexical analyzer. They do not depend on an 34 * analyzer's configuration--except for the definition of the global namespace 35 * of 'quex'. 36 * 37 * All of the functions below are located in the namespace quex. This may cause 38 * problems when multiple analyzers are linked together. The option 39 * QUEX_OPTION_MULTI prevents those common headers from being included in any 40 * file. Including this file, however, allows for one single file to get all 41 * implementations required. 42 * 43 * (C) Frank-Rene Schaefer */ 44 #if ! defined(QUEX_OPTION_MULTI) && ! defined(QUEX_OPTION_MULTI_ALLOW_IMPLEMENTATION) 45 # error "This file can only be included if option 'QUEX_OPTION_MULTI' has been set." 46 #endif 47 48 #include "bom.i" 49 #include "MemoryManager.i" 50 51 #endif /* __QUEX_INCLUDE_GUARD__MULTI_I__ */