From 1e77368e15e8c0592e030cec753159bf333d65a9 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 24 Mar 2021 23:30:06 +0100 Subject: Refactoring: move qcstring and remove qtools --- CMakeLists.txt | 1 - addon/doxyapp/CMakeLists.txt | 2 - addon/doxyapp/doxyapp.cpp | 5 +- addon/doxyparse/CMakeLists.txt | 2 - addon/doxyparse/doxyparse.cpp | 9 +- qtools/qcstring.cpp | 683 ---------- qtools/qcstring.h | 531 -------- src/CMakeLists.txt | 4 +- src/commentscan.l | 334 +++-- src/defargs.l | 1 - src/dir.cpp | 3 +- src/docparser.cpp | 17 +- src/index.cpp | 2 +- src/qcstring.cpp | 560 +++++++++ src/qcstring.h | 514 ++++++++ src/qhp.cpp | 22 +- src/rtfgen.cpp | 4 +- src/util.cpp | 14 + src/util.h | 1 + src/vhdlcode.l | 32 +- src/vhdldocgen.cpp | 31 +- src/vhdljjparser.cpp | 21 +- src/vhdljjparser.h | 2 +- vhdlparser/CMakeLists.txt | 8 +- vhdlparser/VhdlParser.cc | 44 +- vhdlparser/VhdlParser.h | 2696 ++++++++++++++++++++-------------------- vhdlparser/vhdlparser.jj | 50 +- 27 files changed, 2743 insertions(+), 2850 deletions(-) delete mode 100644 qtools/qcstring.cpp delete mode 100644 qtools/qcstring.h create mode 100644 src/qcstring.cpp create mode 100644 src/qcstring.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f4a904..251e18b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,7 +174,6 @@ add_subdirectory(liblodepng) add_subdirectory(libmscgen) add_subdirectory(libversion) add_subdirectory(libxml) -add_subdirectory(qtools) add_subdirectory(vhdlparser) add_subdirectory(src) diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt index 9213e22..a6fde42 100644 --- a/addon/doxyapp/CMakeLists.txt +++ b/addon/doxyapp/CMakeLists.txt @@ -4,7 +4,6 @@ include_directories( ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/libversion ${GENERATED_SRC} - ${PROJECT_SOURCE_DIR}/qtools ${ICONV_INCLUDE_DIR} ${CLANG_INCLUDEDIR} ) @@ -36,7 +35,6 @@ endif() target_link_libraries(doxyapp doxymain -qtools md5 xml lodepng diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp index 06c7af3..ec93ef7 100644 --- a/addon/doxyapp/doxyapp.cpp +++ b/addon/doxyapp/doxyapp.cpp @@ -26,8 +26,7 @@ */ #include -#include -#include +#include "dir.h" #include "doxygen.h" #include "outputgen.h" #include "parserintf.h" @@ -297,7 +296,7 @@ int main(int argc,char **argv) } // clean up after us - QDir().rmdir("/tmp/doxygen"); + Dir().rmdir("/tmp/doxygen"); while (1) { diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt index 7a422a1..f439c29 100644 --- a/addon/doxyparse/CMakeLists.txt +++ b/addon/doxyparse/CMakeLists.txt @@ -4,7 +4,6 @@ include_directories( ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/libversion ${GENERATED_SRC} - ${PROJECT_SOURCE_DIR}/qtools ${ICONV_INCLUDE_DIR} ${CLANG_INCLUDEDIR} ) @@ -24,7 +23,6 @@ endif() target_link_libraries(doxyparse doxymain -qtools md5 xml lodepng diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 4059861..3090783 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -40,8 +40,7 @@ #include #include #include -#include -#include +#include "qcstring.h" #include "namespacedef.h" #include "portable.h" @@ -521,12 +520,12 @@ int main(int argc,char **argv) { } } - QDir thisDir; + Dir thisDir; // remove temporary files - if (!Doxygen::filterDBFileName.isEmpty()) thisDir.remove(Doxygen::filterDBFileName); + if (!Doxygen::filterDBFileName.isEmpty()) thisDir.remove(Doxygen::filterDBFileName.str()); // clean up after us - thisDir.rmdir(Config_getString(OUTPUT_DIRECTORY)); + thisDir.rmdir(Config_getString(OUTPUT_DIRECTORY).str()); startYamlDocument(); listSymbols(); diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp deleted file mode 100644 index 4f30a42..0000000 --- a/qtools/qcstring.cpp +++ /dev/null @@ -1,683 +0,0 @@ -/****************************************************************************** - * - * Copyright (C) 1997-2015 by Dimitri van Heesch. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software - * for any purpose. It is provided "as is" without express or implied warranty. - * See the GNU General Public License for more details. - * - * Documents produced by Doxygen are derivative works derived from the - * input used in their production; they are not affected by this license. - * - */ - -#include "qcstring.h" - -#include -#include -#include -#include -#include -#include -//#include -#include - -QCString &QCString::sprintf( const char *format, ... ) -{ - va_list ap; - va_start( ap, format ); - const int minlen=256; - int l = length(); - if (l=(int)length()) return -1; // index outside string - const char *pos; - if (cs) - { - pos = strchr(data()+index,c); - } - else - { - pos = data()+index; - c = tolower((unsigned char)c); - while (*pos && tolower((unsigned char)*pos)!=c) pos++; - if (!*pos && c) pos=0; // not found - } - return pos ? (int)(pos - data()) : -1; -} - -int QCString::find( const char *str, int index, bool cs ) const -{ - int l = length(); - if (index<0 || index>=l) return -1; // index outside string - if (!str) return -1; // no string to search for - if (!*str) return index; // empty string matching at index - const char *pos; - if (cs) // case sensitive - { - pos = strstr(data()+index,str); - } - else // case insensitive - { - pos = data(); - int len = qstrlen(str); - while (*pos) - { - if (qstrnicmp(pos,str,len)==0) break; - pos++; - } - if (!*pos) pos = 0; // not found - } - return pos ? (int)(pos - data()) : -1; -} - -int QCString::find( const QCString &str, int index, bool cs ) const -{ - return find(str.data(),index,cs); -} - -#if 0 -int QCString::find( const QRegExp &rx, int index ) const -{ - if ( index < 0 ) - index += length(); - return rx.match( data(), index ); -} -#endif - -int QCString::findRev( char c, int index, bool cs) const -{ - const char *b = data(); - const char *pos; - int len = length(); - if (len==0) return -1; // empty string - if (index<0) // start from end - { - if (cs) - { - pos = strrchr(b,c); - return pos ? (int)(pos - b) : -1; - } - index=len; - } - else if (index>len) // bad index - { - return -1; - } - pos = b+index; - if (cs) - { - while ( pos>=b && *pos!=c) pos--; - } - else - { - c = tolower((unsigned char)c); - while ( pos>=b && tolower((unsigned char)*pos)!=c) pos--; - } - return pos>=b ? (int)(pos - b) : -1; -} - -int QCString::findRev( const char *str, int index, bool cs) const -{ - int slen = qstrlen(str); - int len = length(); - if (index<0) index = len-slen; // start from end - else if (index>len) return -1; // bad index - else if (index+slen>len) index=len-slen; // str would be too long - if (index<0) return -1; // no match possible - const char *pos = data()+index; - if (cs) // case sensitive - { - for (int i=index; i>=0; i--) if (qstrncmp(pos--,str,slen)==0) return i; - } - else // case insensitive - { - for (int i=index; i>=0; i--) if (qstrnicmp(pos,str,slen)==0) return i; - } - return -1; -} - -#if 0 -int QCString::findRev( const QRegExp &rx, int index ) const -{ - if ( index < 0 ) // neg index ==> start from end - index += length(); - if ( (uint)index > length() ) // bad index - return -1; - while( index >= 0 ) { - if ( rx.match( data(), index ) == index ) - return index; - index--; - } - return -1; -} -#endif - -int QCString::contains( char c, bool cs ) const -{ - if (length()==0) return 0; - int count=0; - const char *pos = data(); - if (cs) - { - while (*pos) if (*pos++ == c) count++; - } - else - { - c = tolower((unsigned char)c); - while (*pos) - { - if (tolower((unsigned char)*pos)==c) count++; - pos++; - } - } - return count; -} - -int QCString::contains( const char *str, bool cs ) const -{ - if (str==0 || length()==0) return 0; - int count=0; - const char *pos = data(); - int len = qstrlen(str); - while (*pos) - { - if (cs) - { - if (qstrncmp(pos,str,len)==0) count++; - } - else - { - if (qstrnicmp(pos,str,len)==0) count++; - } - pos++; - } - return count; -} - -#if 0 -int QCString::contains( const QRegExp &rx ) const -{ - if ( isEmpty() ) - return rx.match( data() ) < 0 ? 0 : 1; - int count = 0; - int index = -1; - int len = length(); - while ( index < len-1 ) { // count overlapping matches - index = rx.match( data(), index+1 ); - if ( index < 0 ) - break; - count++; - } - return count; -} -#endif - - -QCString QCString::simplifyWhiteSpace() const -{ - if ( isEmpty() ) // nothing to do - return *this; - - QCString result( length()+1 ); - const char *from = data(); - char *to = result.rawData(); - char *first = to; - while ( TRUE ) - { - while ( *from && isspace((uchar) *from) ) - from++; - while ( *from && !isspace((uchar)*from) ) - *to++ = *from++; - if ( *from ) - *to++ = 0x20; // ' ' - else - break; - } - if ( to > first && *(to-1) == 0x20 ) - to--; - *to = '\0'; - result.resize( (int)(to - result.data()) + 1 ); - return result; -} - -QCString &QCString::replace( uint index, uint len, const char *s) -{ - remove( index, len ); - insert( index, s ); - return *this; -} - -#if 0 -QCString &QCString::replace( const QRegExp &rx, const char *str ) -{ - if ( isEmpty() ) - return *this; - int index = 0; - int slen = qstrlen(str); - int len; - while ( index < (int)length() ) { - index = rx.match( data(), index, &len, FALSE ); - if ( index >= 0 ) { - replace( index, len, str ); - index += slen; - if ( !len ) - break; // Avoid infinite loop on 0-length matches, e.g. [a-z]* - } - else - break; - } - return *this; -} -#endif - -static bool ok_in_base( char c, int base ) -{ - if ( base <= 10 ) - return c>='0' && c<='9' && (c-'0') < base; - else - return (c>='0' && c<='9') || - (c >= 'a' && c < char('a'+base-10)) || - (c >= 'A' && c < char('A'+base-10)); -} - -short QCString::toShort(bool *ok, int base) const -{ - long v = toLong( ok, base ); - if ( ok && *ok && (v < -32768 || v > 32767) ) { - *ok = FALSE; - v = 0; - } - return (short)v; -} - -ushort QCString::toUShort(bool *ok,int base) const -{ - ulong v = toULong( ok, base ); - if ( ok && *ok && (v > 65535) ) { - *ok = FALSE; - v = 0; - } - return (ushort)v; -} - -int QCString::toInt(bool *ok, int base) const -{ - return (int)toLong( ok, base ); -} - -uint QCString::toUInt(bool *ok,int base) const -{ - return (uint)toULong( ok, base ); -} - - -long QCString::toLong(bool *ok,int base) const -{ - const char *p = data(); - long val=0; - int l = length(); - const long max_mult = INT_MAX / base; - bool is_ok = FALSE; - int neg = 0; - if ( !p ) - goto bye; - while ( l && isspace(*p) ) // skip leading space - l--,p++; - if ( l && *p == '-' ) { - l--; - p++; - neg = 1; - } else if ( *p == '+' ) { - l--; - p++; - } - - // NOTE: toULong() code is similar - if ( !l || !ok_in_base(*p,base) ) - goto bye; - while ( l && ok_in_base(*p,base) ) { - l--; - int dv; - if ( *p>='0' && *p<='9' ) { - dv = *p-'0'; - } else { - if ( *p >= 'a' && *p <= 'z' ) - dv = *p - 'a' + 10; - else - dv = *p - 'A' + 10; - } - if ( val > max_mult || (val == max_mult && dv > (INT_MAX%base)+neg) ) - goto bye; - val = base*val + dv; - p++; - } - if ( neg ) - val = -val; - while ( l && isspace(*p) ) // skip trailing space - l--,p++; - if ( !l ) - is_ok = TRUE; -bye: - if ( ok ) - *ok = is_ok; - return is_ok ? val : 0; -} - -ulong QCString::toULong(bool *ok,int base) const -{ - const char *p = data(); - ulong val=0; - int l = length(); - const ulong max_mult = 429496729; // UINT_MAX/10, rounded down - bool is_ok = FALSE; - if ( !p ) - goto bye; - while ( l && isspace(*p) ) // skip leading space - l--,p++; - if ( *p == '+' ) - l--,p++; - - // NOTE: toLong() code is similar - if ( !l || !ok_in_base(*p,base) ) - goto bye; - while ( l && ok_in_base(*p,base) ) { - l--; - uint dv; - if ( *p>='0' && *p<='9' ) { - dv = *p-'0'; - } else { - if ( *p >= 'a' && *p <= 'z' ) - dv = *p - 'a' + 10; - else - dv = *p - 'A' + 10; - } - if ( val > max_mult || (val == max_mult && dv > (UINT_MAX%base)) ) - goto bye; - val = base*val + dv; - p++; - } - - while ( l && isspace(*p) ) // skip trailing space - l--,p++; - if ( !l ) - is_ok = TRUE; -bye: - if ( ok ) - *ok = is_ok; - return is_ok ? val : 0; -} - -uint64 QCString::toUInt64(bool *ok,int base) const -{ - const char *p = data(); - uint64 val=0; - int l = length(); - const uint64 max_mult = 1844674407370955161ULL; // ULLONG_MAX/10, rounded down - bool is_ok = FALSE; - if ( !p ) - goto bye; - while ( l && isspace(*p) ) // skip leading space - l--,p++; - if ( *p == '+' ) - l--,p++; - - // NOTE: toULong() code is similar - if ( !l || !ok_in_base(*p,base) ) - goto bye; - while ( l && ok_in_base(*p,base) ) { - l--; - uint dv; - if ( *p>='0' && *p<='9' ) { - dv = *p-'0'; - } else { - if ( *p >= 'a' && *p <= 'z' ) - dv = *p - 'a' + 10; - else - dv = *p - 'A' + 10; - } - if ( val > max_mult || (val == max_mult && dv > (ULLONG_MAX%base)) ) - goto bye; - val = base*val + dv; - p++; - } - - while ( l && isspace(*p) ) // skip trailing space - l--,p++; - if ( !l ) - is_ok = TRUE; -bye: - if ( ok ) - *ok = is_ok; - return is_ok ? val : 0; -} - -//------------------------------------------------- - -void *qmemmove( void *dst, const void *src, uint len ) -{ - char *d; - char *s; - if ( dst > src ) { - d = (char *)dst + len - 1; - s = (char *)src + len - 1; - while ( len-- ) - *d-- = *s--; - } else if ( dst < src ) { - d = (char *)dst; - s = (char *)src; - while ( len-- ) - *d++ = *s++; - } - return dst; -} - -char *qstrdup( const char *str ) -{ - if ( !str ) - return 0; - char *dst = new char[qstrlen(str)+1]; - CHECK_PTR( dst ); - return strcpy( dst, str ); -} - -char *qstrncpy( char *dst, const char *src, uint len ) -{ - if ( !src ) - return 0; - strncpy( dst, src, len ); - if ( len > 0 ) - dst[len-1] = '\0'; - return dst; -} - -int qstricmp( const char *str1, const char *str2 ) -{ - const uchar *s1 = (const uchar *)str1; - const uchar *s2 = (const uchar *)str2; - int res; - uchar c; - if ( !s1 || !s2 ) - return s1 == s2 ? 0 : (int)(s2 - s1); - for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ ) - if ( !c ) // strings are equal - break; - return res; -} - -int qstrnicmp( const char *str1, const char *str2, uint len ) -{ - const uchar *s1 = (const uchar *)str1; - const uchar *s2 = (const uchar *)str2; - int res; - uchar c; - if ( !s1 || !s2 ) - return (int)(s2 - s1); - for ( ; len--; s1++, s2++ ) { - if ( (res = (c=tolower(*s1)) - tolower(*s2)) ) - return res; - if ( !c ) // strings are equal - break; - } - return 0; -} - -#ifndef QT_NO_DATASTREAM - -QDataStream &operator<<( QDataStream &s, const QByteArray &a ) -{ - return s.writeBytes( a.data(), a.size() ); -} - -QDataStream &operator>>( QDataStream &s, QByteArray &a ) -{ - Q_UINT32 len; - s >> len; // read size of array - if ( len == 0 || s.eof() ) { // end of file reached - a.resize( 0 ); - return s; - } - if ( !a.resize( (uint)len ) ) { // resize array -#if defined(CHECK_NULL) - qWarning( "QDataStream: Not enough memory to read QByteArray" ); -#endif - len = 0; - } - if ( len > 0 ) // not null array - s.readRawBytes( a.data(), (uint)len ); - return s; -} - -QDataStream &operator<<( QDataStream &s, const QCString &str ) -{ - return s.writeBytes( str.data(), str.size() ); -} - -QDataStream &operator>>( QDataStream &s, QCString &str ) -{ - Q_UINT32 len; - s >> len; // read size of string - if ( len == 0 || s.eof() ) { // end of file reached - str.resize( 0 ); - return s; - } - if ( !str.resize( (uint)len )) {// resize string -#if defined(CHECK_NULL) - qWarning( "QDataStream: Not enough memory to read QCString" ); -#endif - len = 0; - } - if ( len > 0 ) // not null array - s.readRawBytes( str.rawData(), (uint)len ); - return s; -} - -#endif //QT_NO_DATASTREAM - -/// substitute all occurrences of \a src in \a s by \a dst -QCString substitute(const QCString &s,const QCString &src,const QCString &dst) -{ - if (s.isEmpty() || src.isEmpty()) return s; - const char *p, *q; - int srcLen = src.length(); - int dstLen = dst.length(); - int resLen; - if (srcLen!=dstLen) - { - int count; - for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++; - resLen = s.length()+count*(dstLen-srcLen); - } - else // result has same size as s - { - resLen = s.length(); - } - QCString result(resLen+1); - char *r; - for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) - { - int l = (int)(q-p); - memcpy(r,p,l); - r+=l; - - if (dst) memcpy(r,dst,dstLen); - r+=dstLen; - } - if (r) - { - qstrcpy(r,p); - } - //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); - return result; -} - - -/// substitute all occurrences of \a src in \a s by \a dst, but skip -/// each consecutive sequence of \a src where the number consecutive -/// \a src matches \a skip_seq; if \a skip_seq is negative, skip any -/// number of consecutive \a src -QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq) -{ - if (s.isEmpty() || src.isEmpty()) return s; - const char *p, *q; - int srcLen = src.length(); - int dstLen = dst.length(); - int resLen; - if (srcLen!=dstLen) - { - int count; - for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++; - resLen = s.length()+count*(dstLen-srcLen); - } - else // result has same size as s - { - resLen = s.length(); - } - QCString result(resLen+1); - char *r; - for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) - { - // search a consecutive sequence of src - int seq = 0, skip = 0; - if (skip_seq) - { - for (const char *n=q+srcLen; qstrncmp(n,src,srcLen)==0; seq=1+skip, n+=srcLen) - ++skip; // number of consecutive src after the current one - - // verify the allowed number of consecutive src to skip - if (skip_seq > 0 && skip_seq != seq) - seq = skip = 0; - } - - // skip a consecutive sequence of src when necessary - int l = (int)((q + seq * srcLen)-p); - memcpy(r,p,l); - r+=l; - - if (skip) - { - // skip only the consecutive src found after the current one - q += skip * srcLen; - // the next loop will skip the current src, aka (p=q+srcLen) - continue; - } - - if (dst) memcpy(r,dst,dstLen); - r+=dstLen; - } - qstrcpy(r,p); - result.resize((int)strlen(result.data())+1); - //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); - return result; -} - diff --git a/qtools/qcstring.h b/qtools/qcstring.h deleted file mode 100644 index 2efdc2d..0000000 --- a/qtools/qcstring.h +++ /dev/null @@ -1,531 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1997-2015 by Dimitri van Heesch. -** -** Permission to use, copy, modify, and distribute this software and its -** documentation under the terms of the GNU General Public License is hereby -** granted. No representations are made about the suitability of this software -** for any purpose. It is provided "as is" without express or implied warranty. -** See the GNU General Public License for more details. -** -** Note: this is a reimplementation of the qcstring.h that came with -** an Qt version 2.2.3. For short strings it stores the string data inside -** the object. For long strings it uses a separate array with reference counting. -** -**********************************************************************/ - -#ifndef QCSTRING_H -#define QCSTRING_H - -#ifndef QT_H -#include "qarray.h" -#endif // QT_H - -#include -#include - -#include -#include -#include -#include -#include -#include - -/***************************************************************************** - Safe and portable C string functions; extensions to standard string.h - *****************************************************************************/ - -void *qmemmove( void *dst, const void *src, uint len ); - -#if defined(_OS_WIN32_) -#define qsnprintf _snprintf -#else -#define qsnprintf snprintf -#endif - -char *qstrdup( const char * ); - -inline uint cstrlen( const char *str ) -{ return (uint)strlen(str); } - -inline uint qstrlen( const char *str ) -{ return str ? (uint)strlen(str) : 0; } - -inline char *cstrcpy( char *dst, const char *src ) -{ return strcpy(dst,src); } - -inline char *qstrcpy( char *dst, const char *src ) -{ return src ? strcpy(dst, src) : 0; } - -char * qstrncpy(char *dst,const char *src, uint len); - -inline int cstrcmp( const char *str1, const char *str2 ) -{ return strcmp(str1,str2); } - -inline int qstrcmp( const char *str1, const char *str2 ) -{ return (str1 && str2) ? strcmp(str1,str2) : (int)((intptr_t)str2 - (intptr_t)str1); } - -inline int cstrncmp( const char *str1, const char *str2, uint len ) -{ return strncmp(str1,str2,len); } - -inline int qstrncmp( const char *str1, const char *str2, uint len ) -{ return (str1 && str2) ? strncmp(str1,str2,len) : - (int)((intptr_t)str2 - (intptr_t)str1); } - -int qstricmp( const char *str1, const char *str2 ); - -int qstrnicmp( const char *str1, const char *str2, uint len ); - -/***************************************************************************** - QByteArray class - *****************************************************************************/ - -#if defined(Q_TEMPLATEDLL) -template class QArray; -#endif -typedef QArray QByteArray; - -/***************************************************************************** - QByteArray stream functions - *****************************************************************************/ -#ifndef QT_NO_DATASTREAM -QDataStream &operator<<( QDataStream &, const QByteArray & ); -QDataStream &operator>>( QDataStream &, QByteArray & ); -#endif - -//class QRegExp; - -/** This is an alternative implementation of QCString. It provides basically - * the same functions but uses std::string as the underlying string type - */ -class QCString -{ - public: - QCString() = default; - ~QCString() = default; - QCString( const QCString &s ) = default; - QCString &operator=( const QCString &s ) = default; - QCString( QCString &&s ) = default; - QCString &operator=( QCString &&s ) = default; - - QCString( const std::string &s ) : m_rep(s) {} - - /** creates a string with room for size characters - * @param[in] size the number of character to allocate (also counting the 0-terminator!) - */ - explicit QCString( uint size ) { m_rep.resize(size>0 ? size-1 : 0); } - - /** creates a string from a plain C string. - * @param[in] str A zero terminated C string. When 0 an empty string is created. - */ - QCString( const char *str ) : m_rep(str?str:"") {} - - /** creates a string from \a str and copies over the first \a maxlen characters. */ - QCString( const char *str, uint maxlen ) : m_rep(str?str:"") { m_rep.resize(maxlen); } - - /** replaces the contents by that of string \a s. */ - - /** replaces the contents by that of C string \a str. */ - QCString &operator=( const char *str) { m_rep = str?str:""; return *this; } - - /** Returns TRUE iff the string is empty. Equivalent to isEmpty(). */ - bool isNull() const { return m_rep.empty(); } - - /** Returns TRUE iff the string is empty */ - bool isEmpty() const { return m_rep.empty(); } - - /** Returns the length of the string, not counting the 0-terminator. Equivalent to size(). */ - uint length() const { return (uint)m_rep.size(); } - - /** Returns the length of the string, not counting the 0-terminator. */ - uint size() const { return (uint)m_rep.size(); } - - /** Returns a pointer to the contents of the string in the form of a 0-terminated C string */ - const char *data() const { return m_rep.empty() ? 0 : m_rep.c_str(); } - - /** Returns a writable pointer to the data. - * @warning if the string is shared it will modifying the string directly and - * this will overwrite all copies as well! - */ - char *rawData() const { return m_rep.empty() ? 0 : const_cast(&m_rep[0]); } - - /** Resizes the string to hold \a newlen characters - * (this value should also count the 0-terminator). - * If the string is enlarged the contents will - * be left unmodified. - */ - bool resize( uint newlen ) { m_rep.resize( newlen>0 ? newlen-1 : 0 ); return TRUE; } - - /** Truncates the string at position \a pos. */ - bool truncate( uint pos ) { return resize( pos + 1 ); } - - /** Fills a string with a predefined character - * @param[in] c the character used to fill the string with. - * @param[in] len the number of character to fill. Use -1 to fill the whole string. - * @note the string will be resized to contain \a len characters. The contents of the - * string will be lost. - */ - bool fill( char c, int len = -1 ) - { - int l = len==-1 ? (int)m_rep.size() : len; - m_rep = std::string(l,c); - return TRUE; - } - - /** Returns a deep copy of the string. */ - QCString copy() const { return *this; } - - QCString &sprintf( const char *format, ... ); - - int find( char c, int index=0, bool cs=TRUE ) const; - int find( const char *str, int index=0, bool cs=TRUE ) const; - int find( const QCString &str, int index=0, bool cs=TRUE ) const; - //int find( const QRegExp &rx, int index=0 ) const; - - int findRev( char c, int index=-1, bool cs=TRUE) const; - int findRev( const char *str, int index=-1, bool cs=TRUE) const; - //int findRev( const QRegExp &rx, int index=-1 ) const; - - int contains( char c, bool cs=TRUE ) const; - int contains( const char *str, bool cs=TRUE ) const; - //int contains( const QRegExp &rx ) const; - - bool stripPrefix(const char *prefix) - { - if (prefix==0 || m_rep.empty()) return FALSE; - if (m_rep.rfind(prefix,0)==0) // string starts with prefix - { - m_rep.erase(0,qstrlen(prefix)); - return TRUE; - } - return FALSE; - } - - QCString left( uint len ) const - { - return m_rep.empty() ? QCString() : QCString(m_rep.substr(0,len)); - } - - QCString right( uint len ) const - { - return m_rep.empty() ? QCString() : - lenslen || len==0 ? QCString() : - QCString(m_rep.substr(index,len)); - } - - QCString lower() const - { - std::string s = m_rep; - std::transform(s.begin(),s.end(),s.begin(), - [](unsigned char c){ return (unsigned char)std::tolower(c); }); - return s; - } - - QCString upper() const - { - std::string s = m_rep; - std::transform(s.begin(),s.end(),s.begin(), - [](unsigned char c){ return (unsigned char)std::toupper(c); }); - return s; - } - - QCString stripWhiteSpace() const - { - int sl = (uint)m_rep.size(); - if (sl==0 || (!std::isspace(m_rep[0]) && !std::isspace(m_rep[sl-1]))) return *this; - int start=0,end=sl-1; - while (startstart && std::isspace(m_rep[end])) end--; - return QCString(m_rep.substr(start,1+end-start)); - } - - QCString simplifyWhiteSpace() const; - - QCString &insert( uint index, const char *s ) - { - uint len = s ? qstrlen(s) : 0; - if (len>0) - { - uint ol = (uint)m_rep.size(); - if (index>ol) // insert beyond end of string and fill gap with spaces - { - m_rep.resize(index+len); - std::memset(&m_rep[ol],' ',index-ol); - std::memcpy(&m_rep[index],s,len+1); - } - else // insert inside the string - { - m_rep.insert(index,s); - } - } - return *this; - } - - QCString &insert( uint index, char c) - { - char s[2] = { c, '\0' }; - return insert(index,s); - } - - QCString &append( const char *s ) - { - return operator+=(s); - } - - QCString &prepend( const char *s ) - { - return insert(0,s); - } - - QCString &remove( uint index, uint len ) - { - uint ol = (uint)m_rep.size(); - if (index
    0) m_rep.erase(index,index+len>=ol ? std::string::npos : len); - return *this; - } - - QCString &replace( uint index, uint len, const char *s); - //QCString &replace( const QRegExp &rx, const char *str ); - - short toShort( bool *ok=0, int base=10 ) const; - ushort toUShort( bool *ok=0, int base=10 ) const; - int toInt( bool *ok=0, int base=10 ) const; - uint toUInt( bool *ok=0, int base=10 ) const; - long toLong( bool *ok=0, int base=10 ) const; - ulong toULong( bool *ok=0, int base=10 ) const; - uint64 toUInt64( bool *ok=0, int base=10 ) const; - - QCString &setNum(short n) - { - m_rep = std::to_string(n); - return *this; - } - - QCString &setNum(ushort n) - { - m_rep = std::to_string(n); - return *this; - } - - QCString &setNum(int n) - { - m_rep = std::to_string(n); - return *this; - } - - QCString &setNum(uint n) - { - m_rep = std::to_string(n); - return *this; - } - - QCString &setNum(long n) - { - m_rep = std::to_string(n); - return *this; - } - - QCString &setNum(ulong n) - { - m_rep = std::to_string(n); - return *this; - } - - bool startsWith( const char *s ) const - { - if (m_rep.empty() || s==0) return s==0; - return m_rep.rfind(s,0)==0; // looking "backward" starting and ending at index 0 - } - - /** Converts the string to a plain C string */ - operator const char *() const - { - return data(); - } - - std::string str() const - { - return m_rep; - } - - QCString &operator+=( const QCString &s) - { - m_rep+=s.str(); - return *this; - } - - QCString &operator+=( const std::string &s) - { - m_rep+=s; - return *this; - } - - /** Appends string \a str to this string and returns a reference to the result. */ - QCString &operator+=( const char *s ) - { - if (s) m_rep+=s; - return *this; - } - - /** Appends character \a c to this string and returns a reference to the result. */ - QCString &operator+=( char c ) - { - m_rep+=c; - return *this; - } - - /** Returns a reference to the character at index \a i. */ - char &at( uint i) const - { - return const_cast(m_rep[i]); - } - - /** Indexing operator. Equivalent to at(). */ - char &operator[]( int i ) const - { - return const_cast(m_rep[i]); - } - - private: - std::string m_rep; -}; - -/***************************************************************************** - QCString stream functions - *****************************************************************************/ -#ifndef QT_NO_DATASTREAM -QDataStream &operator<<( QDataStream &, const QCString & ); -QDataStream &operator>>( QDataStream &, QCString & ); -#endif - -/***************************************************************************** - QCString non-member operators - *****************************************************************************/ - -inline bool operator==( const QCString &s1, const QCString &s2 ) -{ return qstrcmp(s1.data(),s2.data()) == 0; } - -inline bool operator==( const QCString &s1, const char *s2 ) -{ return qstrcmp(s1.data(),s2) == 0; } - -inline bool operator==( const char *s1, const QCString &s2 ) -{ return qstrcmp(s1,s2.data()) == 0; } - -inline bool operator!=( const QCString &s1, const QCString &s2 ) -{ return qstrcmp(s1.data(),s2.data()) != 0; } - -inline bool operator!=( const QCString &s1, const char *s2 ) -{ return qstrcmp(s1.data(),s2) != 0; } - -inline bool operator!=( const char *s1, const QCString &s2 ) -{ return qstrcmp(s1,s2.data()) != 0; } - -inline bool operator<( const QCString &s1, const QCString& s2 ) -{ return qstrcmp(s1.data(),s2.data()) < 0; } - -inline bool operator<( const QCString &s1, const char *s2 ) -{ return qstrcmp(s1.data(),s2) < 0; } - -inline bool operator<( const char *s1, const QCString &s2 ) -{ return qstrcmp(s1,s2.data()) < 0; } - -inline bool operator<=( const QCString &s1, const char *s2 ) -{ return qstrcmp(s1.data(),s2) <= 0; } - -inline bool operator<=( const char *s1, const QCString &s2 ) -{ return qstrcmp(s1,s2.data()) <= 0; } - -inline bool operator>( const QCString &s1, const char *s2 ) -{ return qstrcmp(s1.data(),s2) > 0; } - -inline bool operator>( const char *s1, const QCString &s2 ) -{ return qstrcmp(s1,s2.data()) > 0; } - -inline bool operator>=( const QCString &s1, const char *s2 ) -{ return qstrcmp(s1.data(),s2) >= 0; } - -inline bool operator>=( const char *s1, const QCString &s2 ) -{ return qstrcmp(s1,s2.data()) >= 0; } - -inline QCString operator+( const QCString &s1, const QCString &s2 ) -{ - return QCString(s1.str()+s2.str()); -} - - -inline QCString operator+( const QCString &s1, const char *s2 ) -{ - QCString tmp(s1); - tmp += s2; - return tmp; -} - -inline QCString operator+( const char *s1, const QCString &s2 ) -{ - QCString tmp(s1); - tmp += s2; - return tmp; -} - -inline QCString operator+( const QCString &s1, char c2 ) -{ - QCString tmp( s1.data() ); - tmp += c2; - return tmp; -} - -inline QCString operator+( char c1, const QCString &s2 ) -{ - QCString tmp; - tmp += c1; - tmp += s2; - return tmp; -} - -inline const char *qPrint(const char *s) -{ - if (s) return s; else return ""; -} - -inline const char *qPrint(const QCString &s) -{ - if (!s.isEmpty()) return s.data(); else return ""; -} - -inline const char *qPrint(const std::string &s) -{ - return s.c_str(); -} - -inline std::string toStdString(const QCString &s) -{ - return s.str(); -} - -// helper functions -QCString substitute(const QCString &str,const QCString &find,const QCString &replace); -QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq); - -inline QCString substitute(const QCString &s,char srcChar,char dstChar) -{ - std::string ss = s.str(); - std::replace(ss.begin(),ss.end(),srcChar,dstChar); - return ss; -} - -inline std::ostream& operator<<(std::ostream& os, const QCString& s) -{ - os << s.str(); - return os; -} - -#endif // QCSTRING_H diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22ced1e..868cd04 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,6 @@ # vim:ts=4:sw=4:expandtab:autoindent: include_directories( - ${PROJECT_SOURCE_DIR}/qtools ${PROJECT_SOURCE_DIR}/filesystem ${PROJECT_SOURCE_DIR}/libmd5 ${PROJECT_SOURCE_DIR}/liblodepng @@ -286,6 +285,7 @@ add_library(doxymain STATIC pagedef.cpp perlmodgen.cpp plantuml.cpp + qcstring.cpp qhp.cpp qhpxmlwriter.cpp reflist.cpp @@ -352,7 +352,6 @@ endif() target_link_libraries(doxygen PRIVATE doxymain doxycfg - qtools md5 lodepng mscgen @@ -372,7 +371,6 @@ set_project_warnings(doxycfg) set_project_warnings(doxymain) set_project_warnings(doxygen) -set_project_coverage(qtools) set_project_coverage(doxycfg) set_project_coverage(doxymain) set_project_coverage(doxygen) diff --git a/src/commentscan.l b/src/commentscan.l index 89b8052..8fa2199 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -38,7 +38,6 @@ #include #include -#include #include "cite.h" #include "commentscan.h" @@ -60,89 +59,89 @@ #define USE_STATE2STRING 0 // forward declarations -static bool handleBrief(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleClass(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleProtocol(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCategory(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleUnion(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleStruct(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleInterface(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleIdlException(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleExample(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleNoop(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringList &); -static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleSection(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleAnchor(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCite(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleFormatBlock(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleProtected(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handlePublic(yyscan_t yyscanner,const QCString &s, const QCStringList &); -static bool handlePublicSection(yyscan_t yyscanner,const QCString &s, const QCStringList &); -static bool handleToc(yyscan_t yyscanner,const QCString &s, const QCStringList &); -static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleExtends(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList &); +static bool handleBrief(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleFn(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleDef(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleOverload(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleEnum(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleNamespace(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handlePackage(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleClass(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleProtocol(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCategory(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleUnion(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleStruct(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleInterface(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleIdlException(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handlePage(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleMainpage(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleFile(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleDir(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleExample(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleDetails(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleNoop(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleName(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleTodo(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleTest(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleBug(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const StringVector &); +static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleRelated(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleRefItem(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleSection(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleAnchor(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCite(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleFormatBlock(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleIf(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleIfNot(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleElseIf(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleElse(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleEndIf(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleIngroup(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleInternal(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleStatic(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handlePure(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handlePrivate(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleProtected(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handlePublic(yyscan_t yyscanner,const QCString &s, const StringVector &); +static bool handlePublicSection(yyscan_t yyscanner,const QCString &s, const StringVector &); +static bool handleToc(yyscan_t yyscanner,const QCString &s, const StringVector &); +static bool handleInherit(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleExtends(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleParBlock(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleParam(yyscan_t yyscanner,const QCString &, const StringVector &); +static bool handleRetval(yyscan_t yyscanner,const QCString &, const StringVector &); #if USE_STATE2STRING static const char *stateToString(int state); #endif -typedef bool (*DocCmdFunc)(yyscan_t yyscanner,const QCString &name, const QCStringList &optList); +typedef bool (*DocCmdFunc)(yyscan_t yyscanner,const QCString &name, const StringVector &optList); enum class CommandSpacing { @@ -668,7 +667,7 @@ STopt [^\n@\\]* if ((idx > 1) && (yytext[idx-1] == 'f') && (yytext[idx-2] == '\\' || yytext[idx-2] =='@')) REJECT; int idxEnd = fullMatch.find("}",idx+1); QCString cmdName; - QCStringList optList; + StringVector optList; if (idx == -1) // no options { cmdName = QCString(yytext).stripWhiteSpace().data()+1; // to remove {CMD} @@ -677,7 +676,7 @@ STopt [^\n@\\]* { cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD} QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); - optList = QCStringList::split(',',optStr); + optList = split(optStr.str(),","); } auto it = docCmdMap.find(cmdName.data()); //printf("lookup command '%s' found=%d\n",cmdName.data(),it!=docCmdMap.end()); @@ -1902,14 +1901,14 @@ STopt [^\n@\\]* //---------------------------------------------------------------------------- -static bool handleBrief(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleBrief(yyscan_t yyscanner,const QCString &, const StringVector &) { //printf("handleBrief\n"); setOutput(yyscanner,OutputBrief); return FALSE; } -static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleFn(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::MEMBERDOC_SEC); @@ -1919,7 +1918,7 @@ static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &) return stop; } -static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleDef(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::DEFINEDOC_SEC); @@ -1928,7 +1927,7 @@ static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &) return stop; } -static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleOverload(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->functionProto.resize(0); @@ -1936,7 +1935,7 @@ static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleEnum(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::ENUMDOC_SEC); @@ -1944,7 +1943,7 @@ static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList & return stop; } -static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC); @@ -1953,7 +1952,7 @@ static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringLi return stop; } -static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC); @@ -1962,7 +1961,7 @@ static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCString return stop; } -static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC); @@ -1971,7 +1970,7 @@ static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringL return stop; } -static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleNamespace(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::NAMESPACEDOC_SEC); @@ -1979,7 +1978,7 @@ static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringL return stop; } -static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePackage(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::PACKAGEDOC_SEC); @@ -1987,7 +1986,7 @@ static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringLis return stop; } -static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::CLASSDOC_SEC); @@ -1996,14 +1995,14 @@ static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const QCStringLi return stop; } -static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; BEGIN( ClassDocArg2 ); return FALSE; } -static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { // Obj-C protocol struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::PROTOCOLDOC_SEC); @@ -2012,7 +2011,7 @@ static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const QCStrin return stop; } -static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { // Obj-C category struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::CATEGORYDOC_SEC); @@ -2021,7 +2020,7 @@ static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const QCStrin return stop; } -static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::UNIONDOC_SEC); @@ -2030,7 +2029,7 @@ static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const QCStringLi return stop; } -static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::STRUCTDOC_SEC); @@ -2039,7 +2038,7 @@ static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const QCStringL return stop; } -static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::INTERFACEDOC_SEC); @@ -2048,7 +2047,7 @@ static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const QCStri return stop; } -static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::EXCEPTIONDOC_SEC); @@ -2057,7 +2056,7 @@ static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const QCS return stop; } -static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePage(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::PAGEDOC_SEC); @@ -2065,7 +2064,7 @@ static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList & return stop; } -static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleMainpage(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::MAINPAGEDOC_SEC); @@ -2078,7 +2077,7 @@ static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringLi return stop; } -static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleFile(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::FILEDOC_SEC); @@ -2090,7 +2089,7 @@ static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList & return stop; } -static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleParam(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; // we need process param and retval arguments to escape leading underscores in case of @@ -2100,7 +2099,7 @@ static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList return FALSE; } -static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleRetval(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; addOutput(yyscanner,"@retval "); @@ -2108,7 +2107,7 @@ static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList return FALSE; } -static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleDir(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::DIRDOC_SEC); @@ -2117,14 +2116,12 @@ static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &) return stop; } -static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCStringList &optList) +static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const StringVector &optList) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; Entry::Sections section=Entry::EXAMPLE_SEC; - QCStringList::ConstIterator it; - for ( it = optList.begin(); it != optList.end(); ++it ) + for (const auto &opt : optList) { - QCString opt = (*it).stripWhiteSpace().lower(); if (opt=="lineno") { section=Entry::EXAMPLE_LINENO_SEC; @@ -2132,7 +2129,7 @@ static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCString else { warn(yyextra->fileName,yyextra->lineNr, - "unsupported option '%s' for command '\\%s'",qPrint(opt),qPrint(cmd)); + "unsupported option '%s' for command '\\%s'",opt.c_str(),qPrint(cmd)); } } bool stop=makeStructuralIndicator(yyscanner,section); @@ -2141,7 +2138,7 @@ static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCString return stop; } -static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleDetails(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->inContext!=OutputBrief) @@ -2153,14 +2150,14 @@ static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringLis return FALSE; } -static bool handleNoop(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleNoop(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; BEGIN( Noop ); return FALSE; } -static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleName(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::MEMBERGRP_SEC); @@ -2176,7 +2173,7 @@ static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList & return stop; } -static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleTodo(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->newXRefKind = XRef_Todo; @@ -2185,7 +2182,7 @@ static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList & return FALSE; } -static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleTest(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->newXRefKind = XRef_Test; @@ -2194,7 +2191,7 @@ static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList & return FALSE; } -static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleBug(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->newXRefKind = XRef_Bug; @@ -2203,7 +2200,7 @@ static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &) return FALSE; } -static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->newXRefKind = XRef_Deprecated; @@ -2212,7 +2209,7 @@ static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCString return FALSE; } -static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->newXRefKind = XRef_Item; @@ -2220,7 +2217,7 @@ static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleParBlock(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->insideParBlock) @@ -2238,7 +2235,7 @@ static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->insideParBlock) @@ -2252,7 +2249,7 @@ static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStrin return FALSE; } -static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->current->relates.isEmpty()) @@ -2265,7 +2262,7 @@ static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const QCString return FALSE; } -static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->current->relates.isEmpty()) @@ -2279,7 +2276,7 @@ static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const QCSt return FALSE; } -static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->current->relates.isEmpty()) @@ -2293,7 +2290,7 @@ static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const QCStrin return FALSE; } -static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleRefItem(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; addOutput(yyscanner,"@refitem "); @@ -2301,7 +2298,7 @@ static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringLis return FALSE; } -static bool handleSection(yyscan_t yyscanner,const QCString &s, const QCStringList &) +static bool handleSection(yyscan_t yyscanner,const QCString &s, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; setOutput(yyscanner,OutputDoc); @@ -2314,7 +2311,7 @@ static bool handleSection(yyscan_t yyscanner,const QCString &s, const QCStringLi return FALSE; } -static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringList &) +static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->current->section!=Entry::EMPTY_SEC && @@ -2335,7 +2332,7 @@ static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringLi return FALSE; } -static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const QCStringList &) +static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; addOutput(yyscanner,"@"+s+" "); @@ -2343,7 +2340,7 @@ static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const QCStringLis return FALSE; } -static bool handleCite(yyscan_t yyscanner,const QCString &s, const QCStringList &) +static bool handleCite(yyscan_t yyscanner,const QCString &s, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->spaceBeforeCmd.isEmpty()) @@ -2356,16 +2353,16 @@ static bool handleCite(yyscan_t yyscanner,const QCString &s, const QCStringList return FALSE; } -static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const QCStringList &optList) +static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const StringVector &optList) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; - if (optList.isEmpty()) + if (optList.empty()) { addOutput(yyscanner,"@"+s+" "); } else { - addOutput(yyscanner,"@"+s+"{"+optList.join(",")+"} "); + addOutput(yyscanner,"@"+s+"{"+join(optList,",")+"} "); } //printf("handleFormatBlock(%s) with option(%s)\n",s.data(),opt.data()); yyextra->blockName=s; @@ -2374,7 +2371,7 @@ static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const QCStri return FALSE; } -static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; addOutput(yyscanner,"@addindex "); @@ -2382,7 +2379,7 @@ static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleIf(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->enabledSectionFound=FALSE; @@ -2392,7 +2389,7 @@ static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &) return FALSE; } -static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleIfNot(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->enabledSectionFound=FALSE; @@ -2402,7 +2399,7 @@ static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList return FALSE; } -static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleElseIf(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->guards.empty()) @@ -2419,7 +2416,7 @@ static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList return FALSE; } -static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleElse(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->guards.empty()) @@ -2435,7 +2432,7 @@ static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList & return FALSE; } -static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleEndIf(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->guards.empty()) @@ -2457,7 +2454,7 @@ static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList return FALSE; } -static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleIngroup(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->inGroupParamFound=FALSE; @@ -2465,84 +2462,84 @@ static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringLis return FALSE; } -static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->subGrouping = FALSE; return FALSE; } -static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->initLines = 100000; // ON return FALSE; } -static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->initLines = 0; // OFF return FALSE; } -static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->callGraph = TRUE; // ON return FALSE; } -static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->callGraph = FALSE; // OFF return FALSE; } -static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->callerGraph = TRUE; // ON return FALSE; } -static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->callerGraph = FALSE; // OFF return FALSE; } -static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->referencedByRelation = TRUE; // ON return FALSE; } -static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->referencedByRelation = FALSE; // OFF return FALSE; } -static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->referencesRelation = TRUE; // ON return FALSE; } -static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->referencesRelation = FALSE; // OFF return FALSE; } -static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleInternal(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!Config_getBool(INTERNAL_DOCS)) @@ -2565,72 +2562,71 @@ static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleStatic(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->stat = TRUE; return FALSE; } -static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePure(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->virt = Pure; return FALSE; } -static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePrivate(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->protection = Private; return FALSE; } -static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->protection = yyextra->protection = Private; return FALSE; } -static bool handleProtected(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleProtected(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->protection = Protected; return FALSE; } -static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->protection = yyextra->protection = Protected ; return FALSE; } -static bool handlePublic(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePublic(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->protection = Public; return FALSE; } -static bool handlePublicSection(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handlePublicSection(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->current->protection = yyextra->protection = Public; return FALSE; } -static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &optList) +static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &optList) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->current->section==Entry::PAGEDOC_SEC || yyextra->current->section==Entry::MAINPAGEDOC_SEC) { - QCStringList::ConstIterator it; - for ( it = optList.begin(); it != optList.end(); ++it ) + for (const auto &opt_ : optList) { - QCString opt = (*it).stripWhiteSpace().lower(); + QCString opt = QCString(opt_).stripWhiteSpace().lower(); char dum; int level = 5; int i = opt.find(':'); @@ -2638,7 +2634,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &o { if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1) { - warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data()); + warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", QCString(opt_).stripWhiteSpace().data()); opt = ""; } else @@ -2668,7 +2664,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &o } else { - warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data()); + warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", QCString(opt_).stripWhiteSpace().data()); } } } @@ -2682,14 +2678,14 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &o return FALSE; } -static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleInherit(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; BEGIN(InheritParam); return FALSE; } -static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) +static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; yyextra->currentCmd = cmd; @@ -2697,7 +2693,7 @@ static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const QCString return FALSE; } -static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (yyextra->current->brief.isEmpty() && yyextra->current->doc.isEmpty()) @@ -2715,7 +2711,7 @@ static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringL return FALSE; } -static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; setOutput(yyscanner,OutputDoc); @@ -2728,7 +2724,7 @@ static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStrin return FALSE; } -static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const StringVector &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; setOutput(yyscanner,OutputBrief); diff --git a/src/defargs.l b/src/defargs.l index 36ed99c..528d44c 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -56,7 +56,6 @@ //#include #include #include -#include #include "defargs.h" #include "entry.h" diff --git a/src/dir.cpp b/src/dir.cpp index 558045b..df1665f 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -196,7 +196,8 @@ bool Dir::exists(const std::string &path,bool acceptsAbsPath) const bool Dir::exists() const { - return exists(p->path.string()); + FileInfo fi(p->path); + return fi.exists() && fi.isDir(); } bool Dir::isRelative() const diff --git a/src/docparser.cpp b/src/docparser.cpp index 22b7341..4965953 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -19,7 +19,6 @@ #include #include -#include #include "regex.h" #include "doxygen.h" @@ -5060,24 +5059,28 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) doctokenizerYYsetStateOptions(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); - QCStringList optList=QCStringList::split(",",g_token->name); - if (t==DocInclude::Include && optList.contains("lineno")) + StringVector optList=split(g_token->name.str(),","); + auto contains = [&optList](const char *kw) + { + return std::find(optList.begin(),optList.end(),kw)!=optList.end(); + }; + if (t==DocInclude::Include && contains("lineno")) { t = DocInclude::IncWithLines; } - else if (t==DocInclude::Snippet && optList.contains("lineno")) + else if (t==DocInclude::Snippet && contains("lineno")) { t = DocInclude::SnipWithLines; } - else if (t==DocInclude::DontInclude && optList.contains("lineno")) + else if (t==DocInclude::DontInclude && contains("lineno")) { t = DocInclude::DontIncWithLines; } - else if (t==DocInclude::Include && optList.contains("doc")) + else if (t==DocInclude::Include && contains("doc")) { t = DocInclude::IncludeDoc; } - else if (t==DocInclude::Snippet && optList.contains("doc")) + else if (t==DocInclude::Snippet && contains("doc")) { t = DocInclude::SnippetDoc; } diff --git a/src/index.cpp b/src/index.cpp index 5554987..92c9f37 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -4428,7 +4428,7 @@ static void writeIndex(OutputList &ol) ol.popGeneratorState(); } -static QArray indexWritten; +static std::vector indexWritten; static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries) { diff --git a/src/qcstring.cpp b/src/qcstring.cpp new file mode 100644 index 0000000..2a595cd --- /dev/null +++ b/src/qcstring.cpp @@ -0,0 +1,560 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2015 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#include "qcstring.h" + +#include +#include +#include +#include +#include + +QCString &QCString::sprintf( const char *format, ... ) +{ + va_list ap; + va_start( ap, format ); + const int minlen=256; + int l = length(); + if (l=(int)length()) return -1; // index outside string + const char *pos; + if (cs) + { + pos = strchr(data()+index,c); + } + else + { + pos = data()+index; + c = tolower((unsigned char)c); + while (*pos && tolower((unsigned char)*pos)!=c) pos++; + if (!*pos && c) pos=0; // not found + } + return pos ? (int)(pos - data()) : -1; +} + +int QCString::find( const char *str, int index, bool cs ) const +{ + int l = length(); + if (index<0 || index>=l) return -1; // index outside string + if (!str) return -1; // no string to search for + if (!*str) return index; // empty string matching at index + const char *pos; + if (cs) // case sensitive + { + pos = strstr(data()+index,str); + } + else // case insensitive + { + pos = data(); + int len = qstrlen(str); + while (*pos) + { + if (qstrnicmp(pos,str,len)==0) break; + pos++; + } + if (!*pos) pos = 0; // not found + } + return pos ? (int)(pos - data()) : -1; +} + +int QCString::find( const QCString &str, int index, bool cs ) const +{ + return find(str.data(),index,cs); +} + +int QCString::findRev( char c, int index, bool cs) const +{ + const char *b = data(); + const char *pos; + int len = length(); + if (len==0) return -1; // empty string + if (index<0) // start from end + { + if (cs) + { + pos = strrchr(b,c); + return pos ? (int)(pos - b) : -1; + } + index=len; + } + else if (index>len) // bad index + { + return -1; + } + pos = b+index; + if (cs) + { + while ( pos>=b && *pos!=c) pos--; + } + else + { + c = tolower((unsigned char)c); + while ( pos>=b && tolower((unsigned char)*pos)!=c) pos--; + } + return pos>=b ? (int)(pos - b) : -1; +} + +int QCString::findRev( const char *str, int index, bool cs) const +{ + int slen = qstrlen(str); + int len = length(); + if (index<0) index = len-slen; // start from end + else if (index>len) return -1; // bad index + else if (index+slen>len) index=len-slen; // str would be too long + if (index<0) return -1; // no match possible + const char *pos = data()+index; + if (cs) // case sensitive + { + for (int i=index; i>=0; i--) if (qstrncmp(pos--,str,slen)==0) return i; + } + else // case insensitive + { + for (int i=index; i>=0; i--) if (qstrnicmp(pos,str,slen)==0) return i; + } + return -1; +} + +int QCString::contains( char c, bool cs ) const +{ + if (length()==0) return 0; + int count=0; + const char *pos = data(); + if (cs) + { + while (*pos) if (*pos++ == c) count++; + } + else + { + c = tolower((unsigned char)c); + while (*pos) + { + if (tolower((unsigned char)*pos)==c) count++; + pos++; + } + } + return count; +} + +int QCString::contains( const char *str, bool cs ) const +{ + if (str==0 || length()==0) return 0; + int count=0; + const char *pos = data(); + int len = qstrlen(str); + while (*pos) + { + if (cs) + { + if (qstrncmp(pos,str,len)==0) count++; + } + else + { + if (qstrnicmp(pos,str,len)==0) count++; + } + pos++; + } + return count; +} + +QCString QCString::simplifyWhiteSpace() const +{ + if ( isEmpty() ) // nothing to do + return *this; + + QCString result( length()+1 ); + const char *from = data(); + char *to = result.rawData(); + char *first = to; + while ( TRUE ) + { + while ( *from && isspace((uchar) *from) ) + from++; + while ( *from && !isspace((uchar)*from) ) + *to++ = *from++; + if ( *from ) + *to++ = 0x20; // ' ' + else + break; + } + if ( to > first && *(to-1) == 0x20 ) + to--; + *to = '\0'; + result.resize( (int)(to - result.data()) + 1 ); + return result; +} + +QCString &QCString::replace( uint index, uint len, const char *s) +{ + remove( index, len ); + insert( index, s ); + return *this; +} + +static bool ok_in_base( char c, int base ) +{ + if ( base <= 10 ) + return c>='0' && c<='9' && (c-'0') < base; + else + return (c>='0' && c<='9') || + (c >= 'a' && c < char('a'+base-10)) || + (c >= 'A' && c < char('A'+base-10)); +} + +short QCString::toShort(bool *ok, int base) const +{ + long v = toLong( ok, base ); + if ( ok && *ok && (v < -32768 || v > 32767) ) { + *ok = FALSE; + v = 0; + } + return (short)v; +} + +ushort QCString::toUShort(bool *ok,int base) const +{ + ulong v = toULong( ok, base ); + if ( ok && *ok && (v > 65535) ) { + *ok = FALSE; + v = 0; + } + return (ushort)v; +} + +int QCString::toInt(bool *ok, int base) const +{ + return (int)toLong( ok, base ); +} + +uint QCString::toUInt(bool *ok,int base) const +{ + return (uint)toULong( ok, base ); +} + + +long QCString::toLong(bool *ok,int base) const +{ + const char *p = data(); + long val=0; + int l = length(); + const long max_mult = INT_MAX / base; + bool is_ok = FALSE; + int neg = 0; + if ( !p ) + goto bye; + while ( l && isspace(*p) ) // skip leading space + l--,p++; + if ( l && *p == '-' ) { + l--; + p++; + neg = 1; + } else if ( *p == '+' ) { + l--; + p++; + } + + // NOTE: toULong() code is similar + if ( !l || !ok_in_base(*p,base) ) + goto bye; + while ( l && ok_in_base(*p,base) ) { + l--; + int dv; + if ( *p>='0' && *p<='9' ) { + dv = *p-'0'; + } else { + if ( *p >= 'a' && *p <= 'z' ) + dv = *p - 'a' + 10; + else + dv = *p - 'A' + 10; + } + if ( val > max_mult || (val == max_mult && dv > (INT_MAX%base)+neg) ) + goto bye; + val = base*val + dv; + p++; + } + if ( neg ) + val = -val; + while ( l && isspace(*p) ) // skip trailing space + l--,p++; + if ( !l ) + is_ok = TRUE; +bye: + if ( ok ) + *ok = is_ok; + return is_ok ? val : 0; +} + +ulong QCString::toULong(bool *ok,int base) const +{ + const char *p = data(); + ulong val=0; + int l = length(); + const ulong max_mult = 429496729; // UINT_MAX/10, rounded down + bool is_ok = FALSE; + if ( !p ) + goto bye; + while ( l && isspace(*p) ) // skip leading space + l--,p++; + if ( *p == '+' ) + l--,p++; + + // NOTE: toLong() code is similar + if ( !l || !ok_in_base(*p,base) ) + goto bye; + while ( l && ok_in_base(*p,base) ) { + l--; + uint dv; + if ( *p>='0' && *p<='9' ) { + dv = *p-'0'; + } else { + if ( *p >= 'a' && *p <= 'z' ) + dv = *p - 'a' + 10; + else + dv = *p - 'A' + 10; + } + if ( val > max_mult || (val == max_mult && dv > (UINT_MAX%base)) ) + goto bye; + val = base*val + dv; + p++; + } + + while ( l && isspace(*p) ) // skip trailing space + l--,p++; + if ( !l ) + is_ok = TRUE; +bye: + if ( ok ) + *ok = is_ok; + return is_ok ? val : 0; +} + +uint64 QCString::toUInt64(bool *ok,int base) const +{ + const char *p = data(); + uint64 val=0; + int l = length(); + const uint64 max_mult = 1844674407370955161ULL; // ULLONG_MAX/10, rounded down + bool is_ok = FALSE; + if ( !p ) + goto bye; + while ( l && isspace(*p) ) // skip leading space + l--,p++; + if ( *p == '+' ) + l--,p++; + + // NOTE: toULong() code is similar + if ( !l || !ok_in_base(*p,base) ) + goto bye; + while ( l && ok_in_base(*p,base) ) { + l--; + uint dv; + if ( *p>='0' && *p<='9' ) { + dv = *p-'0'; + } else { + if ( *p >= 'a' && *p <= 'z' ) + dv = *p - 'a' + 10; + else + dv = *p - 'A' + 10; + } + if ( val > max_mult || (val == max_mult && dv > (ULLONG_MAX%base)) ) + goto bye; + val = base*val + dv; + p++; + } + + while ( l && isspace(*p) ) // skip trailing space + l--,p++; + if ( !l ) + is_ok = TRUE; +bye: + if ( ok ) + *ok = is_ok; + return is_ok ? val : 0; +} + +//------------------------------------------------- + +void *qmemmove( void *dst, const void *src, uint len ) +{ + char *d; + char *s; + if ( dst > src ) { + d = (char *)dst + len - 1; + s = (char *)src + len - 1; + while ( len-- ) + *d-- = *s--; + } else if ( dst < src ) { + d = (char *)dst; + s = (char *)src; + while ( len-- ) + *d++ = *s++; + } + return dst; +} + +char *qstrdup( const char *str ) +{ + if ( !str ) + return 0; + char *dst = new char[qstrlen(str)+1]; + return strcpy( dst, str ); +} + +char *qstrncpy( char *dst, const char *src, uint len ) +{ + if ( !src ) + return 0; + strncpy( dst, src, len ); + if ( len > 0 ) + dst[len-1] = '\0'; + return dst; +} + +int qstricmp( const char *str1, const char *str2 ) +{ + const uchar *s1 = (const uchar *)str1; + const uchar *s2 = (const uchar *)str2; + int res; + uchar c; + if ( !s1 || !s2 ) + return s1 == s2 ? 0 : (int)(s2 - s1); + for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ ) + if ( !c ) // strings are equal + break; + return res; +} + +int qstrnicmp( const char *str1, const char *str2, uint len ) +{ + const uchar *s1 = (const uchar *)str1; + const uchar *s2 = (const uchar *)str2; + int res; + uchar c; + if ( !s1 || !s2 ) + return (int)(s2 - s1); + for ( ; len--; s1++, s2++ ) { + if ( (res = (c=tolower(*s1)) - tolower(*s2)) ) + return res; + if ( !c ) // strings are equal + break; + } + return 0; +} + +/// substitute all occurrences of \a src in \a s by \a dst +QCString substitute(const QCString &s,const QCString &src,const QCString &dst) +{ + if (s.isEmpty() || src.isEmpty()) return s; + const char *p, *q; + int srcLen = src.length(); + int dstLen = dst.length(); + int resLen; + if (srcLen!=dstLen) + { + int count; + for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++; + resLen = s.length()+count*(dstLen-srcLen); + } + else // result has same size as s + { + resLen = s.length(); + } + QCString result(resLen+1); + char *r; + for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) + { + int l = (int)(q-p); + memcpy(r,p,l); + r+=l; + + if (dst) memcpy(r,dst,dstLen); + r+=dstLen; + } + if (r) + { + qstrcpy(r,p); + } + //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); + return result; +} + + +/// substitute all occurrences of \a src in \a s by \a dst, but skip +/// each consecutive sequence of \a src where the number consecutive +/// \a src matches \a skip_seq; if \a skip_seq is negative, skip any +/// number of consecutive \a src +QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq) +{ + if (s.isEmpty() || src.isEmpty()) return s; + const char *p, *q; + int srcLen = src.length(); + int dstLen = dst.length(); + int resLen; + if (srcLen!=dstLen) + { + int count; + for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++; + resLen = s.length()+count*(dstLen-srcLen); + } + else // result has same size as s + { + resLen = s.length(); + } + QCString result(resLen+1); + char *r; + for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) + { + // search a consecutive sequence of src + int seq = 0, skip = 0; + if (skip_seq) + { + for (const char *n=q+srcLen; qstrncmp(n,src,srcLen)==0; seq=1+skip, n+=srcLen) + ++skip; // number of consecutive src after the current one + + // verify the allowed number of consecutive src to skip + if (skip_seq > 0 && skip_seq != seq) + seq = skip = 0; + } + + // skip a consecutive sequence of src when necessary + int l = (int)((q + seq * srcLen)-p); + memcpy(r,p,l); + r+=l; + + if (skip) + { + // skip only the consecutive src found after the current one + q += skip * srcLen; + // the next loop will skip the current src, aka (p=q+srcLen) + continue; + } + + if (dst) memcpy(r,dst,dstLen); + r+=dstLen; + } + qstrcpy(r,p); + result.resize((int)strlen(result.data())+1); + //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); + return result; +} + diff --git a/src/qcstring.h b/src/qcstring.h new file mode 100644 index 0000000..6e2802d --- /dev/null +++ b/src/qcstring.h @@ -0,0 +1,514 @@ +/**************************************************************************** +** +** Copyright (C) 1997-2015 by Dimitri van Heesch. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation under the terms of the GNU General Public License is hereby +** granted. No representations are made about the suitability of this software +** for any purpose. It is provided "as is" without express or implied warranty. +** See the GNU General Public License for more details. +** +** Note: this is a reimplementation of the qcstring.h that came with +** an Qt version 2.2.3. For short strings it stores the string data inside +** the object. For long strings it uses a separate array with reference counting. +** +**********************************************************************/ + +#ifndef QCSTRING_H +#define QCSTRING_H + +#include +#include + +#include +#include +#include +#include +#include +#include + +const bool FALSE = false; +const bool TRUE = true; +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned uint; +typedef unsigned long ulong; +typedef int64_t int64; +typedef uint64_t uint64; +#define QMAX(a,b) ((a) > (b) ? (a) : (b)) +#define QMIN(a,b) ((a) < (b) ? (a) : (b)) +#define ASSERT(x) if ( !(x) )\ + fprintf(stderr,"ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__) + + +/***************************************************************************** + Safe and portable C string functions; extensions to standard string.h + *****************************************************************************/ + +void *qmemmove( void *dst, const void *src, uint len ); + +#if defined(_OS_WIN32_) +#define qsnprintf _snprintf +#else +#define qsnprintf snprintf +#endif + +char *qstrdup( const char * ); + +inline uint cstrlen( const char *str ) +{ return (uint)strlen(str); } + +inline uint qstrlen( const char *str ) +{ return str ? (uint)strlen(str) : 0; } + +inline char *cstrcpy( char *dst, const char *src ) +{ return strcpy(dst,src); } + +inline char *qstrcpy( char *dst, const char *src ) +{ return src ? strcpy(dst, src) : 0; } + +char * qstrncpy(char *dst,const char *src, uint len); + +inline int cstrcmp( const char *str1, const char *str2 ) +{ return strcmp(str1,str2); } + +inline int qstrcmp( const char *str1, const char *str2 ) +{ return (str1 && str2) ? strcmp(str1,str2) : (int)((intptr_t)str2 - (intptr_t)str1); } + +inline int cstrncmp( const char *str1, const char *str2, uint len ) +{ return strncmp(str1,str2,len); } + +inline int qstrncmp( const char *str1, const char *str2, uint len ) +{ return (str1 && str2) ? strncmp(str1,str2,len) : + (int)((intptr_t)str2 - (intptr_t)str1); } + +int qstricmp( const char *str1, const char *str2 ); + +int qstrnicmp( const char *str1, const char *str2, uint len ); + +/** This is an alternative implementation of QCString. It provides basically + * the same functions but uses std::string as the underlying string type + */ +class QCString +{ + public: + QCString() = default; + ~QCString() = default; + QCString( const QCString &s ) = default; + QCString &operator=( const QCString &s ) = default; + QCString( QCString &&s ) = default; + QCString &operator=( QCString &&s ) = default; + + QCString( const std::string &s ) : m_rep(s) {} + + /** creates a string with room for size characters + * @param[in] size the number of character to allocate (also counting the 0-terminator!) + */ + explicit QCString( uint size ) { m_rep.resize(size>0 ? size-1 : 0); } + + /** creates a string from a plain C string. + * @param[in] str A zero terminated C string. When 0 an empty string is created. + */ + QCString( const char *str ) : m_rep(str?str:"") {} + + /** creates a string from \a str and copies over the first \a maxlen characters. */ + QCString( const char *str, uint maxlen ) : m_rep(str?str:"") { m_rep.resize(maxlen); } + + /** replaces the contents by that of string \a s. */ + + /** replaces the contents by that of C string \a str. */ + QCString &operator=( const char *str) { m_rep = str?str:""; return *this; } + + /** Returns TRUE iff the string is empty. Equivalent to isEmpty(). */ + bool isNull() const { return m_rep.empty(); } + + /** Returns TRUE iff the string is empty */ + bool isEmpty() const { return m_rep.empty(); } + + /** Returns the length of the string, not counting the 0-terminator. Equivalent to size(). */ + uint length() const { return (uint)m_rep.size(); } + + /** Returns the length of the string, not counting the 0-terminator. */ + uint size() const { return (uint)m_rep.size(); } + + /** Returns a pointer to the contents of the string in the form of a 0-terminated C string */ + const char *data() const { return m_rep.empty() ? 0 : m_rep.c_str(); } + + /** Returns a writable pointer to the data. + * @warning if the string is shared it will modifying the string directly and + * this will overwrite all copies as well! + */ + char *rawData() const { return m_rep.empty() ? 0 : const_cast(&m_rep[0]); } + + /** Resizes the string to hold \a newlen characters + * (this value should also count the 0-terminator). + * If the string is enlarged the contents will + * be left unmodified. + */ + bool resize( uint newlen ) { m_rep.resize( newlen>0 ? newlen-1 : 0 ); return TRUE; } + + /** Truncates the string at position \a pos. */ + bool truncate( uint pos ) { return resize( pos + 1 ); } + + /** Fills a string with a predefined character + * @param[in] c the character used to fill the string with. + * @param[in] len the number of character to fill. Use -1 to fill the whole string. + * @note the string will be resized to contain \a len characters. The contents of the + * string will be lost. + */ + bool fill( char c, int len = -1 ) + { + int l = len==-1 ? (int)m_rep.size() : len; + m_rep = std::string(l,c); + return TRUE; + } + + /** Returns a deep copy of the string. */ + QCString copy() const { return *this; } + + QCString &sprintf( const char *format, ... ); + + int find( char c, int index=0, bool cs=TRUE ) const; + int find( const char *str, int index=0, bool cs=TRUE ) const; + int find( const QCString &str, int index=0, bool cs=TRUE ) const; + //int find( const QRegExp &rx, int index=0 ) const; + + int findRev( char c, int index=-1, bool cs=TRUE) const; + int findRev( const char *str, int index=-1, bool cs=TRUE) const; + //int findRev( const QRegExp &rx, int index=-1 ) const; + + int contains( char c, bool cs=TRUE ) const; + int contains( const char *str, bool cs=TRUE ) const; + //int contains( const QRegExp &rx ) const; + + bool stripPrefix(const char *prefix) + { + if (prefix==0 || m_rep.empty()) return FALSE; + if (m_rep.rfind(prefix,0)==0) // string starts with prefix + { + m_rep.erase(0,qstrlen(prefix)); + return TRUE; + } + return FALSE; + } + + QCString left( uint len ) const + { + return m_rep.empty() ? QCString() : QCString(m_rep.substr(0,len)); + } + + QCString right( uint len ) const + { + return m_rep.empty() ? QCString() : + lenslen || len==0 ? QCString() : + QCString(m_rep.substr(index,len)); + } + + QCString lower() const + { + std::string s = m_rep; + std::transform(s.begin(),s.end(),s.begin(), + [](unsigned char c){ return (unsigned char)std::tolower(c); }); + return s; + } + + QCString upper() const + { + std::string s = m_rep; + std::transform(s.begin(),s.end(),s.begin(), + [](unsigned char c){ return (unsigned char)std::toupper(c); }); + return s; + } + + QCString stripWhiteSpace() const + { + int sl = (uint)m_rep.size(); + if (sl==0 || (!std::isspace(m_rep[0]) && !std::isspace(m_rep[sl-1]))) return *this; + int start=0,end=sl-1; + while (startstart && std::isspace(m_rep[end])) end--; + return QCString(m_rep.substr(start,1+end-start)); + } + + QCString simplifyWhiteSpace() const; + + QCString &insert( uint index, const char *s ) + { + uint len = s ? qstrlen(s) : 0; + if (len>0) + { + uint ol = (uint)m_rep.size(); + if (index>ol) // insert beyond end of string and fill gap with spaces + { + m_rep.resize(index+len); + std::memset(&m_rep[ol],' ',index-ol); + std::memcpy(&m_rep[index],s,len+1); + } + else // insert inside the string + { + m_rep.insert(index,s); + } + } + return *this; + } + + QCString &insert( uint index, char c) + { + char s[2] = { c, '\0' }; + return insert(index,s); + } + + QCString &append( const char *s ) + { + return operator+=(s); + } + + QCString &prepend( const char *s ) + { + return insert(0,s); + } + + QCString &remove( uint index, uint len ) + { + uint ol = (uint)m_rep.size(); + if (index
      0) m_rep.erase(index,index+len>=ol ? std::string::npos : len); + return *this; + } + + QCString &replace( uint index, uint len, const char *s); + //QCString &replace( const QRegExp &rx, const char *str ); + + short toShort( bool *ok=0, int base=10 ) const; + ushort toUShort( bool *ok=0, int base=10 ) const; + int toInt( bool *ok=0, int base=10 ) const; + uint toUInt( bool *ok=0, int base=10 ) const; + long toLong( bool *ok=0, int base=10 ) const; + ulong toULong( bool *ok=0, int base=10 ) const; + uint64 toUInt64( bool *ok=0, int base=10 ) const; + + QCString &setNum(short n) + { + m_rep = std::to_string(n); + return *this; + } + + QCString &setNum(ushort n) + { + m_rep = std::to_string(n); + return *this; + } + + QCString &setNum(int n) + { + m_rep = std::to_string(n); + return *this; + } + + QCString &setNum(uint n) + { + m_rep = std::to_string(n); + return *this; + } + + QCString &setNum(long n) + { + m_rep = std::to_string(n); + return *this; + } + + QCString &setNum(ulong n) + { + m_rep = std::to_string(n); + return *this; + } + + bool startsWith( const char *s ) const + { + if (m_rep.empty() || s==0) return s==0; + return m_rep.rfind(s,0)==0; // looking "backward" starting and ending at index 0 + } + + /** Converts the string to a plain C string */ + operator const char *() const + { + return data(); + } + + std::string str() const + { + return m_rep; + } + + QCString &operator+=( const QCString &s) + { + m_rep+=s.str(); + return *this; + } + + QCString &operator+=( const std::string &s) + { + m_rep+=s; + return *this; + } + + /** Appends string \a str to this string and returns a reference to the result. */ + QCString &operator+=( const char *s ) + { + if (s) m_rep+=s; + return *this; + } + + /** Appends character \a c to this string and returns a reference to the result. */ + QCString &operator+=( char c ) + { + m_rep+=c; + return *this; + } + + /** Returns a reference to the character at index \a i. */ + char &at( uint i) const + { + return const_cast(m_rep[i]); + } + + /** Indexing operator. Equivalent to at(). */ + char &operator[]( int i ) const + { + return const_cast(m_rep[i]); + } + + private: + std::string m_rep; +}; + +/***************************************************************************** + QCString non-member operators + *****************************************************************************/ + +inline bool operator==( const QCString &s1, const QCString &s2 ) +{ return qstrcmp(s1.data(),s2.data()) == 0; } + +inline bool operator==( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) == 0; } + +inline bool operator==( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) == 0; } + +inline bool operator!=( const QCString &s1, const QCString &s2 ) +{ return qstrcmp(s1.data(),s2.data()) != 0; } + +inline bool operator!=( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) != 0; } + +inline bool operator!=( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) != 0; } + +inline bool operator<( const QCString &s1, const QCString& s2 ) +{ return qstrcmp(s1.data(),s2.data()) < 0; } + +inline bool operator<( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) < 0; } + +inline bool operator<( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) < 0; } + +inline bool operator<=( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) <= 0; } + +inline bool operator<=( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) <= 0; } + +inline bool operator>( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) > 0; } + +inline bool operator>( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) > 0; } + +inline bool operator>=( const QCString &s1, const char *s2 ) +{ return qstrcmp(s1.data(),s2) >= 0; } + +inline bool operator>=( const char *s1, const QCString &s2 ) +{ return qstrcmp(s1,s2.data()) >= 0; } + +inline QCString operator+( const QCString &s1, const QCString &s2 ) +{ + return QCString(s1.str()+s2.str()); +} + + +inline QCString operator+( const QCString &s1, const char *s2 ) +{ + QCString tmp(s1); + tmp += s2; + return tmp; +} + +inline QCString operator+( const char *s1, const QCString &s2 ) +{ + QCString tmp(s1); + tmp += s2; + return tmp; +} + +inline QCString operator+( const QCString &s1, char c2 ) +{ + QCString tmp( s1.data() ); + tmp += c2; + return tmp; +} + +inline QCString operator+( char c1, const QCString &s2 ) +{ + QCString tmp; + tmp += c1; + tmp += s2; + return tmp; +} + +inline const char *qPrint(const char *s) +{ + if (s) return s; else return ""; +} + +inline const char *qPrint(const QCString &s) +{ + if (!s.isEmpty()) return s.data(); else return ""; +} + +inline const char *qPrint(const std::string &s) +{ + return s.c_str(); +} + +inline std::string toStdString(const QCString &s) +{ + return s.str(); +} + +// helper functions +QCString substitute(const QCString &str,const QCString &find,const QCString &replace); +QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq); + +inline QCString substitute(const QCString &s,char srcChar,char dstChar) +{ + std::string ss = s.str(); + std::replace(ss.begin(),ss.end(),srcChar,dstChar); + return ss; +} + +inline std::ostream& operator<<(std::ostream& os, const QCString& s) +{ + os << s.str(); + return os; +} + +#endif // QCSTRING_H diff --git a/src/qhp.cpp b/src/qhp.cpp index 181ed67..dd199ad 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -22,9 +22,9 @@ #include "groupdef.h" #include "doxygen.h" #include "filedef.h" +#include "util.h" #include -#include #include static QCString makeFileName(const char * withoutExtension) @@ -101,10 +101,11 @@ void Qhp::initialize() { "name", filterName, 0 }; m_doc.open("customFilter", tagAttributes); - QCStringList customFilterAttributes = QCStringList::split(' ', Config_getString(QHP_CUST_FILTER_ATTRS)); - for (int i = 0; i < (int)customFilterAttributes.count(); i++) + StringVector customFilterAttributes = + split(Config_getString(QHP_CUST_FILTER_ATTRS).str(), " "); + for (const auto &attr : customFilterAttributes) { - m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]); + m_doc.openCloseContent("filterAttribute", attr.c_str()); } m_doc.close("customFilter"); } @@ -112,15 +113,16 @@ void Qhp::initialize() m_doc.open("filterSection"); // Add section attributes - QCStringList sectionFilterAttributes = QCStringList::split(' ', - Config_getString(QHP_SECT_FILTER_ATTRS)); - if (!sectionFilterAttributes.contains("doxygen")) + StringVector sectionFilterAttributes = + split(Config_getString(QHP_SECT_FILTER_ATTRS).str(), " "); + if (std::find(sectionFilterAttributes.begin(), sectionFilterAttributes.end(), "doxygen") == + sectionFilterAttributes.end()) { - sectionFilterAttributes << "doxygen"; + sectionFilterAttributes.push_back("doxygen"); } - for (int i = 0; i < (int)sectionFilterAttributes.count(); i++) + for (const auto &attr : sectionFilterAttributes) { - m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]); + m_doc.openCloseContent("filterAttribute", attr.c_str()); } m_toc.open("toc"); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 49e97f2..bb49a18 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2313,7 +2313,7 @@ static void encodeForOutput(std::ostream &t,const char *s) QCString encoding; bool converted=FALSE; int l = qstrlen(s); - static QByteArray enc; + static std::vector enc; if (l*4>(int)enc.size()) enc.resize(l*4); // worst case encoding.sprintf("CP%s",theTranslator->trRTFansicp().data()); if (!encoding.isEmpty()) @@ -2325,7 +2325,7 @@ static void encodeForOutput(std::ostream &t,const char *s) size_t iLeft=l; size_t oLeft=enc.size(); char *inputPtr = (char*)s; - char *outputPtr = enc.data(); + char *outputPtr = &enc[0]; if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) { enc.resize(enc.size()-(unsigned int)oLeft); diff --git a/src/util.cpp b/src/util.cpp index f402bac..c5bc40e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7396,3 +7396,17 @@ int findIndex(const std::string &s,const reg::Ex &re) return reg::search(s,match,re) ? (int)match.position() : -1; } +/// create a string where the string in the vector are joined by the given delimiter +std::string join(const StringVector &sv,const std::string &delimiter) +{ + std::string result; + bool first=true; + for (const auto &s : sv) + { + if (!first) result+=delimiter; + first=false; + result+=s; + } + return result; +} + diff --git a/src/util.h b/src/util.h index d8f77af..1811447 100644 --- a/src/util.h +++ b/src/util.h @@ -446,6 +446,7 @@ StringVector split(const std::string &s,const std::string &delimiter); StringVector split(const std::string &s,const reg::Ex &delimiter); int findIndex(const StringVector &sv,const std::string &s); int findIndex(const std::string &s,const reg::Ex &re); +std::string join(const StringVector &s,const std::string &delimiter); bool recognizeFixedForm(const char* contents, FortranFormat format); FortranFormat convertFileNameFortranParserCode(QCString fn); diff --git a/src/vhdlcode.l b/src/vhdlcode.l index 29a8e0b..36b7e6d 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -37,7 +37,6 @@ #include #include #include -#include #include "vhdlcode.h" #include "entry.h" @@ -573,26 +572,25 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI } [^:;]* { //found package - QCString temp(yytext); - QCStringList strl=QCStringList::split(".",temp); - if (strl.count()>2) + StringVector strl=split(yytext,"."); + if (strl.size()>2) { - QCString s1=strl[0]; - QCString s2=strl[1]; - QCString s3=strl[2]; + std::string s1=strl[0]; + std::string s2=strl[1]; + std::string s3=strl[2]; s1.append("."); - s3.prepend("."); - codifyLines(yyscanner,s1.data(),yyextra->currClass.data()); - ClassDef *cd=VhdlDocGen::getPackageName(s2); + s3.insert(0,"."); + codifyLines(yyscanner,s1.c_str(),yyextra->currClass.data()); + ClassDef *cd=VhdlDocGen::getPackageName(s2.c_str()); if (cd) { - generateClassOrGlobalLink(yyscanner,*yyextra->code,s2.data()); + generateClassOrGlobalLink(yyscanner,*yyextra->code,s2.c_str()); } else { - codifyLines(yyscanner,s2.data()); + codifyLines(yyscanner,s2.c_str()); } - codifyLines(yyscanner,s3.data()); + codifyLines(yyscanner,s3.c_str()); } else { @@ -677,9 +675,9 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI ^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} { // found package body QCString ss(yytext); QCString temp=VhdlDocGen::getIndexWord(yytext,2); - QCStringList ql=QCStringList::split(temp,ss); - QCString ll=ql[0]; - codifyLines(yyscanner,ll.data(),yyextra->currClass.data()); + StringVector ql=split(yytext,temp.str()); + std::string ll=ql[0]; + codifyLines(yyscanner,ll.c_str(),yyextra->currClass.data()); temp=temp.stripWhiteSpace(); temp.prepend("_"); generateClassOrGlobalLink(yyscanner,*yyextra->code,temp.data()); @@ -1500,7 +1498,7 @@ static void writeFuncProto(yyscan_t yyscanner) codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data()); return; } - QCStringList qlist=QCStringList::split(name,yyextra->funcProto); + StringVector qlist=split(yyextra->funcProto.str(),name.str()); QCString temp=qlist[0]; codifyLines(yyscanner,temp.data(),yyextra->currClass.data()); yyextra->funcProto.stripPrefix(temp.data()); diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 87dcd72..07ee7ad 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -28,7 +28,6 @@ #include #include -#include /* --------------------------------------------------------------- */ @@ -858,7 +857,7 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol) } else if (ii==VhdlDocGen::ARCHITECTURE) { - QCStringList qlist=QCStringList::split("-",nn); + StringVector qlist=split(nn.str(),"-"); nn=qlist[1]; cd=VhdlDocGen::getClass(nn.data()); } @@ -869,7 +868,7 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol) VhdlDocGen::findAllArchitectures(ql,cd); for (const auto &s : ql) { - QCStringList qlist=QCStringList::split("-",s); + StringVector qlist=split(s.str(),"-"); QCString s1=qlist[0]; QCString s2=qlist[1]; s1.stripPrefix("_"); @@ -917,8 +916,8 @@ const ClassDef* VhdlDocGen::findArchitecture(const ClassDef *cd) for (const auto &citer : *Doxygen::classLinkedMap) { QCString jj=citer->name(); - QCStringList ql=QCStringList::split(":",jj); - if (ql.count()>1) + StringVector ql=split(jj.str(),":"); + if (ql.size()>1) { if (ql[0]==nn ) { @@ -2626,12 +2625,12 @@ void VhdlDocGen::writeRecUnitDocu( QCString largs) { - QCStringList ql=QCStringList::split("#",largs); - uint len=ql.count(); + StringVector ql=split(largs.str(),"#"); + size_t len=ql.size(); ol.startParameterList(TRUE); bool first=TRUE; - for(uint i=0;istrComment); - QCStringList ql = QCStringList::split('\n', p->strComment); + StringVector ql = split(p->strComment.str(),"\n"); QCString co; QCString na; - for (QCString qcs : ql) + for (const auto &qcs_ : ql) { + QCString qcs = qcs_; qcs = qcs.simplifyWhiteSpace(); if (findRe(qcs,csRe)!=-1) { @@ -521,9 +522,9 @@ void VHDLOutlineParser::addVhdlType(const char *n,int startLine,int section, spec= VhdlDocGen::GENERIC; } - QCStringList ql=QCStringList::split(",",name); + StringVector ql=split(name.str(),","); - for (uint u=0;ucurrent->name=ql[u]; s->current->startLine=startLine; @@ -583,11 +584,11 @@ void VHDLOutlineParser::createFunction(const char *imp,uint64 spec,const char *f VhdlDocGen::deleteAllChars(s->current->args,' '); if (!fname.isEmpty()) { - QCStringList q1=QCStringList::split(",",fname); - for (uint ii=0;iicurrent->argList.push_back(arg); } } @@ -630,12 +631,12 @@ void VHDLOutlineParser::addProto(const char *s1,const char *s2,const char *s3, VhdlParser::SharedState *s = &p->shared; (void)s5; // avoid unused warning QCString name=s2; - QCStringList ql=QCStringList::split(",",name); + StringVector ql=split(name.str(),","); - for (uint u=0;u #include #include -#include #include "parserintf.h" #include @@ -16,6 +15,7 @@ #include "entry.h" #include "vhdldocgen.h" #include "config.h" +#include "util.h" enum { GEN_SEC=0x1, PARAM_SEC,CONTEXT_SEC,PROTECTED_SEC } ; //void parserVhdlfile(const char* inputBuffer); diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt index b610f5c..b39ba76 100644 --- a/vhdlparser/CMakeLists.txt +++ b/vhdlparser/CMakeLists.txt @@ -32,11 +32,15 @@ endif() add_custom_command( COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${GENERATED_SRC}/VhdlParser_adj.cc DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py - OUTPUT ${GENERATED_SRC}/VhdlParser_adj.cc + OUTPUT ${GENERATED_SRC}/VhdlParser_adj.cc ) set_source_files_properties(${GENERATED_SRC}/VhdlParser_adj.cc PROPERTIES GENERATED 1) -include_directories(${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/qtools ${PROJECT_SOURCE_DIR}/vhdlparser ${GENERATED_SRC}) +include_directories( + ${PROJECT_SOURCE_DIR}/src + #${PROJECT_SOURCE_DIR}/qtools + ${PROJECT_SOURCE_DIR}/vhdlparser + ${GENERATED_SRC}) add_library(vhdlparser STATIC CharStream.cc ParseException.cc diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc index e039b33..0a57c6f 100644 --- a/vhdlparser/VhdlParser.cc +++ b/vhdlparser/VhdlParser.cc @@ -2602,16 +2602,20 @@ QCString VhdlParser::element_declaration() {QCString rec_name,s1,s2; if (!hasError) { jj_consume_token(SEMI_T); } -QCString name; - QCStringList ql=QCStringList::split(",",rec_name); - for (uint j=0;jgetNameID().data();; - outlineParser()->addVhdlType(name.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public); - } - s2=rec_name+":"+s1; - return s2; +auto ql = split(rec_name.str(),","); + for (const auto &n : ql) + { + std::string name=n+"~"; + name+=outlineParser()->getNameID().data(); + outlineParser()->addVhdlType( + name.c_str(),outlineParser()->getLine(), + Entry::VARIABLE_SEC, + VhdlDocGen::RECORD,0, + s1.data(), + Public); + } + s2=rec_name+":"+s1; + return s2; assert(false); } @@ -9204,14 +9208,22 @@ s+=",";s+=s1; if (!hasError) { jj_consume_token(SEMI_T); } -QCStringList ql1=QCStringList::split(",",s); - for (uint j=0;jparse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) ) + auto ql2=split(name,"."); + if (ql2.size()>1) { - outlineParser()->addVhdlType(it.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public); + std::string it=ql2[1]; + if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) ) + { + outlineParser()->addVhdlType(it.c_str(), + outlineParser()->getLine(), + Entry::VARIABLE_SEC, + VhdlDocGen::USE, + it.c_str(), + "_use_",Public); + } } } s1="use "+s; diff --git a/vhdlparser/VhdlParser.h b/vhdlparser/VhdlParser.h index 891b085..4eea915 100644 --- a/vhdlparser/VhdlParser.h +++ b/vhdlparser/VhdlParser.h @@ -1303,14 +1303,6 @@ void parseInline(); { jj_save(124, xla); } } - inline bool jj_3R_207() - { - if (jj_done) return true; - if (jj_scan_token(VARASSIGN_T)) return true; - if (jj_3R_61()) return true; - return false; - } - inline bool jj_3R_461() { if (jj_done) return true; @@ -1407,16 +1399,6 @@ void parseInline(); return false; } - inline bool jj_3R_97() - { - if (jj_done) return true; - if (jj_scan_token(FILE_T)) return true; - if (jj_3R_205()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_89()) return true; - return false; - } - inline bool jj_3R_693() { if (jj_done) return true; @@ -1424,17 +1406,20 @@ void parseInline(); return false; } - inline bool jj_3R_414() + inline bool jj_3R_97() { if (jj_done) return true; - if (jj_3R_513()) return true; + if (jj_scan_token(FILE_T)) return true; + if (jj_3R_205()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_89()) return true; return false; } - inline bool jj_3_46() + inline bool jj_3R_414() { if (jj_done) return true; - if (jj_3R_98()) return true; + if (jj_3R_513()) return true; return false; } @@ -1450,6 +1435,13 @@ void parseInline(); return false; } + inline bool jj_3_46() + { + if (jj_done) return true; + if (jj_3R_98()) return true; + return false; + } + inline bool jj_3R_572() { if (jj_done) return true; @@ -1629,56 +1621,56 @@ void parseInline(); return false; } - inline bool jj_3R_628() + inline bool jj_3R_535() { if (jj_done) return true; - if (jj_3R_61()) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_327()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_627() + inline bool jj_3_125() { if (jj_done) return true; - if (jj_3R_72()) return true; + if (jj_3R_61()) return true; + if (jj_scan_token(WHEN_T)) return true; return false; } - inline bool jj_3R_577() + inline bool jj_3R_442() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_627()) return false; - jj_scanpos = xsp; - if (jj_3R_628()) return true; + if (jj_scan_token(77)) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_535()) jj_scanpos = xsp; return false; } - inline bool jj_3R_535() + inline bool jj_3R_628() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_327()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_3R_61()) return true; return false; } - inline bool jj_3_125() + inline bool jj_3R_627() { if (jj_done) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(WHEN_T)) return true; + if (jj_3R_72()) return true; return false; } - inline bool jj_3R_442() + inline bool jj_3R_577() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_scan_token(77)) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_535()) jj_scanpos = xsp; + if (!jj_3R_627()) return false; + jj_scanpos = xsp; + if (jj_3R_628()) return true; return false; } @@ -1696,15 +1688,6 @@ void parseInline(); return false; } - inline bool jj_3R_547() - { - if (jj_done) return true; - if (jj_scan_token(TYPE_T)) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_401() { if (jj_done) return true; @@ -1719,19 +1702,20 @@ void parseInline(); return false; } - inline bool jj_3R_546() + inline bool jj_3R_547() { if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_466()) return true; + if (jj_scan_token(TYPE_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_630() + inline bool jj_3R_546() { if (jj_done) return true; - if (jj_scan_token(ELSE_T)) return true; - if (jj_3R_268()) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_466()) return true; return false; } @@ -1761,16 +1745,6 @@ void parseInline(); return false; } - inline bool jj_3R_629() - { - if (jj_done) return true; - if (jj_scan_token(ELSIF_T)) return true; - if (jj_3R_83()) return true; - if (jj_scan_token(THEN_T)) return true; - if (jj_3R_268()) return true; - return false; - } - inline bool jj_3R_361() { if (jj_done) return true; @@ -1787,11 +1761,21 @@ void parseInline(); return false; } - inline bool jj_3R_362() + inline bool jj_3R_630() { if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_63()) return true; + if (jj_scan_token(ELSE_T)) return true; + if (jj_3R_268()) return true; + return false; + } + + inline bool jj_3R_629() + { + if (jj_done) return true; + if (jj_scan_token(ELSIF_T)) return true; + if (jj_3R_83()) return true; + if (jj_scan_token(THEN_T)) return true; + if (jj_3R_268()) return true; return false; } @@ -1804,6 +1788,39 @@ void parseInline(); return false; } + inline bool jj_3R_362() + { + if (jj_done) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_63()) return true; + return false; + } + + inline bool jj_3R_203() + { + if (jj_done) return true; + if (jj_3R_361()) return true; + return false; + } + + inline bool jj_3R_202() + { + if (jj_done) return true; + if (jj_3R_360()) return true; + return false; + } + + inline bool jj_3R_94() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_202()) return false; + jj_scanpos = xsp; + if (jj_3R_203()) return true; + return false; + } + inline bool jj_3R_264() { if (jj_done) return true; @@ -1836,28 +1853,26 @@ void parseInline(); return false; } - inline bool jj_3R_203() - { - if (jj_done) return true; - if (jj_3R_361()) return true; - return false; - } - - inline bool jj_3R_202() + inline bool jj_3R_493() { if (jj_done) return true; - if (jj_3R_360()) return true; + if (jj_scan_token(ELSE_T)) return true; + if (jj_3R_61()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_561()) jj_scanpos = xsp; return false; } - inline bool jj_3R_94() + inline bool jj_3R_400() { if (jj_done) return true; Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_202()) return false; - jj_scanpos = xsp; - if (jj_3R_203()) return true; + if (jj_3R_493()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_493()) { jj_scanpos = xsp; break; } + } return false; } @@ -1873,14 +1888,14 @@ void parseInline(); return false; } - inline bool jj_3R_493() + inline bool jj_3R_399() { if (jj_done) return true; - if (jj_scan_token(ELSE_T)) return true; - if (jj_3R_61()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_561()) jj_scanpos = xsp; + if (!jj_scan_token(53)) return false; + jj_scanpos = xsp; + if (jj_scan_token(75)) return true; return false; } @@ -1891,18 +1906,6 @@ void parseInline(); return false; } - inline bool jj_3R_400() - { - if (jj_done) return true; - Token * xsp; - if (jj_3R_493()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_493()) { jj_scanpos = xsp; break; } - } - return false; - } - inline bool jj_3R_170() { if (jj_done) return true; @@ -1929,17 +1932,6 @@ void parseInline(); return false; } - inline bool jj_3R_399() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_scan_token(53)) return false; - jj_scanpos = xsp; - if (jj_scan_token(75)) return true; - return false; - } - inline bool jj_3R_466() { if (jj_done) return true; @@ -1962,19 +1954,6 @@ void parseInline(); return false; } - inline bool jj_3R_68() - { - if (jj_done) return true; - if (jj_scan_token(GROUP_T)) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(IS_T)) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_491()) return true; - if (jj_scan_token(RPAREN_T)) return true; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_317() { if (jj_done) return true; @@ -1993,15 +1972,14 @@ void parseInline(); return false; } - inline bool jj_3R_398() + inline bool jj_3R_68() { if (jj_done) return true; if (jj_scan_token(GROUP_T)) return true; if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_74()) return true; + if (jj_scan_token(IS_T)) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_492()) return true; + if (jj_3R_491()) return true; if (jj_scan_token(RPAREN_T)) return true; if (jj_scan_token(SEMI_T)) return true; return false; @@ -2025,22 +2003,24 @@ void parseInline(); return false; } - inline bool jj_3R_492() + inline bool jj_3_124() { if (jj_done) return true; - if (jj_3R_559()) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_560()) { jj_scanpos = xsp; break; } - } + if (jj_3R_114()) return true; return false; } - inline bool jj_3_124() + inline bool jj_3R_398() { if (jj_done) return true; - if (jj_3R_114()) return true; + if (jj_scan_token(GROUP_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_492()) return true; + if (jj_scan_token(RPAREN_T)) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } @@ -2061,46 +2041,22 @@ void parseInline(); return false; } - inline bool jj_3R_620() + inline bool jj_3R_687() { if (jj_done) return true; - if (jj_3R_369()) return true; + if (jj_3R_63()) return true; return false; } - inline bool jj_3R_619() - { - if (jj_done) return true; - if (jj_3R_63()) return true; - return false; - } - - inline bool jj_3R_559() + inline bool jj_3R_492() { if (jj_done) return true; + if (jj_3R_559()) return true; Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_619()) return false; - jj_scanpos = xsp; - if (jj_3R_620()) return true; - return false; - } - - inline bool jj_3R_687() - { - if (jj_done) return true; - if (jj_3R_63()) return true; - return false; - } - - inline bool jj_3R_73() - { - if (jj_done) return true; - if (jj_scan_token(GENERIC_T)) return true; - if (jj_scan_token(MAP_T)) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_169()) return true; - if (jj_scan_token(RPAREN_T)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_560()) { jj_scanpos = xsp; break; } + } return false; } @@ -2130,6 +2086,13 @@ void parseInline(); return false; } + inline bool jj_3R_620() + { + if (jj_done) return true; + if (jj_3R_369()) return true; + return false; + } + inline bool jj_3R_587() { if (jj_done) return true; @@ -2145,33 +2108,47 @@ void parseInline(); return false; } - inline bool jj_3R_542() + inline bool jj_3R_619() + { + if (jj_done) return true; + if (jj_3R_63()) return true; + return false; + } + + inline bool jj_3R_559() { if (jj_done) return true; - if (jj_scan_token(WITH_T)) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(SELECT_T)) return true; Token * xsp; xsp = jj_scanpos; - if (jj_scan_token(155)) jj_scanpos = xsp; - if (jj_3R_663()) return true; - if (jj_scan_token(VARASSIGN_T)) return true; - if (jj_3R_317()) return true; + if (!jj_3R_619()) return false; + jj_scanpos = xsp; + if (jj_3R_620()) return true; return false; } - inline bool jj_3R_162() + inline bool jj_3R_73() { if (jj_done) return true; - if (jj_3R_327()) return true; + if (jj_scan_token(GENERIC_T)) return true; + if (jj_scan_token(MAP_T)) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_169()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3_39() + inline bool jj_3R_542() { if (jj_done) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; + if (jj_scan_token(WITH_T)) return true; + if (jj_3R_61()) return true; + if (jj_scan_token(SELECT_T)) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_scan_token(155)) jj_scanpos = xsp; + if (jj_3R_663()) return true; + if (jj_scan_token(VARASSIGN_T)) return true; + if (jj_3R_317()) return true; return false; } @@ -2205,17 +2182,6 @@ void parseInline(); return false; } - inline bool jj_3R_69() - { - if (jj_done) return true; - if (jj_scan_token(GENERIC_T)) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_162()) return true; - if (jj_scan_token(RPAREN_T)) return true; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_280() { if (jj_done) return true; @@ -2241,28 +2207,29 @@ void parseInline(); return false; } - inline bool jj_3R_336() + inline bool jj_3R_162() { if (jj_done) return true; - if (jj_scan_token(IF_T)) return true; + if (jj_3R_327()) return true; return false; } - inline bool jj_3R_174() + inline bool jj_3_39() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_335()) return false; - jj_scanpos = xsp; - if (jj_3R_336()) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; return false; } - inline bool jj_3R_335() + inline bool jj_3R_69() { if (jj_done) return true; - if (jj_scan_token(FOR_T)) return true; + if (jj_scan_token(GENERIC_T)) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_162()) return true; + if (jj_scan_token(RPAREN_T)) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } @@ -2290,40 +2257,46 @@ void parseInline(); return false; } - inline bool jj_3R_545() + inline bool jj_3R_336() + { + if (jj_done) return true; + if (jj_scan_token(IF_T)) return true; + return false; + } + + inline bool jj_3R_174() { if (jj_done) return true; - if (jj_scan_token(ELSE_T)) return true; - if (jj_3R_61()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_587()) jj_scanpos = xsp; + if (!jj_3R_335()) return false; + jj_scanpos = xsp; + if (jj_3R_336()) return true; return false; } - inline bool jj_3R_78() + inline bool jj_3R_335() { if (jj_done) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_174()) return true; + if (jj_scan_token(FOR_T)) return true; return false; } - inline bool jj_3_122() + inline bool jj_3R_545() { if (jj_done) return true; - if (jj_3R_149()) return true; + if (jj_scan_token(ELSE_T)) return true; + if (jj_3R_61()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_587()) jj_scanpos = xsp; return false; } - inline bool jj_3R_110() + inline bool jj_3_122() { if (jj_done) return true; - if (jj_3R_63()) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_236()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_3R_149()) return true; return false; } @@ -2344,6 +2317,15 @@ void parseInline(); return false; } + inline bool jj_3R_78() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_174()) return true; + return false; + } + inline bool jj_3R_278() { if (jj_done) return true; @@ -2369,18 +2351,21 @@ void parseInline(); return false; } - inline bool jj_3R_570() + inline bool jj_3R_110() { if (jj_done) return true; - if (jj_scan_token(AT_T)) return true; if (jj_3R_63()) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_236()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_481() + inline bool jj_3R_570() { if (jj_done) return true; - if (jj_3R_549()) return true; + if (jj_scan_token(AT_T)) return true; + if (jj_3R_63()) return true; return false; } @@ -2413,26 +2398,17 @@ void parseInline(); return false; } - inline bool jj_3R_624() - { - if (jj_done) return true; - if (jj_3R_147()) return true; - return false; - } - - inline bool jj_3R_592() + inline bool jj_3R_481() { if (jj_done) return true; - if (jj_3R_399()) return true; + if (jj_3R_549()) return true; return false; } - inline bool jj_3R_160() + inline bool jj_3R_624() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_326()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_3R_147()) return true; return false; } @@ -2446,17 +2422,6 @@ void parseInline(); return false; } - inline bool jj_3R_142() - { - if (jj_done) return true; - if (jj_scan_token(TYPE_T)) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(IS_T)) return true; - if (jj_3R_588()) return true; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_647() { if (jj_done) return true; @@ -2477,46 +2442,49 @@ void parseInline(); return false; } - inline bool jj_3R_66() + inline bool jj_3R_592() { if (jj_done) return true; - if (jj_3R_63()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_160()) jj_scanpos = xsp; + if (jj_3R_399()) return true; return false; } - inline bool jj_3_119() + inline bool jj_3R_160() { if (jj_done) return true; - if (jj_scan_token(DOT_T)) return true; - if (jj_3R_147()) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_326()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_569() + inline bool jj_3_119() { if (jj_done) return true; - if (jj_3R_623()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_624()) jj_scanpos = xsp; - if (jj_3R_74()) return true; + if (jj_scan_token(DOT_T)) return true; + if (jj_3R_147()) return true; return false; } - inline bool jj_3R_582() + inline bool jj_3R_142() { if (jj_done) return true; - if (jj_3R_327()) return true; + if (jj_scan_token(TYPE_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(IS_T)) return true; + if (jj_3R_588()) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_413() + inline bool jj_3R_569() { if (jj_done) return true; - if (jj_scan_token(INTEGER)) return true; + if (jj_3R_623()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_624()) jj_scanpos = xsp; + if (jj_3R_74()) return true; return false; } @@ -2528,21 +2496,13 @@ void parseInline(); return false; } - inline bool jj_3R_326() + inline bool jj_3R_66() { if (jj_done) return true; + if (jj_3R_63()) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_412()) return false; - jj_scanpos = xsp; - if (jj_3R_413()) return true; - return false; - } - - inline bool jj_3R_412() - { - if (jj_done) return true; - if (jj_3R_63()) return true; + if (jj_3R_160()) jj_scanpos = xsp; return false; } @@ -2566,6 +2526,13 @@ void parseInline(); return false; } + inline bool jj_3R_582() + { + if (jj_done) return true; + if (jj_3R_327()) return true; + return false; + } + inline bool jj_3R_512() { if (jj_done) return true; @@ -2580,6 +2547,13 @@ void parseInline(); return false; } + inline bool jj_3R_413() + { + if (jj_done) return true; + if (jj_scan_token(INTEGER)) return true; + return false; + } + inline bool jj_3R_411() { if (jj_done) return true; @@ -2600,41 +2574,42 @@ void parseInline(); return false; } - inline bool jj_3R_189() + inline bool jj_3R_326() { if (jj_done) return true; - if (jj_3R_74()) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_412()) return false; + jj_scanpos = xsp; + if (jj_3R_413()) return true; return false; } - inline bool jj_3R_509() + inline bool jj_3R_412() { if (jj_done) return true; - if (jj_scan_token(VARIABLE_T)) return true; + if (jj_3R_63()) return true; return false; } - inline bool jj_3R_659() + inline bool jj_3R_189() { if (jj_done) return true; - if (jj_scan_token(FILE_T)) return true; - if (jj_scan_token(OF_T)) return true; - if (jj_3R_161()) return true; + if (jj_3R_74()) return true; return false; } - inline bool jj_3R_508() + inline bool jj_3R_509() { if (jj_done) return true; - if (jj_scan_token(SIGNAL_T)) return true; + if (jj_scan_token(VARIABLE_T)) return true; return false; } - inline bool jj_3R_591() + inline bool jj_3R_508() { if (jj_done) return true; - if (jj_scan_token(OPEN_T)) return true; - if (jj_3R_61()) return true; + if (jj_scan_token(SIGNAL_T)) return true; return false; } @@ -2658,22 +2633,19 @@ void parseInline(); return false; } - inline bool jj_3R_549() + inline bool jj_3R_659() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_591()) jj_scanpos = xsp; - if (jj_scan_token(IS_T)) return true; - xsp = jj_scanpos; - if (jj_3R_592()) jj_scanpos = xsp; - if (jj_3R_593()) return true; + if (jj_scan_token(FILE_T)) return true; + if (jj_scan_token(OF_T)) return true; + if (jj_3R_161()) return true; return false; } - inline bool jj_3R_593() + inline bool jj_3R_591() { if (jj_done) return true; + if (jj_scan_token(OPEN_T)) return true; if (jj_3R_61()) return true; return false; } @@ -2693,6 +2665,19 @@ void parseInline(); return false; } + inline bool jj_3R_549() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_591()) jj_scanpos = xsp; + if (jj_scan_token(IS_T)) return true; + xsp = jj_scanpos; + if (jj_3R_592()) jj_scanpos = xsp; + if (jj_3R_593()) return true; + return false; + } + inline bool jj_3R_323() { if (jj_done) return true; @@ -2713,6 +2698,27 @@ void parseInline(); return false; } + inline bool jj_3R_593() + { + if (jj_done) return true; + if (jj_3R_61()) return true; + return false; + } + + inline bool jj_3R_284() + { + if (jj_done) return true; + if (jj_3R_137()) return true; + return false; + } + + inline bool jj_3_116() + { + if (jj_done) return true; + if (jj_3R_146()) return true; + return false; + } + inline bool jj_3R_467() { if (jj_done) return true; @@ -2735,13 +2741,6 @@ void parseInline(); return false; } - inline bool jj_3R_284() - { - if (jj_done) return true; - if (jj_3R_137()) return true; - return false; - } - inline bool jj_3R_273() { if (jj_done) return true; @@ -2749,13 +2748,6 @@ void parseInline(); return false; } - inline bool jj_3_116() - { - if (jj_done) return true; - if (jj_3R_146()) return true; - return false; - } - inline bool jj_3R_295() { if (jj_done) return true; @@ -2788,6 +2780,13 @@ void parseInline(); return false; } + inline bool jj_3R_296() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + return false; + } + inline bool jj_3R_141() { if (jj_done) return true; @@ -2815,6 +2814,21 @@ void parseInline(); return false; } + inline bool jj_3R_246() + { + if (jj_done) return true; + if (jj_3R_137()) return true; + return false; + } + + inline bool jj_3_115() + { + if (jj_done) return true; + if (jj_3R_145()) return true; + if (jj_scan_token(COLON_T)) return true; + return false; + } + inline bool jj_3R_251() { if (jj_done) return true; @@ -2831,17 +2845,28 @@ void parseInline(); return false; } - inline bool jj_3R_296() + inline bool jj_3R_409() { if (jj_done) return true; - if (jj_3R_74()) return true; + if (jj_scan_token(OR_T)) return true; + return false; + } + + inline bool jj_3R_144() + { + if (jj_done) return true; + if (jj_scan_token(END_T)) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_296()) jj_scanpos = xsp; + if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_409() + inline bool jj_3R_648() { if (jj_done) return true; - if (jj_scan_token(OR_T)) return true; + if (jj_3R_137()) return true; return false; } @@ -2852,17 +2877,17 @@ void parseInline(); return false; } - inline bool jj_3R_407() + inline bool jj_3R_188() { if (jj_done) return true; - if (jj_scan_token(XNOR_T)) return true; + if (jj_3R_349()) return true; return false; } - inline bool jj_3R_246() + inline bool jj_3R_407() { if (jj_done) return true; - if (jj_3R_137()) return true; + if (jj_scan_token(XNOR_T)) return true; return false; } @@ -2873,14 +2898,6 @@ void parseInline(); return false; } - inline bool jj_3_115() - { - if (jj_done) return true; - if (jj_3R_145()) return true; - if (jj_scan_token(COLON_T)) return true; - return false; - } - inline bool jj_3R_405() { if (jj_done) return true; @@ -2914,31 +2931,6 @@ void parseInline(); return false; } - inline bool jj_3R_144() - { - if (jj_done) return true; - if (jj_scan_token(END_T)) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_296()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - - inline bool jj_3R_648() - { - if (jj_done) return true; - if (jj_3R_137()) return true; - return false; - } - - inline bool jj_3R_188() - { - if (jj_done) return true; - if (jj_3R_349()) return true; - return false; - } - inline bool jj_3R_61() { if (jj_done) return true; @@ -2967,6 +2959,16 @@ void parseInline(); return false; } + inline bool jj_3R_136() + { + if (jj_done) return true; + if (jj_scan_token(GENERIC_T)) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_327()) return true; + if (jj_scan_token(RPAREN_T)) return true; + return false; + } + inline bool jj_3R_129() { if (jj_done) return true; @@ -2996,12 +2998,13 @@ void parseInline(); return false; } - inline bool jj_3R_136() + inline bool jj_3R_137() { if (jj_done) return true; if (jj_scan_token(GENERIC_T)) return true; + if (jj_scan_token(MAP_T)) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_327()) return true; + if (jj_3R_169()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -3031,21 +3034,26 @@ void parseInline(); return false; } - inline bool jj_3R_137() + inline bool jj_3R_685() { if (jj_done) return true; - if (jj_scan_token(GENERIC_T)) return true; - if (jj_scan_token(MAP_T)) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_169()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_3R_369()) return true; return false; } - inline bool jj_3R_685() + inline bool jj_3R_135() { if (jj_done) return true; - if (jj_3R_369()) return true; + if (jj_scan_token(FUNCTION_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(IS_T)) return true; + if (jj_scan_token(NEW_T)) return true; + if (jj_3R_63()) return true; + if (jj_3R_245()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_284()) jj_scanpos = xsp; + if (jj_scan_token(SEMI_T)) return true; return false; } @@ -3089,22 +3097,6 @@ void parseInline(); return false; } - inline bool jj_3R_135() - { - if (jj_done) return true; - if (jj_scan_token(FUNCTION_T)) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(IS_T)) return true; - if (jj_scan_token(NEW_T)) return true; - if (jj_3R_63()) return true; - if (jj_3R_245()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_284()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_95() { if (jj_done) return true; @@ -3127,22 +3119,6 @@ void parseInline(); return false; } - inline bool jj_3R_488() - { - if (jj_done) return true; - if (jj_3R_554()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_555()) return true; - return false; - } - - inline bool jj_3R_662() - { - if (jj_done) return true; - if (jj_3R_245()) return true; - return false; - } - inline bool jj_3R_91() { if (jj_done) return true; @@ -3166,13 +3142,6 @@ void parseInline(); return false; } - inline bool jj_3R_597() - { - if (jj_done) return true; - if (jj_scan_token(ALL_T)) return true; - return false; - } - inline bool jj_3R_437() { if (jj_done) return true; @@ -3180,10 +3149,12 @@ void parseInline(); return false; } - inline bool jj_3R_596() + inline bool jj_3R_488() { if (jj_done) return true; - if (jj_scan_token(OTHER_T)) return true; + if (jj_3R_554()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_555()) return true; return false; } @@ -3207,6 +3178,27 @@ void parseInline(); return false; } + inline bool jj_3R_662() + { + if (jj_done) return true; + if (jj_3R_245()) return true; + return false; + } + + inline bool jj_3R_597() + { + if (jj_done) return true; + if (jj_scan_token(ALL_T)) return true; + return false; + } + + inline bool jj_3R_596() + { + if (jj_done) return true; + if (jj_scan_token(OTHER_T)) return true; + return false; + } + inline bool jj_3R_595() { if (jj_done) return true; @@ -3259,16 +3251,6 @@ void parseInline(); return false; } - inline bool jj_3R_644() - { - if (jj_done) return true; - if (jj_3R_661()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_662()) jj_scanpos = xsp; - return false; - } - inline bool jj_3R_263() { if (jj_done) return true; @@ -3290,6 +3272,16 @@ void parseInline(); return false; } + inline bool jj_3R_644() + { + if (jj_done) return true; + if (jj_3R_661()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_662()) jj_scanpos = xsp; + return false; + } + inline bool jj_3R_692() { if (jj_done) return true; @@ -3309,66 +3301,66 @@ void parseInline(); return false; } - inline bool jj_3_36() + inline bool jj_3R_720() { if (jj_done) return true; - if (jj_3R_91()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3_34() + inline bool jj_3R_719() { if (jj_done) return true; - if (jj_3R_67()) return true; + if (jj_3R_395()) return true; return false; } - inline bool jj_3R_720() + inline bool jj_3R_718() { if (jj_done) return true; - if (jj_3R_347()) return true; + if (jj_3R_364()) return true; return false; } - inline bool jj_3R_719() + inline bool jj_3R_700() { if (jj_done) return true; - if (jj_3R_395()) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_718()) return false; + jj_scanpos = xsp; + if (!jj_3R_719()) return false; + jj_scanpos = xsp; + if (jj_3R_720()) return true; return false; } - inline bool jj_3_35() + inline bool jj_3_36() { if (jj_done) return true; - if (jj_3R_68()) return true; + if (jj_3R_91()) return true; return false; } - inline bool jj_3R_558() + inline bool jj_3_34() { if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_557()) return true; + if (jj_3R_67()) return true; return false; } - inline bool jj_3R_718() + inline bool jj_3_35() { if (jj_done) return true; - if (jj_3R_364()) return true; + if (jj_3R_68()) return true; return false; } - inline bool jj_3R_700() + inline bool jj_3R_558() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_718()) return false; - jj_scanpos = xsp; - if (!jj_3R_719()) return false; - jj_scanpos = xsp; - if (jj_3R_720()) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_557()) return true; return false; } @@ -3431,13 +3423,6 @@ void parseInline(); return false; } - inline bool jj_3R_618() - { - if (jj_done) return true; - if (jj_scan_token(BOX_T)) return true; - return false; - } - inline bool jj_3_113() { if (jj_done) return true; @@ -3466,25 +3451,24 @@ void parseInline(); return false; } - inline bool jj_3R_366() + inline bool jj_3R_713() { if (jj_done) return true; - if (jj_scan_token(ENTITY_T)) return true; - if (jj_3R_74()) return true; + if (jj_3R_393()) return true; return false; } - inline bool jj_3R_713() + inline bool jj_3R_712() { if (jj_done) return true; - if (jj_3R_393()) return true; + if (jj_3R_392()) return true; return false; } - inline bool jj_3R_712() + inline bool jj_3R_618() { if (jj_done) return true; - if (jj_3R_392()) return true; + if (jj_scan_token(BOX_T)) return true; return false; } @@ -3523,15 +3507,11 @@ void parseInline(); return false; } - inline bool jj_3R_491() + inline bool jj_3R_366() { if (jj_done) return true; - if (jj_3R_557()) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_558()) { jj_scanpos = xsp; break; } - } + if (jj_scan_token(ENTITY_T)) return true; + if (jj_3R_74()) return true; return false; } @@ -3575,10 +3555,45 @@ void parseInline(); return false; } - inline bool jj_3R_261() + inline bool jj_3R_261() + { + if (jj_done) return true; + if (jj_3R_380()) return true; + return false; + } + + inline bool jj_3R_491() + { + if (jj_done) return true; + if (jj_3R_557()) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_558()) { jj_scanpos = xsp; break; } + } + return false; + } + + inline bool jj_3R_544() { if (jj_done) return true; - if (jj_3R_380()) return true; + if (jj_scan_token(AFTER_T)) return true; + if (jj_3R_61()) return true; + return false; + } + + inline bool jj_3R_143() + { + if (jj_done) return true; + if (jj_scan_token(PROTECTED_T)) return true; + if (jj_scan_token(BODY_T)) return true; + if (jj_3R_680()) return true; + if (jj_scan_token(END_T)) return true; + if (jj_scan_token(PROTECTED_T)) return true; + if (jj_scan_token(BODY_T)) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_681()) jj_scanpos = xsp; return false; } @@ -3592,6 +3607,14 @@ void parseInline(); return false; } + inline bool jj_3R_519() + { + if (jj_done) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_463()) return true; + return false; + } + inline bool jj_3R_626() { if (jj_done) return true; @@ -3608,14 +3631,6 @@ void parseInline(); return false; } - inline bool jj_3R_544() - { - if (jj_done) return true; - if (jj_scan_token(AFTER_T)) return true; - if (jj_3R_61()) return true; - return false; - } - inline bool jj_3R_613() { if (jj_done) return true; @@ -3637,21 +3652,6 @@ void parseInline(); return false; } - inline bool jj_3R_143() - { - if (jj_done) return true; - if (jj_scan_token(PROTECTED_T)) return true; - if (jj_scan_token(BODY_T)) return true; - if (jj_3R_680()) return true; - if (jj_scan_token(END_T)) return true; - if (jj_scan_token(PROTECTED_T)) return true; - if (jj_scan_token(BODY_T)) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_681()) jj_scanpos = xsp; - return false; - } - inline bool jj_3R_610() { if (jj_done) return true; @@ -3659,14 +3659,6 @@ void parseInline(); return false; } - inline bool jj_3R_519() - { - if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_463()) return true; - return false; - } - inline bool jj_3R_609() { if (jj_done) return true; @@ -3702,6 +3694,16 @@ void parseInline(); return false; } + inline bool jj_3R_463() + { + if (jj_done) return true; + if (jj_3R_61()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_544()) jj_scanpos = xsp; + return false; + } + inline bool jj_3R_604() { if (jj_done) return true; @@ -3744,13 +3746,10 @@ void parseInline(); return false; } - inline bool jj_3R_463() + inline bool jj_3R_422() { if (jj_done) return true; - if (jj_3R_61()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_544()) jj_scanpos = xsp; + if (jj_scan_token(UNAFFECTED_T)) return true; return false; } @@ -3802,25 +3801,41 @@ void parseInline(); return false; } - inline bool jj_3R_576() + inline bool jj_3R_332() { if (jj_done) return true; - if (jj_scan_token(OPEN_T)) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_421()) return false; + jj_scanpos = xsp; + if (jj_3R_422()) return true; return false; } - inline bool jj_3R_575() + inline bool jj_3R_421() { if (jj_done) return true; - if (jj_scan_token(CONFIGURATION_T)) return true; - if (jj_3R_63()) return true; + if (jj_3R_463()) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_519()) { jj_scanpos = xsp; break; } + } return false; } - inline bool jj_3R_422() + inline bool jj_3R_576() { if (jj_done) return true; - if (jj_scan_token(UNAFFECTED_T)) return true; + if (jj_scan_token(OPEN_T)) return true; + return false; + } + + inline bool jj_3R_575() + { + if (jj_done) return true; + if (jj_scan_token(CONFIGURATION_T)) return true; + if (jj_3R_63()) return true; return false; } @@ -3848,29 +3863,6 @@ void parseInline(); return false; } - inline bool jj_3R_332() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_421()) return false; - jj_scanpos = xsp; - if (jj_3R_422()) return true; - return false; - } - - inline bool jj_3R_421() - { - if (jj_done) return true; - if (jj_3R_463()) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_519()) { jj_scanpos = xsp; break; } - } - return false; - } - inline bool jj_3R_260() { if (jj_done) return true; @@ -3896,14 +3888,6 @@ void parseInline(); return false; } - inline bool jj_3_33() - { - if (jj_done) return true; - if (jj_3R_90()) return true; - if (jj_scan_token(ARROW_T)) return true; - return false; - } - inline bool jj_3R_705() { if (jj_done) return true; @@ -3914,10 +3898,11 @@ void parseInline(); return false; } - inline bool jj_3_32() + inline bool jj_3_33() { if (jj_done) return true; - if (jj_3R_89()) return true; + if (jj_3R_90()) return true; + if (jj_scan_token(ARROW_T)) return true; return false; } @@ -3929,73 +3914,46 @@ void parseInline(); return false; } - inline bool jj_3_31() + inline bool jj_3_32() { if (jj_done) return true; - if (jj_3R_88()) return true; + if (jj_3R_89()) return true; return false; } - inline bool jj_3R_376() + inline bool jj_3_31() { if (jj_done) return true; - if (jj_3R_90()) return true; - if (jj_scan_token(ARROW_T)) return true; + if (jj_3R_88()) return true; return false; } - inline bool jj_3R_247() + inline bool jj_3R_480() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_376()) jj_scanpos = xsp; + if (jj_scan_token(VARASSIGN_T)) return true; if (jj_3R_61()) return true; return false; } - inline bool jj_3R_168() - { - if (jj_done) return true; - if (jj_3R_89()) return true; - return false; - } - - inline bool jj_3R_167() + inline bool jj_3R_376() { if (jj_done) return true; - if (jj_3R_88()) return true; + if (jj_3R_90()) return true; + if (jj_scan_token(ARROW_T)) return true; return false; } - inline bool jj_3R_72() + inline bool jj_3R_247() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_167()) return false; - jj_scanpos = xsp; - if (jj_3R_168()) return true; - return false; - } - - inline bool jj_3R_480() - { - if (jj_done) return true; - if (jj_scan_token(VARASSIGN_T)) return true; + if (jj_3R_376()) jj_scanpos = xsp; if (jj_3R_61()) return true; return false; } - inline bool jj_3R_489() - { - if (jj_done) return true; - if (jj_3R_556()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_63()) return true; - return false; - } - inline bool jj_3R_391() { if (jj_done) return true; @@ -4012,11 +3970,10 @@ void parseInline(); return false; } - inline bool jj_3R_490() + inline bool jj_3R_168() { if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_434()) return true; + if (jj_3R_89()) return true; return false; } @@ -4027,29 +3984,29 @@ void parseInline(); return false; } - inline bool jj_3R_397() + inline bool jj_3R_167() { if (jj_done) return true; - if (jj_scan_token(DISCONNECT_T)) return true; - if (jj_3R_489()) return true; - if (jj_scan_token(AFTER_T)) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(SEMI_T)) return true; + if (jj_3R_88()) return true; return false; } - inline bool jj_3_111() + inline bool jj_3R_72() { if (jj_done) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_167()) return false; + jj_scanpos = xsp; + if (jj_3R_168()) return true; return false; } - inline bool jj_3R_166() + inline bool jj_3_111() { if (jj_done) return true; - if (jj_scan_token(DOWNTO_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; return false; } @@ -4077,6 +4034,41 @@ void parseInline(); return false; } + inline bool jj_3R_490() + { + if (jj_done) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_434()) return true; + return false; + } + + inline bool jj_3R_489() + { + if (jj_done) return true; + if (jj_3R_556()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_63()) return true; + return false; + } + + inline bool jj_3R_397() + { + if (jj_done) return true; + if (jj_scan_token(DISCONNECT_T)) return true; + if (jj_3R_489()) return true; + if (jj_scan_token(AFTER_T)) return true; + if (jj_3R_61()) return true; + if (jj_scan_token(SEMI_T)) return true; + return false; + } + + inline bool jj_3R_166() + { + if (jj_done) return true; + if (jj_scan_token(DOWNTO_T)) return true; + return false; + } + inline bool jj_3R_477() { if (jj_done) return true; @@ -4142,18 +4134,35 @@ void parseInline(); return false; } - inline bool jj_3R_573() + inline bool jj_3_106() { if (jj_done) return true; - if (jj_scan_token(REJECT_T)) return true; - if (jj_3R_61()) return true; + if (jj_3R_139()) return true; return false; } - inline bool jj_3_106() + inline bool jj_3R_704() { if (jj_done) return true; - if (jj_3R_139()) return true; + if (jj_scan_token(ARRAY_T)) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_722()) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_723()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(RPAREN_T)) return true; + if (jj_scan_token(OF_T)) return true; + if (jj_3R_89()) return true; + return false; + } + + inline bool jj_3R_573() + { + if (jj_done) return true; + if (jj_scan_token(REJECT_T)) return true; + if (jj_3R_61()) return true; return false; } @@ -4167,20 +4176,10 @@ void parseInline(); return false; } - inline bool jj_3R_704() + inline bool jj_3R_161() { if (jj_done) return true; - if (jj_scan_token(ARRAY_T)) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_722()) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_723()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(RPAREN_T)) return true; - if (jj_scan_token(OF_T)) return true; - if (jj_3R_89()) return true; + if (jj_3R_63()) return true; return false; } @@ -4209,10 +4208,17 @@ void parseInline(); return false; } - inline bool jj_3R_161() + inline bool jj_3R_193() { if (jj_done) return true; - if (jj_3R_63()) return true; + if (jj_3R_139()) return true; + return false; + } + + inline bool jj_3R_643() + { + if (jj_done) return true; + if (jj_3R_660()) return true; return false; } @@ -4223,52 +4229,52 @@ void parseInline(); return false; } - inline bool jj_3R_193() + inline bool jj_3_110() { if (jj_done) return true; - if (jj_3R_139()) return true; + if (jj_3R_143()) return true; return false; } - inline bool jj_3R_643() + inline bool jj_3R_642() { if (jj_done) return true; - if (jj_3R_660()) return true; + if (jj_3R_659()) return true; return false; } - inline bool jj_3R_187() + inline bool jj_3R_641() { if (jj_done) return true; - if (jj_3R_348()) return true; + if (jj_3R_658()) return true; return false; } - inline bool jj_3_28() + inline bool jj_3R_640() { if (jj_done) return true; - if (jj_3R_86()) return true; + if (jj_3R_657()) return true; return false; } - inline bool jj_3R_186() + inline bool jj_3R_187() { if (jj_done) return true; - if (jj_3R_87()) return true; + if (jj_3R_348()) return true; return false; } - inline bool jj_3_110() + inline bool jj_3_28() { if (jj_done) return true; - if (jj_3R_143()) return true; + if (jj_3R_86()) return true; return false; } - inline bool jj_3R_642() + inline bool jj_3R_186() { if (jj_done) return true; - if (jj_3R_659()) return true; + if (jj_3R_87()) return true; return false; } @@ -4279,17 +4285,29 @@ void parseInline(); return false; } - inline bool jj_3R_641() + inline bool jj_3R_639() { if (jj_done) return true; - if (jj_3R_658()) return true; + if (jj_3R_656()) return true; return false; } - inline bool jj_3R_640() + inline bool jj_3R_588() { if (jj_done) return true; - if (jj_3R_657()) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_639()) return false; + jj_scanpos = xsp; + if (!jj_3R_640()) return false; + jj_scanpos = xsp; + if (!jj_3R_641()) return false; + jj_scanpos = xsp; + if (!jj_3R_642()) return false; + jj_scanpos = xsp; + if (!jj_3_110()) return false; + jj_scanpos = xsp; + if (jj_3R_643()) return true; return false; } @@ -4315,36 +4333,24 @@ void parseInline(); return false; } - inline bool jj_3R_639() + inline bool jj_3R_192() { if (jj_done) return true; - if (jj_3R_656()) return true; + if (jj_3R_63()) return true; return false; } - inline bool jj_3R_588() + inline bool jj_3R_286() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_639()) return false; - jj_scanpos = xsp; - if (!jj_3R_640()) return false; - jj_scanpos = xsp; - if (!jj_3R_641()) return false; - jj_scanpos = xsp; - if (!jj_3R_642()) return false; - jj_scanpos = xsp; - if (!jj_3_110()) return false; - jj_scanpos = xsp; - if (jj_3R_643()) return true; + if (jj_3R_65()) return true; return false; } - inline bool jj_3R_286() + inline bool jj_3R_476() { if (jj_done) return true; - if (jj_3R_65()) return true; + if (jj_3R_547()) return true; return false; } @@ -4366,20 +4372,6 @@ void parseInline(); return false; } - inline bool jj_3R_192() - { - if (jj_done) return true; - if (jj_3R_63()) return true; - return false; - } - - inline bool jj_3R_476() - { - if (jj_done) return true; - if (jj_3R_547()) return true; - return false; - } - inline bool jj_3_109() { if (jj_done) return true; @@ -4398,13 +4390,6 @@ void parseInline(); return false; } - inline bool jj_3_27() - { - if (jj_done) return true; - if (jj_3R_85()) return true; - return false; - } - inline bool jj_3R_111() { if (jj_done) return true; @@ -4423,13 +4408,10 @@ void parseInline(); return false; } - inline bool jj_3R_703() + inline bool jj_3_27() { if (jj_done) return true; - if (jj_scan_token(ARRAY_T)) return true; - if (jj_3R_65()) return true; - if (jj_scan_token(OF_T)) return true; - if (jj_3R_89()) return true; + if (jj_3R_85()) return true; return false; } @@ -4441,6 +4423,16 @@ void parseInline(); return false; } + inline bool jj_3R_703() + { + if (jj_done) return true; + if (jj_scan_token(ARRAY_T)) return true; + if (jj_3R_65()) return true; + if (jj_scan_token(OF_T)) return true; + if (jj_3R_89()) return true; + return false; + } + inline bool jj_3R_134() { if (jj_done) return true; @@ -4453,20 +4445,6 @@ void parseInline(); return false; } - inline bool jj_3R_389() - { - if (jj_done) return true; - if (jj_scan_token(CONSTANT_T)) return true; - if (jj_3R_205()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_89()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_477()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_256() { if (jj_done) return true; @@ -4499,10 +4477,17 @@ void parseInline(); return false; } - inline bool jj_3_26() + inline bool jj_3R_389() { if (jj_done) return true; - if (jj_3R_84()) return true; + if (jj_scan_token(CONSTANT_T)) return true; + if (jj_3R_205()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_89()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_477()) jj_scanpos = xsp; + if (jj_scan_token(SEMI_T)) return true; return false; } @@ -4513,20 +4498,17 @@ void parseInline(); return false; } - inline bool jj_3R_396() + inline bool jj_3R_227() { if (jj_done) return true; - if (jj_scan_token(FOR_T)) return true; - if (jj_3R_181()) return true; - if (jj_3R_344()) return true; - if (jj_scan_token(SEMI_T)) return true; + if (jj_3R_321()) return true; return false; } - inline bool jj_3R_227() + inline bool jj_3_26() { if (jj_done) return true; - if (jj_3R_321()) return true; + if (jj_3R_84()) return true; return false; } @@ -4537,10 +4519,13 @@ void parseInline(); return false; } - inline bool jj_3R_579() + inline bool jj_3R_396() { if (jj_done) return true; - if (jj_3R_345()) return true; + if (jj_scan_token(FOR_T)) return true; + if (jj_3R_181()) return true; + if (jj_3R_344()) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } @@ -4566,21 +4551,10 @@ void parseInline(); return false; } - inline bool jj_3R_578() - { - if (jj_done) return true; - if (jj_3R_84()) return true; - return false; - } - - inline bool jj_3R_523() + inline bool jj_3R_579() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_578()) return false; - jj_scanpos = xsp; - if (jj_3R_579()) return true; + if (jj_3R_345()) return true; return false; } @@ -4607,21 +4581,30 @@ void parseInline(); return false; } - inline bool jj_3R_138() + inline bool jj_3R_578() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_3R_84()) return true; return false; } - inline bool jj_3_25() + inline bool jj_3R_523() { if (jj_done) return true; - if (jj_scan_token(WHEN_T)) return true; - if (jj_3R_83()) return true; - if (jj_scan_token(ELSE_T)) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_578()) return false; + jj_scanpos = xsp; + if (jj_3R_579()) return true; + return false; + } + + inline bool jj_3R_138() + { + if (jj_done) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_61()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -4654,6 +4637,15 @@ void parseInline(); return false; } + inline bool jj_3_25() + { + if (jj_done) return true; + if (jj_scan_token(WHEN_T)) return true; + if (jj_3R_83()) return true; + if (jj_scan_token(ELSE_T)) return true; + return false; + } + inline bool jj_3R_367() { if (jj_done) return true; @@ -4670,22 +4662,22 @@ void parseInline(); return false; } - inline bool jj_3R_333() + inline bool jj_3R_539() { if (jj_done) return true; - if (jj_scan_token(WHEN_T)) return true; - if (jj_3R_83()) return true; - if (jj_scan_token(ELSE_T)) return true; - if (jj_3R_332()) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_582()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_539() + inline bool jj_3R_333() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_582()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_scan_token(WHEN_T)) return true; + if (jj_3R_83()) return true; + if (jj_scan_token(ELSE_T)) return true; + if (jj_3R_332()) return true; return false; } @@ -4703,17 +4695,6 @@ void parseInline(); return false; } - inline bool jj_3R_75() - { - if (jj_done) return true; - if (jj_3R_119()) return true; - if (jj_scan_token(LESSTHAN_T)) return true; - if (jj_3R_172()) return true; - if (jj_3R_173()) return true; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_538() { if (jj_done) return true; @@ -4725,6 +4706,17 @@ void parseInline(); return false; } + inline bool jj_3R_75() + { + if (jj_done) return true; + if (jj_3R_119()) return true; + if (jj_scan_token(LESSTHAN_T)) return true; + if (jj_3R_172()) return true; + if (jj_3R_173()) return true; + if (jj_scan_token(SEMI_T)) return true; + return false; + } + inline bool jj_3_104() { if (jj_done) return true; @@ -4785,20 +4777,6 @@ void parseInline(); return false; } - inline bool jj_3_23() - { - if (jj_done) return true; - if (jj_3R_81()) return true; - return false; - } - - inline bool jj_3_22() - { - if (jj_done) return true; - if (jj_3R_80()) return true; - return false; - } - inline bool jj_3R_364() { if (jj_done) return true; @@ -4826,23 +4804,17 @@ void parseInline(); return false; } - inline bool jj_3R_79() + inline bool jj_3_23() { if (jj_done) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; + if (jj_3R_81()) return true; return false; } - inline bool jj_3_21() + inline bool jj_3_22() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_79()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_scan_token(79)) jj_scanpos = xsp; - if (jj_scan_token(ASSERT_T)) return true; + if (jj_3R_80()) return true; return false; } @@ -4857,6 +4829,26 @@ void parseInline(); return false; } + inline bool jj_3R_79() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; + return false; + } + + inline bool jj_3_21() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_79()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_scan_token(79)) jj_scanpos = xsp; + if (jj_scan_token(ASSERT_T)) return true; + return false; + } + inline bool jj_3R_636() { if (jj_done) return true; @@ -4883,6 +4875,20 @@ void parseInline(); return false; } + inline bool jj_3_101() + { + if (jj_done) return true; + if (jj_3R_67()) return true; + return false; + } + + inline bool jj_3R_675() + { + if (jj_done) return true; + if (jj_3R_398()) return true; + return false; + } + inline bool jj_3_19() { if (jj_done) return true; @@ -4913,27 +4919,6 @@ void parseInline(); return false; } - inline bool jj_3_101() - { - if (jj_done) return true; - if (jj_3R_67()) return true; - return false; - } - - inline bool jj_3R_675() - { - if (jj_done) return true; - if (jj_3R_398()) return true; - return false; - } - - inline bool jj_3_20() - { - if (jj_done) return true; - if (jj_3R_78()) return true; - return false; - } - inline bool jj_3R_674() { if (jj_done) return true; @@ -4955,6 +4940,13 @@ void parseInline(); return false; } + inline bool jj_3_20() + { + if (jj_done) return true; + if (jj_3R_78()) return true; + return false; + } + inline bool jj_3R_672() { if (jj_done) return true; @@ -4976,13 +4968,6 @@ void parseInline(); return false; } - inline bool jj_3_17() - { - if (jj_done) return true; - if (jj_3R_75()) return true; - return false; - } - inline bool jj_3R_669() { if (jj_done) return true; @@ -5018,17 +5003,17 @@ void parseInline(); return false; } - inline bool jj_3R_665() + inline bool jj_3_17() { if (jj_done) return true; - if (jj_3R_387()) return true; + if (jj_3R_75()) return true; return false; } - inline bool jj_3R_176() + inline bool jj_3R_665() { if (jj_done) return true; - if (jj_3R_337()) return true; + if (jj_3R_387()) return true; return false; } @@ -5072,18 +5057,10 @@ void parseInline(); return false; } - inline bool jj_3R_175() - { - if (jj_done) return true; - if (jj_3R_75()) return true; - return false; - } - - inline bool jj_3_16() + inline bool jj_3R_176() { if (jj_done) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; + if (jj_3R_337()) return true; return false; } @@ -5095,21 +5072,6 @@ void parseInline(); return false; } - inline bool jj_3R_80() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3_16()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_scan_token(79)) jj_scanpos = xsp; - xsp = jj_scanpos; - if (!jj_3R_175()) return false; - jj_scanpos = xsp; - if (jj_3R_176()) return true; - return false; - } - inline bool jj_3_100() { if (jj_done) return true; @@ -5135,7 +5097,14 @@ void parseInline(); return false; } - inline bool jj_3_15() + inline bool jj_3R_175() + { + if (jj_done) return true; + if (jj_3R_75()) return true; + return false; + } + + inline bool jj_3_16() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -5143,20 +5112,22 @@ void parseInline(); return false; } - inline bool jj_3R_82() + inline bool jj_3R_80() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3_15()) jj_scanpos = xsp; + if (jj_3_16()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(79)) jj_scanpos = xsp; - if (jj_3R_180()) return true; - if (jj_scan_token(SEMI_T)) return true; + xsp = jj_scanpos; + if (!jj_3R_175()) return false; + jj_scanpos = xsp; + if (jj_3R_176()) return true; return false; } - inline bool jj_3_14() + inline bool jj_3_15() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -5164,13 +5135,6 @@ void parseInline(); return false; } - inline bool jj_3_13() - { - if (jj_done) return true; - if (jj_3R_73()) return true; - return false; - } - inline bool jj_3R_209() { if (jj_done) return true; @@ -5179,15 +5143,15 @@ void parseInline(); return false; } - inline bool jj_3R_92() + inline bool jj_3R_82() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3_14()) jj_scanpos = xsp; + if (jj_3_15()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(79)) jj_scanpos = xsp; - if (jj_3R_196()) return true; + if (jj_3R_180()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -5199,6 +5163,21 @@ void parseInline(); return false; } + inline bool jj_3_14() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; + return false; + } + + inline bool jj_3_13() + { + if (jj_done) return true; + if (jj_3R_73()) return true; + return false; + } + inline bool jj_3R_208() { if (jj_done) return true; @@ -5225,6 +5204,19 @@ void parseInline(); return false; } + inline bool jj_3R_92() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3_14()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_scan_token(79)) jj_scanpos = xsp; + if (jj_3R_196()) return true; + if (jj_scan_token(SEMI_T)) return true; + return false; + } + inline bool jj_3R_679() { if (jj_done) return true; @@ -5257,41 +5249,41 @@ void parseInline(); return false; } - inline bool jj_3R_178() + inline bool jj_3R_478() { if (jj_done) return true; - if (jj_3R_73()) return true; + if (jj_3R_548()) return true; return false; } - inline bool jj_3R_487() + inline bool jj_3R_178() { if (jj_done) return true; - if (jj_3R_74()) return true; + if (jj_3R_73()) return true; return false; } - inline bool jj_3R_478() + inline bool jj_3R_164() { if (jj_done) return true; - if (jj_3R_548()) return true; + if (jj_3R_133()) return true; + if (jj_3R_134()) return true; return false; } - inline bool jj_3R_181() + inline bool jj_3R_487() { if (jj_done) return true; - if (jj_3R_343()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_63()) return true; + if (jj_3R_74()) return true; return false; } - inline bool jj_3R_164() + inline bool jj_3R_181() { if (jj_done) return true; - if (jj_3R_133()) return true; - if (jj_3R_134()) return true; + if (jj_3R_343()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_63()) return true; return false; } @@ -5312,6 +5304,13 @@ void parseInline(); return false; } + inline bool jj_3R_373() + { + if (jj_done) return true; + if (jj_scan_token(STRINGLITERAL)) return true; + return false; + } + inline bool jj_3R_81() { if (jj_done) return true; @@ -5327,10 +5326,11 @@ void parseInline(); return false; } - inline bool jj_3R_373() + inline bool jj_3R_453() { if (jj_done) return true; - if (jj_scan_token(STRINGLITERAL)) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_63()) return true; return false; } @@ -5363,11 +5363,10 @@ void parseInline(); return false; } - inline bool jj_3R_453() + inline bool jj_3R_163() { if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_63()) return true; + if (jj_3R_328()) return true; return false; } @@ -5379,6 +5378,20 @@ void parseInline(); return false; } + inline bool jj_3R_70() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_163()) jj_scanpos = xsp; + if (jj_3R_134()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_164()) { jj_scanpos = xsp; break; } + } + return false; + } + inline bool jj_3R_394() { if (jj_done) return true; @@ -5399,24 +5412,19 @@ void parseInline(); return false; } - inline bool jj_3R_163() + inline bool jj_3R_375() { if (jj_done) return true; - if (jj_3R_328()) return true; + if (jj_scan_token(RETURN_T)) return true; + if (jj_3R_63()) return true; return false; } - inline bool jj_3R_70() + inline bool jj_3R_646() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_163()) jj_scanpos = xsp; - if (jj_3R_134()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_164()) { jj_scanpos = xsp; break; } - } + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_63()) return true; return false; } @@ -5436,22 +5444,6 @@ void parseInline(); return false; } - inline bool jj_3R_375() - { - if (jj_done) return true; - if (jj_scan_token(RETURN_T)) return true; - if (jj_3R_63()) return true; - return false; - } - - inline bool jj_3R_646() - { - if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_63()) return true; - return false; - } - inline bool jj_3R_374() { if (jj_done) return true; @@ -5464,25 +5456,6 @@ void parseInline(); return false; } - inline bool jj_3_12() - { - if (jj_done) return true; - if (jj_3R_72()) return true; - return false; - } - - inline bool jj_3R_90() - { - if (jj_done) return true; - if (jj_3R_194()) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_195()) { jj_scanpos = xsp; break; } - } - return false; - } - inline bool jj_3R_245() { if (jj_done) return true; @@ -5496,10 +5469,10 @@ void parseInline(); return false; } - inline bool jj_3_11() + inline bool jj_3_12() { if (jj_done) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } @@ -5510,10 +5483,15 @@ void parseInline(); return false; } - inline bool jj_3R_354() + inline bool jj_3R_90() { if (jj_done) return true; - if (jj_scan_token(OTHER_T)) return true; + if (jj_3R_194()) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_195()) { jj_scanpos = xsp; break; } + } return false; } @@ -5524,18 +5502,10 @@ void parseInline(); return false; } - inline bool jj_3_10() + inline bool jj_3_11() { if (jj_done) return true; if (jj_3R_70()) return true; - if (jj_3R_71()) return true; - return false; - } - - inline bool jj_3R_353() - { - if (jj_done) return true; - if (jj_3R_74()) return true; return false; } @@ -5564,6 +5534,13 @@ void parseInline(); return false; } + inline bool jj_3R_354() + { + if (jj_done) return true; + if (jj_scan_token(OTHER_T)) return true; + return false; + } + inline bool jj_3R_590() { if (jj_done) return true; @@ -5571,10 +5548,18 @@ void parseInline(); return false; } - inline bool jj_3R_352() + inline bool jj_3_10() { if (jj_done) return true; - if (jj_3R_72()) return true; + if (jj_3R_70()) return true; + if (jj_3R_71()) return true; + return false; + } + + inline bool jj_3R_353() + { + if (jj_done) return true; + if (jj_3R_74()) return true; return false; } @@ -5596,6 +5581,13 @@ void parseInline(); return false; } + inline bool jj_3R_352() + { + if (jj_done) return true; + if (jj_3R_72()) return true; + return false; + } + inline bool jj_3R_351() { if (jj_done) return true; @@ -5634,13 +5626,6 @@ void parseInline(); return false; } - inline bool jj_3R_369() - { - if (jj_done) return true; - if (jj_scan_token(CHARACTER_LITERAL)) return true; - return false; - } - inline bool jj_3R_390() { if (jj_done) return true; @@ -5657,13 +5642,10 @@ void parseInline(); return false; } - inline bool jj_3R_632() + inline bool jj_3R_369() { if (jj_done) return true; - if (jj_scan_token(WHEN_T)) return true; - if (jj_3R_90()) return true; - if (jj_scan_token(ARROW_T)) return true; - if (jj_3R_268()) return true; + if (jj_scan_token(CHARACTER_LITERAL)) return true; return false; } @@ -5674,17 +5656,20 @@ void parseInline(); return false; } - inline bool jj_3R_633() + inline bool jj_3_97() { if (jj_done) return true; - if (jj_3R_632()) return true; + if (jj_3R_131()) return true; return false; } - inline bool jj_3_97() + inline bool jj_3R_632() { if (jj_done) return true; - if (jj_3R_131()) return true; + if (jj_scan_token(WHEN_T)) return true; + if (jj_3R_90()) return true; + if (jj_scan_token(ARROW_T)) return true; + if (jj_3R_268()) return true; return false; } @@ -5695,6 +5680,13 @@ void parseInline(); return false; } + inline bool jj_3R_633() + { + if (jj_done) return true; + if (jj_3R_632()) return true; + return false; + } + inline bool jj_3_96() { if (jj_done) return true; @@ -5753,17 +5745,6 @@ void parseInline(); return false; } - inline bool jj_3R_265() - { - if (jj_done) return true; - if (jj_3R_74()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_scan_token(155)) jj_scanpos = xsp; - if (jj_scan_token(COLON_T)) return true; - return false; - } - inline bool jj_3R_417() { if (jj_done) return true; @@ -5771,28 +5752,6 @@ void parseInline(); return false; } - inline bool jj_3R_126() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_265()) jj_scanpos = xsp; - if (jj_scan_token(CASE_T)) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(IS_T)) return true; - if (jj_3R_632()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_633()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(END_T)) return true; - if (jj_scan_token(CASE_T)) return true; - xsp = jj_scanpos; - if (jj_3R_634()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - inline bool jj_3R_328() { if (jj_done) return true; @@ -5811,6 +5770,17 @@ void parseInline(); return false; } + inline bool jj_3R_265() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_scan_token(155)) jj_scanpos = xsp; + if (jj_scan_token(COLON_T)) return true; + return false; + } + inline bool jj_3R_567() { if (jj_done) return true; @@ -5825,6 +5795,28 @@ void parseInline(); return false; } + inline bool jj_3R_126() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_265()) jj_scanpos = xsp; + if (jj_scan_token(CASE_T)) return true; + if (jj_3R_61()) return true; + if (jj_scan_token(IS_T)) return true; + if (jj_3R_632()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_633()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(END_T)) return true; + if (jj_scan_token(CASE_T)) return true; + xsp = jj_scanpos; + if (jj_3R_634()) jj_scanpos = xsp; + if (jj_scan_token(SEMI_T)) return true; + return false; + } + inline bool jj_3R_565() { if (jj_done) return true; @@ -5872,6 +5864,16 @@ void parseInline(); return false; } + inline bool jj_3R_318() + { + if (jj_done) return true; + if (jj_3R_70()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_402()) jj_scanpos = xsp; + return false; + } + inline bool jj_3R_522() { if (jj_done) return true; @@ -5881,20 +5883,17 @@ void parseInline(); return false; } - inline bool jj_3R_318() + inline bool jj_3R_254() { if (jj_done) return true; - if (jj_3R_70()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_402()) jj_scanpos = xsp; + if (jj_3R_379()) return true; return false; } - inline bool jj_3R_254() + inline bool jj_3_95() { if (jj_done) return true; - if (jj_3R_379()) return true; + if (jj_3R_130()) return true; return false; } @@ -5905,10 +5904,10 @@ void parseInline(); return false; } - inline bool jj_3_95() + inline bool jj_3_94() { if (jj_done) return true; - if (jj_3R_130()) return true; + if (jj_3R_129()) return true; return false; } @@ -5922,13 +5921,6 @@ void parseInline(); return false; } - inline bool jj_3_94() - { - if (jj_done) return true; - if (jj_3R_129()) return true; - return false; - } - inline bool jj_3_93() { if (jj_done) return true; @@ -5983,20 +5975,6 @@ void parseInline(); return false; } - inline bool jj_3R_311() - { - if (jj_done) return true; - if (jj_3R_398()) return true; - return false; - } - - inline bool jj_3_7() - { - if (jj_done) return true; - if (jj_3R_67()) return true; - return false; - } - inline bool jj_3R_118() { if (jj_done) return true; @@ -6023,24 +6001,17 @@ void parseInline(); return false; } - inline bool jj_3_8() - { - if (jj_done) return true; - if (jj_3R_68()) return true; - return false; - } - - inline bool jj_3R_310() + inline bool jj_3R_311() { if (jj_done) return true; - if (jj_3R_347()) return true; + if (jj_3R_398()) return true; return false; } - inline bool jj_3R_309() + inline bool jj_3_7() { if (jj_done) return true; - if (jj_3R_397()) return true; + if (jj_3R_67()) return true; return false; } @@ -6051,52 +6022,52 @@ void parseInline(); return false; } - inline bool jj_3R_308() + inline bool jj_3_86() { if (jj_done) return true; - if (jj_3R_396()) return true; + if (jj_3R_121()) return true; return false; } - inline bool jj_3R_307() + inline bool jj_3_8() { if (jj_done) return true; - if (jj_3R_395()) return true; + if (jj_3R_68()) return true; return false; } - inline bool jj_3_86() + inline bool jj_3R_310() { if (jj_done) return true; - if (jj_3R_121()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3R_305() + inline bool jj_3R_309() { if (jj_done) return true; - if (jj_3R_394()) return true; + if (jj_3R_397()) return true; return false; } - inline bool jj_3R_306() + inline bool jj_3R_308() { if (jj_done) return true; - if (jj_3R_67()) return true; + if (jj_3R_396()) return true; return false; } - inline bool jj_3_85() + inline bool jj_3R_307() { if (jj_done) return true; - if (jj_3R_120()) return true; + if (jj_3R_395()) return true; return false; } - inline bool jj_3R_304() + inline bool jj_3_85() { if (jj_done) return true; - if (jj_3R_393()) return true; + if (jj_3R_120()) return true; return false; } @@ -6110,20 +6081,6 @@ void parseInline(); return false; } - inline bool jj_3R_303() - { - if (jj_done) return true; - if (jj_3R_392()) return true; - return false; - } - - inline bool jj_3R_302() - { - if (jj_done) return true; - if (jj_3R_391()) return true; - return false; - } - inline bool jj_3R_117() { if (jj_done) return true; @@ -6164,6 +6121,49 @@ void parseInline(); return false; } + inline bool jj_3R_305() + { + if (jj_done) return true; + if (jj_3R_394()) return true; + return false; + } + + inline bool jj_3R_306() + { + if (jj_done) return true; + if (jj_3R_67()) return true; + return false; + } + + inline bool jj_3R_304() + { + if (jj_done) return true; + if (jj_3R_393()) return true; + return false; + } + + inline bool jj_3R_524() + { + if (jj_done) return true; + if (jj_scan_token(COMMA_T)) return true; + if (jj_3R_63()) return true; + return false; + } + + inline bool jj_3R_303() + { + if (jj_done) return true; + if (jj_3R_392()) return true; + return false; + } + + inline bool jj_3R_302() + { + if (jj_done) return true; + if (jj_3R_391()) return true; + return false; + } + inline bool jj_3R_301() { if (jj_done) return true; @@ -6178,11 +6178,10 @@ void parseInline(); return false; } - inline bool jj_3R_524() + inline bool jj_3_83() { if (jj_done) return true; - if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_63()) return true; + if (jj_3R_117()) return true; return false; } @@ -6214,6 +6213,17 @@ void parseInline(); return false; } + inline bool jj_3R_268() + { + if (jj_done) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_83()) { jj_scanpos = xsp; break; } + } + return false; + } + inline bool jj_3R_146() { if (jj_done) return true; @@ -6260,21 +6270,33 @@ void parseInline(); return false; } - inline bool jj_3_83() + inline bool jj_3R_440() { if (jj_done) return true; - if (jj_3R_117()) return true; + if (jj_3R_63()) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_524()) { jj_scanpos = xsp; break; } + } return false; } - inline bool jj_3R_268() + inline bool jj_3R_357() { if (jj_done) return true; Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_83()) { jj_scanpos = xsp; break; } - } + xsp = jj_scanpos; + if (!jj_3R_439()) return false; + jj_scanpos = xsp; + if (jj_3R_440()) return true; + return false; + } + + inline bool jj_3R_439() + { + if (jj_done) return true; + if (jj_scan_token(ALL_T)) return true; return false; } @@ -6307,36 +6329,6 @@ void parseInline(); return false; } - inline bool jj_3R_440() - { - if (jj_done) return true; - if (jj_3R_63()) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_524()) { jj_scanpos = xsp; break; } - } - return false; - } - - inline bool jj_3R_357() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_439()) return false; - jj_scanpos = xsp; - if (jj_3R_440()) return true; - return false; - } - - inline bool jj_3R_439() - { - if (jj_done) return true; - if (jj_scan_token(ALL_T)) return true; - return false; - } - inline bool jj_3R_276() { if (jj_done) return true; @@ -6344,13 +6336,6 @@ void parseInline(); return false; } - inline bool jj_3R_100() - { - if (jj_done) return true; - if (jj_scan_token(BIT_STRING_LITERAL)) return true; - return false; - } - inline bool jj_3R_380() { if (jj_done) return true; @@ -6359,17 +6344,10 @@ void parseInline(); return false; } - inline bool jj_3R_430() - { - if (jj_done) return true; - if (jj_3R_341()) return true; - return false; - } - - inline bool jj_3R_429() + inline bool jj_3R_100() { if (jj_done) return true; - if (jj_3R_73()) return true; + if (jj_scan_token(BIT_STRING_LITERAL)) return true; return false; } @@ -6387,31 +6365,25 @@ void parseInline(); return false; } - inline bool jj_3R_428() + inline bool jj_3R_430() { if (jj_done) return true; - if (jj_scan_token(USE_T)) return true; - if (jj_3R_521()) return true; + if (jj_3R_341()) return true; return false; } - inline bool jj_3R_344() + inline bool jj_3R_429() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_428()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_429()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_430()) jj_scanpos = xsp; + if (jj_3R_73()) return true; return false; } - inline bool jj_3R_249() + inline bool jj_3R_428() { if (jj_done) return true; - if (jj_3R_63()) return true; + if (jj_scan_token(USE_T)) return true; + if (jj_3R_521()) return true; return false; } @@ -6436,6 +6408,26 @@ void parseInline(); return false; } + inline bool jj_3R_344() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_428()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_429()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_430()) jj_scanpos = xsp; + return false; + } + + inline bool jj_3R_249() + { + if (jj_done) return true; + if (jj_3R_63()) return true; + return false; + } + inline bool jj_3R_434() { if (jj_done) return true; @@ -6548,6 +6540,14 @@ void parseInline(); return false; } + inline bool jj_3R_258() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; + return false; + } + inline bool jj_3R_115() { if (jj_done) return true; @@ -6563,21 +6563,6 @@ void parseInline(); return false; } - inline bool jj_3R_258() - { - if (jj_done) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; - return false; - } - - inline bool jj_3R_372() - { - if (jj_done) return true; - if (jj_scan_token(RANGE_T)) return true; - return false; - } - inline bool jj_3R_319() { if (jj_done) return true; @@ -6600,6 +6585,20 @@ void parseInline(); return false; } + inline bool jj_3R_372() + { + if (jj_done) return true; + if (jj_scan_token(RANGE_T)) return true; + return false; + } + + inline bool jj_3R_506() + { + if (jj_done) return true; + if (jj_scan_token(QNEQU_T)) return true; + return false; + } + inline bool jj_3R_230() { if (jj_done) return true; @@ -6618,13 +6617,6 @@ void parseInline(); return false; } - inline bool jj_3R_506() - { - if (jj_done) return true; - if (jj_scan_token(QNEQU_T)) return true; - return false; - } - inline bool jj_3R_505() { if (jj_done) return true; @@ -6674,58 +6666,58 @@ void parseInline(); return false; } - inline bool jj_3_6() + inline bool jj_3R_499() { if (jj_done) return true; - if (jj_3R_66()) return true; - if (jj_scan_token(ARROW_T)) return true; + if (jj_scan_token(LESSTHAN_T)) return true; return false; } - inline bool jj_3R_67() + inline bool jj_3R_498() { if (jj_done) return true; - if (jj_scan_token(ATTRIBUTE_T)) return true; - if (jj_3R_74()) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_161()) return true; - if (jj_scan_token(SEMI_T)) return true; + if (jj_scan_token(GREATERTHAN_T)) return true; return false; } - inline bool jj_3R_499() + inline bool jj_3R_497() { if (jj_done) return true; - if (jj_scan_token(LESSTHAN_T)) return true; + if (jj_scan_token(EQU_T)) return true; return false; } - inline bool jj_3R_355() + inline bool jj_3R_496() { if (jj_done) return true; - if (jj_scan_token(REPORT_T)) return true; - if (jj_3R_61()) return true; + if (jj_scan_token(GT_T)) return true; return false; } - inline bool jj_3R_498() + inline bool jj_3_6() { if (jj_done) return true; - if (jj_scan_token(GREATERTHAN_T)) return true; + if (jj_3R_66()) return true; + if (jj_scan_token(ARROW_T)) return true; return false; } - inline bool jj_3R_497() + inline bool jj_3R_67() { if (jj_done) return true; - if (jj_scan_token(EQU_T)) return true; + if (jj_scan_token(ATTRIBUTE_T)) return true; + if (jj_3R_74()) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_161()) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_496() + inline bool jj_3R_355() { if (jj_done) return true; - if (jj_scan_token(GT_T)) return true; + if (jj_scan_token(REPORT_T)) return true; + if (jj_3R_61()) return true; return false; } @@ -6767,6 +6759,16 @@ void parseInline(); return false; } + inline bool jj_3R_151() + { + if (jj_done) return true; + if (jj_3R_318()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_319()) jj_scanpos = xsp; + return false; + } + inline bool jj_3R_169() { if (jj_done) return true; @@ -6779,13 +6781,10 @@ void parseInline(); return false; } - inline bool jj_3R_151() + inline bool jj_3R_697() { if (jj_done) return true; - if (jj_3R_318()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_319()) jj_scanpos = xsp; + if (jj_3R_705()) return true; return false; } @@ -6797,13 +6796,6 @@ void parseInline(); return false; } - inline bool jj_3R_697() - { - if (jj_done) return true; - if (jj_3R_705()) return true; - return false; - } - inline bool jj_3R_329() { if (jj_done) return true; @@ -6814,14 +6806,6 @@ void parseInline(); return false; } - inline bool jj_3R_257() - { - if (jj_done) return true; - if (jj_3R_145()) return true; - if (jj_scan_token(COLON_T)) return true; - return false; - } - inline bool jj_3R_690() { if (jj_done) return true; @@ -6839,14 +6823,11 @@ void parseInline(); return false; } - inline bool jj_3R_120() + inline bool jj_3R_257() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_257()) jj_scanpos = xsp; - if (jj_3R_196()) return true; - if (jj_scan_token(SEMI_T)) return true; + if (jj_3R_145()) return true; + if (jj_scan_token(COLON_T)) return true; return false; } @@ -6866,33 +6847,22 @@ void parseInline(); return false; } - inline bool jj_3R_86() - { - if (jj_done) return true; - if (jj_scan_token(RANGE_T)) return true; - if (jj_3R_88()) return true; - return false; - } - - inline bool jj_3R_196() + inline bool jj_3R_120() { if (jj_done) return true; - if (jj_scan_token(ASSERT_T)) return true; - if (jj_3R_83()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_355()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_356()) jj_scanpos = xsp; + if (jj_3R_257()) jj_scanpos = xsp; + if (jj_3R_196()) return true; + if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3_5() + inline bool jj_3R_86() { if (jj_done) return true; - if (jj_scan_token(ARRAY_T)) return true; - if (jj_3R_65()) return true; - if (jj_scan_token(OF_T)) return true; + if (jj_scan_token(RANGE_T)) return true; + if (jj_3R_88()) return true; return false; } @@ -6910,6 +6880,19 @@ void parseInline(); return false; } + inline bool jj_3R_196() + { + if (jj_done) return true; + if (jj_scan_token(ASSERT_T)) return true; + if (jj_3R_83()) return true; + Token * xsp; + xsp = jj_scanpos; + if (jj_3R_355()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_356()) jj_scanpos = xsp; + return false; + } + inline bool jj_3R_190() { if (jj_done) return true; @@ -6930,10 +6913,12 @@ void parseInline(); return false; } - inline bool jj_3R_696() + inline bool jj_3_5() { if (jj_done) return true; - if (jj_3R_704()) return true; + if (jj_scan_token(ARRAY_T)) return true; + if (jj_3R_65()) return true; + if (jj_scan_token(OF_T)) return true; return false; } @@ -6946,6 +6931,20 @@ void parseInline(); return false; } + inline bool jj_3R_696() + { + if (jj_done) return true; + if (jj_3R_704()) return true; + return false; + } + + inline bool jj_3R_237() + { + if (jj_done) return true; + if (jj_3R_114()) return true; + return false; + } + inline bool jj_3R_695() { if (jj_done) return true; @@ -6964,13 +6963,6 @@ void parseInline(); return false; } - inline bool jj_3R_237() - { - if (jj_done) return true; - if (jj_3R_114()) return true; - return false; - } - inline bool jj_3R_64() { if (jj_done) return true; @@ -7024,20 +7016,20 @@ void parseInline(); return false; } - inline bool jj_3R_244() + inline bool jj_3R_198() { if (jj_done) return true; - if (jj_scan_token(NEW_T)) return true; - if (jj_3R_89()) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_357()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_198() + inline bool jj_3R_244() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_357()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_scan_token(NEW_T)) return true; + if (jj_3R_89()) return true; return false; } @@ -7060,20 +7052,6 @@ void parseInline(); return false; } - inline bool jj_3R_552() - { - if (jj_done) return true; - if (jj_3R_321()) return true; - return false; - } - - inline bool jj_3R_551() - { - if (jj_done) return true; - if (jj_scan_token(CHARACTER_LITERAL)) return true; - return false; - } - inline bool jj_3R_197() { if (jj_done) return true; @@ -7082,23 +7060,10 @@ void parseInline(); return false; } - inline bool jj_3R_550() - { - if (jj_done) return true; - if (jj_3R_74()) return true; - return false; - } - - inline bool jj_3R_482() + inline bool jj_3R_552() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_550()) return false; - jj_scanpos = xsp; - if (!jj_3R_551()) return false; - jj_scanpos = xsp; - if (jj_3R_552()) return true; + if (jj_3R_321()) return true; return false; } @@ -7128,6 +7093,13 @@ void parseInline(); return false; } + inline bool jj_3R_551() + { + if (jj_done) return true; + if (jj_scan_token(CHARACTER_LITERAL)) return true; + return false; + } + inline bool jj_3R_358() { if (jj_done) return true; @@ -7135,6 +7107,26 @@ void parseInline(); return false; } + inline bool jj_3R_550() + { + if (jj_done) return true; + if (jj_3R_74()) return true; + return false; + } + + inline bool jj_3R_482() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_550()) return false; + jj_scanpos = xsp; + if (!jj_3R_551()) return false; + jj_scanpos = xsp; + if (jj_3R_552()) return true; + return false; + } + inline bool jj_3R_199() { if (jj_done) return true; @@ -7153,14 +7145,6 @@ void parseInline(); return false; } - inline bool jj_3R_483() - { - if (jj_done) return true; - if (jj_scan_token(COLON_T)) return true; - if (jj_3R_89()) return true; - return false; - } - inline bool jj_3R_533() { if (jj_done) return true; @@ -7182,19 +7166,11 @@ void parseInline(); return false; } - inline bool jj_3R_393() + inline bool jj_3R_483() { if (jj_done) return true; - if (jj_scan_token(ALIAS_T)) return true; - if (jj_3R_482()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_483()) jj_scanpos = xsp; - if (jj_scan_token(IS_T)) return true; - if (jj_3R_63()) return true; - xsp = jj_scanpos; - if (jj_3R_484()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; + if (jj_scan_token(COLON_T)) return true; + if (jj_3R_89()) return true; return false; } @@ -7205,17 +7181,19 @@ void parseInline(); return false; } - inline bool jj_3R_114() + inline bool jj_3R_393() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_247()) return true; + if (jj_scan_token(ALIAS_T)) return true; + if (jj_3R_482()) return true; Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_248()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(RPAREN_T)) return true; + xsp = jj_scanpos; + if (jj_3R_483()) jj_scanpos = xsp; + if (jj_scan_token(IS_T)) return true; + if (jj_3R_63()) return true; + xsp = jj_scanpos; + if (jj_3R_484()) jj_scanpos = xsp; + if (jj_scan_token(SEMI_T)) return true; return false; } @@ -7254,17 +7232,17 @@ void parseInline(); return false; } - inline bool jj_3R_282() - { - if (jj_done) return true; - if (jj_scan_token(MINUS_T)) return true; - return false; - } - - inline bool jj_3R_283() + inline bool jj_3R_114() { if (jj_done) return true; - if (jj_scan_token(AMPERSAND_T)) return true; + if (jj_scan_token(LPAREN_T)) return true; + if (jj_3R_247()) return true; + Token * xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_248()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -7275,31 +7253,17 @@ void parseInline(); return false; } - inline bool jj_3_3() - { - if (jj_done) return true; - if (jj_3R_63()) return true; - if (jj_scan_token(LPAREN_T)) return true; - return false; - } - - inline bool jj_3R_133() + inline bool jj_3R_282() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_281()) return false; - jj_scanpos = xsp; - if (!jj_3R_282()) return false; - jj_scanpos = xsp; - if (jj_3R_283()) return true; + if (jj_scan_token(MINUS_T)) return true; return false; } - inline bool jj_3R_281() + inline bool jj_3R_283() { if (jj_done) return true; - if (jj_scan_token(PLUS_T)) return true; + if (jj_scan_token(AMPERSAND_T)) return true; return false; } @@ -7341,6 +7305,14 @@ void parseInline(); return false; } + inline bool jj_3_3() + { + if (jj_done) return true; + if (jj_3R_63()) return true; + if (jj_scan_token(LPAREN_T)) return true; + return false; + } + inline bool jj_3R_342() { if (jj_done) return true; @@ -7350,27 +7322,30 @@ void parseInline(); return false; } - inline bool jj_3_2() + inline bool jj_3R_133() { if (jj_done) return true; - if (jj_3R_62()) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_281()) return false; + jj_scanpos = xsp; + if (!jj_3R_282()) return false; + jj_scanpos = xsp; + if (jj_3R_283()) return true; return false; } - inline bool jj_3R_516() + inline bool jj_3R_281() { if (jj_done) return true; - if (jj_3R_63()) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_62()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_scan_token(PLUS_T)) return true; return false; } - inline bool jj_3R_515() + inline bool jj_3_2() { if (jj_done) return true; - if (jj_scan_token(BOX_T)) return true; + if (jj_3R_62()) return true; return false; } @@ -7393,23 +7368,20 @@ void parseInline(); return false; } - inline bool jj_3R_514() + inline bool jj_3R_516() { if (jj_done) return true; + if (jj_3R_63()) return true; + if (jj_scan_token(LPAREN_T)) return true; if (jj_3R_62()) return true; + if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_419() + inline bool jj_3R_515() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_514()) return false; - jj_scanpos = xsp; - if (!jj_3R_515()) return false; - jj_scanpos = xsp; - if (jj_3R_516()) return true; + if (jj_scan_token(BOX_T)) return true; return false; } @@ -7423,10 +7395,23 @@ void parseInline(); return false; } - inline bool jj_3R_236() + inline bool jj_3R_514() { if (jj_done) return true; - if (jj_3R_169()) return true; + if (jj_3R_62()) return true; + return false; + } + + inline bool jj_3R_419() + { + if (jj_done) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_514()) return false; + jj_scanpos = xsp; + if (!jj_3R_515()) return false; + jj_scanpos = xsp; + if (jj_3R_516()) return true; return false; } @@ -7451,10 +7436,10 @@ void parseInline(); return false; } - inline bool jj_3_1() + inline bool jj_3R_236() { if (jj_done) return true; - if (jj_3R_61()) return true; + if (jj_3R_169()) return true; return false; } @@ -7465,10 +7450,10 @@ void parseInline(); return false; } - inline bool jj_3R_155() + inline bool jj_3_1() { if (jj_done) return true; - if (jj_3R_74()) return true; + if (jj_3R_61()) return true; return false; } @@ -7519,10 +7504,10 @@ void parseInline(); return false; } - inline bool jj_3R_154() + inline bool jj_3R_155() { if (jj_done) return true; - if (jj_3R_61()) return true; + if (jj_3R_74()) return true; return false; } @@ -7533,52 +7518,51 @@ void parseInline(); return false; } - inline bool jj_3R_153() + inline bool jj_3_71() { if (jj_done) return true; - if (jj_scan_token(OPEN_T)) return true; + if (jj_3R_112()) return true; return false; } - inline bool jj_3R_62() + inline bool jj_3R_154() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_153()) return false; - jj_scanpos = xsp; - if (!jj_3R_154()) return false; - jj_scanpos = xsp; - if (jj_3R_155()) return true; + if (jj_3R_61()) return true; return false; } - inline bool jj_3_71() + inline bool jj_3R_475() { if (jj_done) return true; - if (jj_3R_112()) return true; + if (jj_3R_114()) return true; return false; } - inline bool jj_3R_475() + inline bool jj_3R_153() { if (jj_done) return true; - if (jj_3R_114()) return true; + if (jj_scan_token(OPEN_T)) return true; return false; } - inline bool jj_3_70() + inline bool jj_3R_62() { if (jj_done) return true; - if (jj_3R_111()) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_153()) return false; + jj_scanpos = xsp; + if (!jj_3R_154()) return false; + jj_scanpos = xsp; + if (jj_3R_155()) return true; return false; } - inline bool jj_3R_658() + inline bool jj_3_70() { if (jj_done) return true; - if (jj_scan_token(ACCESS_T)) return true; - if (jj_3R_89()) return true; + if (jj_3R_111()) return true; return false; } @@ -7603,10 +7587,11 @@ void parseInline(); return false; } - inline bool jj_3R_235() + inline bool jj_3R_658() { if (jj_done) return true; - if (jj_scan_token(BASED_LITERAL)) return true; + if (jj_scan_token(ACCESS_T)) return true; + if (jj_3R_89()) return true; return false; } @@ -7619,58 +7604,65 @@ void parseInline(); return false; } - inline bool jj_3R_234() + inline bool jj_3R_472() { if (jj_done) return true; - if (jj_scan_token(INTEGER)) return true; + if (jj_3R_112()) return true; return false; } - inline bool jj_3R_472() + inline bool jj_3R_702() { if (jj_done) return true; - if (jj_3R_112()) return true; + if (jj_3R_63()) return true; return false; } - inline bool jj_3R_109() + inline bool jj_3_67() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_233()) return false; - jj_scanpos = xsp; - if (!jj_3R_234()) return false; - jj_scanpos = xsp; - if (jj_3R_235()) return true; + if (jj_3R_110()) return true; return false; } - inline bool jj_3R_233() + inline bool jj_3R_235() { if (jj_done) return true; - if (jj_scan_token(DECIMAL_LITERAL)) return true; + if (jj_scan_token(BASED_LITERAL)) return true; return false; } - inline bool jj_3R_702() + inline bool jj_3R_471() { if (jj_done) return true; - if (jj_3R_63()) return true; + if (jj_3R_111()) return true; return false; } - inline bool jj_3_67() + inline bool jj_3R_234() { if (jj_done) return true; - if (jj_3R_110()) return true; + if (jj_scan_token(INTEGER)) return true; return false; } - inline bool jj_3R_471() + inline bool jj_3R_109() { if (jj_done) return true; - if (jj_3R_111()) return true; + Token * xsp; + xsp = jj_scanpos; + if (!jj_3R_233()) return false; + jj_scanpos = xsp; + if (!jj_3R_234()) return false; + jj_scanpos = xsp; + if (jj_3R_235()) return true; + return false; + } + + inline bool jj_3R_233() + { + if (jj_done) return true; + if (jj_scan_token(DECIMAL_LITERAL)) return true; return false; } @@ -8522,6 +8514,14 @@ void parseInline(); return false; } + inline bool jj_3R_207() + { + if (jj_done) return true; + if (jj_scan_token(VARASSIGN_T)) return true; + if (jj_3R_61()) return true; + return false; + } + public: void setErrorHandler(ErrorHandler *eh) { diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj index e263289..ed4500a 100755 --- a/vhdlparser/vhdlparser.jj +++ b/vhdlparser/vhdlparser.jj @@ -979,19 +979,23 @@ return s1; QCString element_declaration() : {QCString rec_name,s1,s2;} { -rec_name=identifier_list() s1=subtype_indication() -{ - QCString name; - QCStringList ql=QCStringList::split(",",rec_name); - for (uint j=0;jgetNameID().data();; - outlineParser()->addVhdlType(name.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public); - } - s2=rec_name+":"+s1; - return s2; - } + rec_name=identifier_list() s1=subtype_indication() + { + auto ql = split(rec_name.str(),","); + for (const auto &n : ql) + { + std::string name=n+"~"; + name+=outlineParser()->getNameID().data(); + outlineParser()->addVhdlType( + name.c_str(),outlineParser()->getLine(), + Entry::VARIABLE_SEC, + VhdlDocGen::RECORD,0, + s1.data(), + Public); + } + s2=rec_name+":"+s1; + return s2; + } } @@ -2465,14 +2469,22 @@ QCString unconstraint_array_definition() : {QCString s,s1,s2,s3;} { s=selected_name()( s1=selected_name(){s+=",";s+=s1;})* { - QCStringList ql1=QCStringList::split(",",s); - for (uint j=0;jparse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) ) + auto ql2=split(name,"."); + if (ql2.size()>1) { - outlineParser()->addVhdlType(it.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public); + std::string it=ql2[1]; + if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) ) + { + outlineParser()->addVhdlType(it.c_str(), + outlineParser()->getLine(), + Entry::VARIABLE_SEC, + VhdlDocGen::USE, + it.c_str(), + "_use_",Public); + } } } s1="use "+s; -- cgit v0.12