identity (2255B)
1 /* vim: set filetype=cpp: -*- C++ -*- 2 * 3 * Declaration of converter functions which implement pure identity operations 4 * for 'char', and 'wchar_t': 5 * 6 * QUEX_NAME(identical_string)(...) for string and buffer 7 * QUEX_NAME(identical_wstring)(...) for string and buffer 8 * 9 * They exist mainly so that generalized code can be written in a homogenous 10 * manner with the other converter functions. See 'token/CDefault.qx' for example. 11 * 12 * These functions ARE DEPENDENT on QUEX_TYPE_LEXATOM. 13 * => Thus, they are placed in the analyzer's namespace. 14 * 15 * (C) 2012 Frank-Rene Schaefer. 16 * ABSOLUTELY NO WARRANTY */ 17 #if ! defined(__QUEX_INCLUDE_GUARD__CONVERTER_HELPER__IDENTITY) \ 18 || defined(__QUEX_INCLUDE_GUARD__CONVERTER_HELPER__TMP_DISABLED) 19 #if ! defined(__QUEX_INCLUDE_GUARD__CONVERTER_HELPER__TMP_DISABLED) 20 # define __QUEX_INCLUDE_GUARD__CONVERTER_HELPER__IDENTITY 21 #endif 22 23 #include "converterHelperCommon.h" 24 25 QUEX_NAMESPACE_MAIN_OPEN 26 27 QUEX_INLINE void 28 QUEX_CONVERTER_STRING_DEF(identical, char)(const QUEX_TYPE_LEXATOM** source_pp, 29 const QUEX_TYPE_LEXATOM* SourceEnd, 30 char** drain_pp, 31 const char* DrainEnd); 32 33 #if ! defined(__QUEX_OPTION_WCHAR_T_DISABLED) 34 QUEX_INLINE void 35 QUEX_CONVERTER_STRING_DEF(identical, wchar)(const QUEX_TYPE_LEXATOM** source_pp, 36 const QUEX_TYPE_LEXATOM* SourceEnd, 37 wchar_t** drain_pp, 38 const wchar_t* DrainEnd); 39 #endif 40 41 #if ! defined(__QUEX_OPTION_PLAIN_C) 42 QUEX_INLINE std::basic_string<char> 43 QUEX_CONVERTER_STRING_DEF(identical, char)(const std::basic_string<QUEX_TYPE_LEXATOM>& Source); 44 # if ! defined(__QUEX_OPTION_WCHAR_T_DISABLED) 45 QUEX_INLINE std::basic_string<wchar_t> 46 QUEX_CONVERTER_STRING_DEF(identical, wchar)(const std::basic_string<QUEX_TYPE_LEXATOM>& Source); 47 # endif 48 #endif 49 50 QUEX_NAMESPACE_MAIN_CLOSE 51 52 #endif /* __QUEX_INCLUDE_GUARD__CONVERTER_HELPER__IDENTITY */