diff --git a/autotest/CoPipe2/CoPipe2.cpp b/autotest/CoPipe2/CoPipe2.cpp deleted file mode 100644 index 0224e4789..000000000 --- a/autotest/CoPipe2/CoPipe2.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include - -using namespace Upp; - -Vector result; - -void Process(CoWork& co, String h, int n) -{ - int x = atoi(h); - x++; - if(n < 100) - co.Pipe(n + 1, [=, &co] { Process(co, AsString(atoi(h) + 1), n + 1); }); - else - result.Add(h); -} - -CONSOLE_APP_MAIN -{ - StdLogSetup(LOG_COUT|LOG_FILE); - - CoWork co; - for(int i = 0; i < 10000; i++) - co.Pipe(0, [=, &co] { Process(co, AsString(i), 0); }); - co.Finish(); - - for(int i = 0; i < 10000; i++) - ASSERT(result[i] == AsString(i + 100)); - - Thread::ShutdownThreads(); - - LOG("============== OK"); -} diff --git a/autotest/CoPipe2/CoPipe2.upp b/autotest/CoPipe2/CoPipe2.upp deleted file mode 100644 index 2dda30e34..000000000 --- a/autotest/CoPipe2/CoPipe2.upp +++ /dev/null @@ -1,11 +0,0 @@ -description "AutoTests a long pipe (more than number of worker threads)\377"; - -uses - Core; - -file - CoPipe2.cpp; - -mainconfig - "" = "MT"; - diff --git a/autotest/CppParser/CppParser.cpp b/autotest/CppParser/CppParser.cpp deleted file mode 100644 index 8e064ccd1..000000000 --- a/autotest/CppParser/CppParser.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#include -#include - -using namespace Upp; - -Vector errs; - -void AddError(int ln, const String& s) -{ - errs.Add(AsString(ln) + ": " + s); -} - -void CleanAnonymous(String& s) -{ - for(;;) { - int q = s.Find('@'); - if(q < 0) - return; - int qq = s.Find("/title", q); - if(qq < 0) - return; - s.Remove(q, qq - q - 1); - } -} - -void Test(const char *path, int filetype) -{ - CppBase base; - - LOG("**** " << GetFileName(path)); - - FileIn in(path); - errs.Clear(); - - Index hh; - - Parser p; - p.Do(in, base, 0, filetype, "title", callback(AddError), - Vector(), Vector(), hh); - - if(errs.GetCount()) - DUMPC(errs); - Qualify(base); - String out; - if(errs.GetCount()) - out << "ERRORS: " << errs << '\n'; - for(int i = 0; i < base.GetCount(); i++) { - out << Nvl(base.GetKey(i), "") << " {\n"; - const Array& ma = base[i]; - for(int j = 0; j < ma.GetCount(); j++) { - const CppItem& m = ma[j]; - out << '\t' << CppItemKindAsString(m.kind) << ", name: " << m.name << ", qitem: " << m.qitem - << ", qtype: " << m.qtype - << ", qptype: " << m.qptype - << ", natural: " << m.natural - << ", line " << m.line - << ", using " << m.using_namespaces; - if(m.isptr) - out << ", pointer"; - out << "\n"; - } - out << "}\n"; - } - - p.dobody = true; - in.Seek(0); - p.qualify = [&](String scope, String type, String usings) { - String t = Qualify(base, scope, type, usings); - return base.Find(NoTemplatePars(t)) >= 0 ? t : Null; - }; - p.Do(in, base, 0, filetype, "title", callback(AddError), - Vector(), Vector(), hh); - - out << " {\n"; - for(int i = 0; i < p.local.GetCount(); i++) { - out << p.local.GetKey(i) << " " << p.local[i].type; - if(p.local[i].isptr) - out << " pointer"; - out << ", line: " << p.local[i].line << "\n"; - } - out << "}"; - CleanAnonymous(out); - LOG("===="); - LOG(out); - LOG("-------------------------------------------------------------------------------"); -} - -CONSOLE_APP_MAIN { - StdLogSetup(LOG_COUT|LOG_FILE); - - if(CommandLine().GetCount()) { - int ii = atoi(CommandLine()[0]); - String p = GetDataFile("test" + AsString(ii) + ".in"); - Test(p, FILE_H); - } - - for(int i = 0; i < 10000; i++) { - String p = GetDataFile("test" + AsString(i) + ".in"); - if(FileExists(p)) - Test(p, FILE_H); - p << 'c'; - if(FileExists(p)) - Test(p, FILE_C); - } - CheckLogEtalon(); -} diff --git a/autotest/CppParser/CppParser.upp b/autotest/CppParser/CppParser.upp deleted file mode 100644 index 10d389644..000000000 --- a/autotest/CppParser/CppParser.upp +++ /dev/null @@ -1,59 +0,0 @@ -uses - Core, - CppBase; - -file - Etalon.log, - CppParser.cpp, - test0.in, - test1.in, - test2.in, - test3.in, - test4.in, - test5.in, - test6.in, - test7.in, - test8.in, - test9.in, - test10.in, - test11.in, - test12.in, - test13.in, - test14.in, - test15.in, - test16.in, - test17.in, - test18.in, - test19.in, - test20.in, - test21.in, - test22.in, - test23.in, - test24.in, - test25.inc, - test26.in, - test27.in, - test28.in, - test29.in, - test30.in, - test31.in, - test32.in, - test33.in, - test34.in, - test35.in, - test36.in, - test37.in, - test38.in, - test39.in, - test40.in, - test41.in, - test42.in, - test43.in, - test44.in, - test45.in, - test46.in, - test47.in; - -mainconfig - "" = ""; - diff --git a/autotest/CppParser/Etalon.log b/autotest/CppParser/Etalon.log deleted file mode 100644 index 9e923055f..000000000 --- a/autotest/CppParser/Etalon.log +++ /dev/null @@ -1,900 +0,0 @@ -* C:\upp\out\autotest\MSBT19.Debug.Debug_Full\CppParser.exe 26.05.2021 09:43:08, user: cxl - -**** test0.in -==== -Upp { - NAMESPACE, name: Upp, qitem: namespace Upp, qtype: , qptype: , natural: namespace Upp, line 1, using - FUNCTIONTEMPLATE, name: Single, qitem: Single(), qtype: T, qptype: , natural: template T& Single(), line 13, using -} -Upp::Foo { - STRUCT, name: Foo, qitem: struct, qtype: Upp::Foo, qptype: , natural: struct Foo, line 2, using -} -Upp::String { - STRUCT, name: String, qitem: struct, qtype: Upp::String, qptype: , natural: struct String, line 3, using - INSTANCEFUNCTION, name: Bar, qitem: Bar(), qtype: Upp::Foo, qptype: , natural: Foo Bar(), line 4, using - INSTANCEVARIABLE, name: bar, qitem: bar, qtype: Upp::Foo, qptype: , natural: Foo bar, line 5, using -} -Upp::One { - STRUCTTEMPLATE, name: One, qitem: class, qtype: Upp::One, qptype: , natural: template class One, line 8, using - INSTANCEFUNCTION, name: operator->, qitem: operator->(), qtype: 0, qptype: , natural: T *operator->(), line 10, using -} -Upp::Array { - STRUCTTEMPLATE, name: Array, qitem: struct, qtype: Upp::Array, qptype: , natural: template struct Array, line 16, using - INSTANCEFUNCTION, name: operator[], qitem: operator[](int), qtype: 0, qptype: , natural: T& operator[](int i), line 18, using - INSTANCEFUNCTION, name: operator(), qitem: operator()(int), qtype: Upp::Foo, qptype: , natural: Foo operator()(int i), line 19, using -} -ResourceCache { - STRUCT, name: ResourceCache, qitem: class, qtype: ResourceCache, qptype: , natural: class ResourceCache, line 26, using Upp - INSTANCEFUNCTION, name: GetAttrs, qitem: GetAttrs(), qtype: ValueMap, qptype: , natural: ValueMap GetAttrs(), line 28, using Upp - CLASSFUNCTION, name: The, qitem: The(), qtype: ResourceCache, qptype: , natural: ResourceCache& The(), line 30, using Upp -} - { - FUNCTION, name: Expressions, qitem: Expressions(), qtype: , qptype: , natural: void Expressions(), line 33, using Upp -} - { -str1 Upp::String, line: 35 -str2 Upp::String, line: 36 -s1 Upp::String, line: 38 -s2 Upp::String, line: 39 -one Upp::One, line: 41 -one1 Upp::Foo, line: 42 -one2 Upp::Foo, line: 43 -single Upp::String, line: 45 -single1 Upp::Foo, line: 46 -single2 Upp::Foo, line: 47 -a Upp::Array, line: 49 -a1 Upp::String, line: 50 -a2 Upp::Foo, line: 51 -a3 Upp::Foo, line: 52 -th ResourceCache, line: 54 -} -------------------------------------------------------------------------------- -**** test1.in -==== - { - FUNCTION, name: Test, qitem: Test(), qtype: , qptype: , natural: void Test(), line 1, using - VARIABLE, name: global, qitem: global, qtype: Point, qptype: , natural: Point global, line 13, using - FUNCTION, name: foo, qitem: foo(), qtype: , qptype: , natural: void foo(), line 15, using -} -Foo { - STRUCT, name: Foo, qitem: class, qtype: Foo, qptype: , natural: class Foo, line 3, using - CONSTRUCTOR, name: Foo, qitem: Foo(), qtype: , qptype: , natural: Foo(), line 4, using -} -Point { - STRUCT, name: Point, qitem: struct, qtype: Point, qptype: , natural: struct Point, line 7, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 8, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: int y, line 8, using - INSTANCEVARIABLE, name: next, qitem: next, qtype: Point, qptype: , natural: Point *next, line 9, using , pointer - INSTANCEVARIABLE, name: bar, qitem: bar, qtype: Foo, qptype: , natural: Foo bar, line 10, using -} - { -x , line: 17 -a Point, line: 18 -b Point, line: 18 -c Point pointer, line: 18 -} -------------------------------------------------------------------------------- -**** test2.in -==== -_CrtEnableIf { - STRUCTTEMPLATE, name: _CrtEnableIf , qitem: struct, qtype: _CrtEnableIf, qptype: , natural: template struct _CrtEnableIf , line 1, using -} -_CrtEnableIf ::_Type { - TYPEDEF, name: _Type, qitem: typedef, qtype: 1, qptype: , natural: typedef _Ty _Type, line 4, using -} - { -} -------------------------------------------------------------------------------- -**** test3.in -==== - { - FUNCTIONTEMPLATE, name: memcpy, qitem: memcpy(_DstType(&)[_Size],const void*,size_t)throw(), qtype: _CrtEnableIf<(_Size>1),void*>::_Type, qptype: _DstType;;size_t, natural: template typename _CrtEnableIf<(_Size > 1), void *>::_Type memcpy(_DstType (&_Dst)[_Size], const void *_Src, size_t _SrcSize) throw(), line 3, using -} - { -} -------------------------------------------------------------------------------- -**** test4.in -==== - { - FUNCTIONTEMPLATE, name: Fn, qitem: Fn(), qtype: , qptype: , natural: template void Fn(), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test5.in -==== -Value { - STRUCT, name: Value, qitem: class, qtype: Value, qptype: , natural: class Value, line 1, using - INSTANCEFUNCTION, name: operator<=, qitem: operator<=(const Value&)const, qtype: , qptype: Value, natural: bool operator<=(const Value& x) const, line 2, using - INSTANCEFUNCTION, name: operator>=, qitem: operator>=(const Value&)const, qtype: , qptype: Value, natural: bool operator>=(const Value& x) const, line 3, using - INSTANCEFUNCTION, name: operator<, qitem: operator<(const Value&)const, qtype: , qptype: Value, natural: bool operator<(const Value& x) const, line 4, using - INSTANCEFUNCTION, name: operator>, qitem: operator>(const Value&)const, qtype: , qptype: Value, natural: bool operator>(const Value& x) const, line 5, using -} - { -} -------------------------------------------------------------------------------- -**** test6.in -==== - { - FUNCTION, name: test, qitem: test(const int), qtype: , qptype: , natural: void test(const int a), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test7.in -==== - { - FUNCTION, name: __insecure__strlwr_l, qitem: __insecure__strlwr_l(char*,_locale_t), qtype: , qptype: ;_locale_t, natural: __inline char * __insecure__strlwr_l( char *_String, _locale_t _Locale), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test8.in -==== -.vPROCESSOR_IDLESTATE_INFO { - STRUCT, name: .vPROCESSOR_IDLESTATE_INFO, qitem: struct, qtype: .vPROCESSOR_IDLESTATE_INFO, qptype: , natural: struct .vPROCESSOR_IDLESTATE_INFO, line 1, using - INSTANCEVARIABLE, name: TimeCheck, qitem: TimeCheck, qtype: DWORD, qptype: , natural: DWORD TimeCheck, line 2, using - INSTANCEVARIABLE, name: DemotePercent, qitem: DemotePercent, qtype: BYTE, qptype: , natural: BYTE DemotePercent, line 3, using - INSTANCEVARIABLE, name: PromotePercent, qitem: PromotePercent, qtype: BYTE, qptype: , natural: BYTE PromotePercent, line 4, using - INSTANCEVARIABLE, name: Spare, qitem: Spare, qtype: BYTE, qptype: , natural: BYTE Spare[2], line 5, using , pointer -} - { - VARIABLE, name: vPROCESSOR_IDLESTATE_INFO, qitem: vPROCESSOR_IDLESTATE_INFO, qtype: .vPROCESSOR_IDLESTATE_INFO, qptype: , natural: struct { DWORD TimeCheck; BYTE DemotePercent; BYTE PromotePercent; BYTE Spare[2]; } vPROCESSOR_IDLESTATE_INFO, line 5, using - VARIABLE, name: vPPROCESSOR_IDLESTATE_INFO, qitem: vPPROCESSOR_IDLESTATE_INFO, qtype: .vPROCESSOR_IDLESTATE_INFO, qptype: , natural: struct { DWORD TimeCheck; BYTE DemotePercent; BYTE PromotePercent; BYTE Spare[2]; } *vPPROCESSOR_IDLESTATE_INFO, line 5, using , pointer - VARIABLE, name: xxx, qitem: xxx, qtype: Point, qptype: , natural: struct Point { int x, y; } xxx, line 16, using - VARIABLE, name: yyy, qitem: yyy, qtype: Point, qptype: , natural: struct Point { int x, y; } yyy, line 16, using -} -.PROCESSOR_IDLESTATE_INFO { - STRUCT, name: .PROCESSOR_IDLESTATE_INFO, qitem: struct, qtype: .PROCESSOR_IDLESTATE_INFO, qptype: , natural: struct .PROCESSOR_IDLESTATE_INFO, line 8, using - INSTANCEVARIABLE, name: TimeCheck, qitem: TimeCheck, qtype: DWORD, qptype: , natural: DWORD TimeCheck, line 9, using - INSTANCEVARIABLE, name: DemotePercent, qitem: DemotePercent, qtype: BYTE, qptype: , natural: BYTE DemotePercent, line 10, using - INSTANCEVARIABLE, name: PromotePercent, qitem: PromotePercent, qtype: BYTE, qptype: , natural: BYTE PromotePercent, line 11, using - INSTANCEVARIABLE, name: Spare, qitem: Spare, qtype: BYTE, qptype: , natural: BYTE Spare[2], line 12, using , pointer -} -PROCESSOR_IDLESTATE_INFO { - TYPEDEF, name: PROCESSOR_IDLESTATE_INFO, qitem: typedef, qtype: .PROCESSOR_IDLESTATE_INFO, qptype: , natural: typedef struct { DWORD TimeCheck; BYTE DemotePercent; BYTE PromotePercent; BYTE Spare[2]; } PROCESSOR_IDLESTATE_INFO, line 12, using -} -PPROCESSOR_IDLESTATE_INFO { - TYPEDEF, name: PPROCESSOR_IDLESTATE_INFO, qitem: typedef, qtype: .PROCESSOR_IDLESTATE_INFO, qptype: , natural: typedef struct { DWORD TimeCheck; BYTE DemotePercent; BYTE PromotePercent; BYTE Spare[2]; } *PPROCESSOR_IDLESTATE_INFO, line 12, using -} -Point { - STRUCT, name: Point, qitem: struct, qtype: Point, qptype: , natural: struct Point, line 15, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 16, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: int y, line 16, using -} -PointT { - STRUCT, name: PointT, qitem: struct, qtype: PointT, qptype: , natural: struct PointT, line 19, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 20, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: int y, line 20, using -} -PPP { - TYPEDEF, name: PPP, qitem: typedef, qtype: PointT, qptype: , natural: typedef struct PointT { int x, y; } PPP, line 20, using -} -TPoint { - STRUCTTEMPLATE, name: TPoint, qitem: struct, qtype: TPoint, qptype: , natural: template struct TPoint, line 23, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: 0, qptype: , natural: T x, line 25, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: 0, qptype: , natural: T y, line 25, using -} - { -} -------------------------------------------------------------------------------- -**** test9.in -==== - { - FUNCTION, name: _InterlockedCompareExchange16, qitem: _InterlockedCompareExchange16(SHORT volatile*,SHORT,SHORT), qtype: SHORT, qptype: SHORT;SHORT;SHORT, natural: SHORT _InterlockedCompareExchange16 ( SHORT volatile *Destination, SHORT ExChange, SHORT Comperand ), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test10.in -==== -Moveable { - STRUCTTEMPLATE, name: Moveable, qitem: class, qtype: Moveable, qptype: 1, natural: template class Moveable : public B, line 1, using - INSTANCEVARIABLE, name: boo, qitem: boo, qtype: , qptype: , natural: int boo, line 4, using -} - { -} -------------------------------------------------------------------------------- -**** test11.in -==== -Foo { - STRUCT, name: Foo, qitem: struct, qtype: Foo, qptype: , natural: struct Foo, line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test12.in -==== - { - ENUM, name: FOO, qitem: FOO, qtype: , qptype: , natural: enum Alpha FOO, line 2, using - ENUM, name: BAR, qitem: BAR, qtype: , qptype: , natural: enum Alpha BAR, line 2, using - ENUM, name: FOO, qitem: FOO, qtype: , qptype: , natural: enum FOO, line 6, using - ENUM, name: BAR, qitem: BAR, qtype: , qptype: , natural: enum BAR, line 6, using - ENUM, name: FOO, qitem: FOO, qtype: , qptype: , natural: enum Gamma FOO, line 10, using - ENUM, name: BAR, qitem: BAR, qtype: , qptype: , natural: enum Gamma BAR, line 10, using -} - { -} -------------------------------------------------------------------------------- -**** test13.in -==== - { - MACRO, name: _DWORDLONG_, qitem: _DWORDLONG_, qtype: , qptype: , natural: _DWORDLONG_, line 41, using -} -_LARGE_INTEGER { - STRUCT, name: _LARGE_INTEGER, qitem: struct, qtype: _LARGE_INTEGER, qptype: , natural: , line 1, using - STRUCT, name: _LARGE_INTEGER, qitem: union, qtype: _LARGE_INTEGER, qptype: , natural: union _LARGE_INTEGER, line 3, using - INSTANCEVARIABLE, name: u, qitem: u, qtype: .u, qptype: , natural: struct { DWORD LowPart; LONG HighPart; } u, line 10, using - INSTANCEVARIABLE, name: QuadPart, qitem: QuadPart, qtype: LONGLONG, qptype: , natural: LONGLONG QuadPart, line 13, using -} -_LARGE_INTEGER::=/title { - STRUCT, name: =/title, qitem: struct, qtype: =/title, qptype: , natural: struct =/title, line 4, using - INSTANCEVARIABLE, name: LowPart, qitem: LowPart, qtype: DWORD, qptype: , natural: DWORD LowPart, line 5, using - INSTANCEVARIABLE, name: HighPart, qitem: HighPart, qtype: LONG, qptype: , natural: LONG HighPart, line 6, using -} -_LARGE_INTEGER::.u { - STRUCT, name: .u, qitem: struct, qtype: .u, qptype: , natural: struct .u, line 8, using - INSTANCEVARIABLE, name: LowPart, qitem: LowPart, qtype: DWORD, qptype: , natural: DWORD LowPart, line 9, using - INSTANCEVARIABLE, name: HighPart, qitem: HighPart, qtype: LONG, qptype: , natural: LONG HighPart, line 10, using -} -LARGE_INTEGER { - TYPEDEF, name: LARGE_INTEGER, qitem: typedef, qtype: _LARGE_INTEGER, qptype: , natural: typedef union _LARGE_INTEGER { struct { DWORD LowPart; LONG HighPart; } ; struct { DWORD LowPart; LONG HighPart; } u; LONGLONG QuadPart; } LARGE_INTEGER, line 13, using -} -PLARGE_INTEGER { - TYPEDEF, name: PLARGE_INTEGER, qitem: typedef, qtype: LARGE_INTEGER, qptype: , natural: typedef LARGE_INTEGER *PLARGE_INTEGER, line 16, using -} -_ULARGE_INTEGER { - STRUCT, name: _ULARGE_INTEGER, qitem: struct, qtype: _ULARGE_INTEGER, qptype: , natural: , line 19, using - STRUCT, name: _ULARGE_INTEGER, qitem: union, qtype: _ULARGE_INTEGER, qptype: , natural: union _ULARGE_INTEGER, line 21, using - INSTANCEVARIABLE, name: u, qitem: u, qtype: .u, qptype: , natural: struct { DWORD LowPart; DWORD HighPart; } u, line 28, using - INSTANCEVARIABLE, name: QuadPart, qitem: QuadPart, qtype: ULONGLONG, qptype: , natural: ULONGLONG QuadPart, line 31, using -} -_ULARGE_INTEGER::=/title { - STRUCT, name: =/title, qitem: struct, qtype: =/title, qptype: , natural: struct =/title, line 22, using - INSTANCEVARIABLE, name: LowPart, qitem: LowPart, qtype: DWORD, qptype: , natural: DWORD LowPart, line 23, using - INSTANCEVARIABLE, name: HighPart, qitem: HighPart, qtype: DWORD, qptype: , natural: DWORD HighPart, line 24, using -} -_ULARGE_INTEGER::.u { - STRUCT, name: .u, qitem: struct, qtype: .u, qptype: , natural: struct .u, line 26, using - INSTANCEVARIABLE, name: LowPart, qitem: LowPart, qtype: DWORD, qptype: , natural: DWORD LowPart, line 27, using - INSTANCEVARIABLE, name: HighPart, qitem: HighPart, qtype: DWORD, qptype: , natural: DWORD HighPart, line 28, using -} -ULARGE_INTEGER { - TYPEDEF, name: ULARGE_INTEGER, qitem: typedef, qtype: _ULARGE_INTEGER, qptype: , natural: typedef union _ULARGE_INTEGER { struct { DWORD LowPart; DWORD HighPart; } ; struct { DWORD LowPart; DWORD HighPart; } u; ULONGLONG QuadPart; } ULARGE_INTEGER, line 31, using -} -PULARGE_INTEGER { - TYPEDEF, name: PULARGE_INTEGER, qitem: typedef, qtype: ULARGE_INTEGER, qptype: , natural: typedef ULARGE_INTEGER *PULARGE_INTEGER, line 34, using -} -_LUID { - STRUCT, name: _LUID, qitem: struct, qtype: _LUID, qptype: , natural: struct _LUID, line 36, using - INSTANCEVARIABLE, name: LowPart, qitem: LowPart, qtype: DWORD, qptype: , natural: DWORD LowPart, line 37, using - INSTANCEVARIABLE, name: HighPart, qitem: HighPart, qtype: LONG, qptype: , natural: LONG HighPart, line 38, using -} -LUID { - TYPEDEF, name: LUID, qitem: typedef, qtype: _LUID, qptype: , natural: typedef struct _LUID { DWORD LowPart; LONG HighPart; } LUID, line 38, using -} -PLUID { - TYPEDEF, name: PLUID, qitem: typedef, qtype: _LUID, qptype: , natural: typedef struct _LUID { DWORD LowPart; LONG HighPart; } *PLUID, line 38, using -} -DWORDLONG { - TYPEDEF, name: DWORDLONG, qitem: typedef, qtype: ULONGLONG, qptype: , natural: typedef ULONGLONG DWORDLONG, line 42, using -} -PDWORDLONG { - TYPEDEF, name: PDWORDLONG, qitem: typedef, qtype: DWORDLONG, qptype: , natural: typedef DWORDLONG *PDWORDLONG, line 43, using -} -_LIST_ENTRY { - STRUCT, name: _LIST_ENTRY, qitem: struct, qtype: _LIST_ENTRY, qptype: , natural: struct _LIST_ENTRY, line 45, using - INSTANCEVARIABLE, name: Flink, qitem: Flink, qtype: _LIST_ENTRY, qptype: , natural: struct _LIST_ENTRY *Flink, line 46, using , pointer - INSTANCEVARIABLE, name: Blink, qitem: Blink, qtype: _LIST_ENTRY, qptype: , natural: struct _LIST_ENTRY *Blink, line 47, using , pointer -} -LIST_ENTRY { - TYPEDEF, name: LIST_ENTRY, qitem: typedef, qtype: _LIST_ENTRY, qptype: , natural: typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } LIST_ENTRY, line 47, using -} -PLIST_ENTRY { - TYPEDEF, name: PLIST_ENTRY, qitem: typedef, qtype: _LIST_ENTRY, qptype: , natural: typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } *PLIST_ENTRY, line 47, using -} -PRLIST_ENTRY { - TYPEDEF, name: PRLIST_ENTRY, qitem: typedef, qtype: _LIST_ENTRY, qptype: , natural: typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } * PRLIST_ENTRY, line 47, using -} - { -} -------------------------------------------------------------------------------- -**** test14.in -==== -.name { - STRUCT, name: .name, qitem: struct, qtype: .name, qptype: , natural: struct .name, line 1, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 2, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: .name::Foo, qptype: , natural: struct Foo { int a; } y, line 4, using - INSTANCEVARIABLE, name: quack, qitem: quack, qtype: .quack, qptype: , natural: struct { int foo; } quack, line 10, using -} -.name::Foo { - STRUCT, name: Foo, qitem: struct, qtype: .name::Foo, qptype: , natural: struct Foo, line 3, using - INSTANCEVARIABLE, name: a, qitem: a, qtype: , qptype: , natural: int a, line 4, using -} -.name::=/title { - STRUCT, name: =/title, qitem: struct, qtype: =/title, qptype: , natural: struct =/title, line 6, using - INSTANCEVARIABLE, name: bar, qitem: bar, qtype: , qptype: , natural: int bar, line 7, using -} -.name::.quack { - STRUCT, name: .quack, qitem: struct, qtype: .quack, qptype: , natural: struct .quack, line 9, using - INSTANCEVARIABLE, name: foo, qitem: foo, qtype: , qptype: , natural: int foo, line 10, using -} -name { - TYPEDEF, name: name, qitem: typedef, qtype: .name, qptype: , natural: typedef struct { int x; struct Foo { int a; } y; struct { int bar; }; struct { int foo; } quack; } name, line 10, using -} -std { - NAMESPACE, name: std, qitem: namespace std, qtype: , qptype: , natural: namespace std, line 14, using -} -std::string { - STRUCT, name: string, qitem: struct, qtype: std::string, qptype: , natural: struct string, line 15, using -} -Bar { - STRUCT, name: Bar, qitem: struct, qtype: Bar, qptype: , natural: struct Bar, line 22, using std - INSTANCEFUNCTION, name: Foo, qitem: Foo(Bar::string), qtype: std::string, qptype: Bar::string, natural: std::string Foo(string a), line 25, using std -} -Bar::string { - STRUCT, name: string, qitem: struct, qtype: Bar::string, qptype: , natural: struct string, line 23, using std -} - { - FUNCTION, name: Foo, qitem: Foo(std::string), qtype: , qptype: std::string, natural: void Foo(string a), line 28, using std -} - { -} -------------------------------------------------------------------------------- -**** test15.in -==== - { - MACRO, name: _THROW0, qitem: _THROW0(), qtype: , qptype: , natural: _THROW0(), line 1, using - FUNCTION, name: Test, qitem: Test(), qtype: , qptype: , natural: void Test(), line 3, using -} - { -} -------------------------------------------------------------------------------- -**** test16.in -==== - { - ENUM, name: MandatoryLevelUntrusted, qitem: MandatoryLevelUntrusted, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelUntrusted = 0, line 2, using - ENUM, name: MandatoryLevelLow, qitem: MandatoryLevelLow, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelLow, line 3, using - ENUM, name: MandatoryLevelMedium, qitem: MandatoryLevelMedium, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelMedium, line 4, using - ENUM, name: MandatoryLevelHigh, qitem: MandatoryLevelHigh, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelHigh, line 5, using - ENUM, name: MandatoryLevelSystem, qitem: MandatoryLevelSystem, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelSystem, line 6, using - ENUM, name: MandatoryLevelSecureProcess, qitem: MandatoryLevelSecureProcess, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelSecureProcess, line 7, using - ENUM, name: MandatoryLevelCount, qitem: MandatoryLevelCount, qtype: , qptype: , natural: enum _MANDATORY_LEVEL MandatoryLevelCount, line 8, using -} - { -} -------------------------------------------------------------------------------- -**** test17.in -==== -_LIST_ENTRY { - STRUCT, name: _LIST_ENTRY, qitem: struct, qtype: _LIST_ENTRY, qptype: , natural: struct _LIST_ENTRY, line 1, using - INSTANCEVARIABLE, name: Flink, qitem: Flink, qtype: _LIST_ENTRY, qptype: , natural: struct _LIST_ENTRY *Flink, line 2, using , pointer - INSTANCEVARIABLE, name: Blink, qitem: Blink, qtype: _LIST_ENTRY, qptype: , natural: struct _LIST_ENTRY *Blink, line 3, using , pointer -} -LIST_ENTRY { - TYPEDEF, name: LIST_ENTRY, qitem: typedef, qtype: _LIST_ENTRY, qptype: , natural: typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } LIST_ENTRY, line 3, using -} -PLIST_ENTRY { - TYPEDEF, name: PLIST_ENTRY, qitem: typedef, qtype: _LIST_ENTRY, qptype: , natural: typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } *PLIST_ENTRY, line 3, using -} -PRLIST_ENTRY { - TYPEDEF, name: PRLIST_ENTRY, qitem: typedef, qtype: _LIST_ENTRY, qptype: , natural: typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } * PRLIST_ENTRY, line 3, using -} - { -} -------------------------------------------------------------------------------- -**** test18.in -==== - { - FUNCTION, name: EncodeHtml, qitem: EncodeHtml(const String&,const VectorMap&), qtype: String, qptype: String;VectorMap, natural: String EncodeHtml(const String& x, const VectorMap& escape = VectorMap()), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test19.in -==== - { - FUNCTION, name: function, qitem: function(string[4],int[4][5],const int&,int(*)[4]), qtype: , qptype: string;;;, natural: int function(string x[4], int y[4][5], const int& x, int (*f)[4]), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test20.in -==== - { -} -------------------------------------------------------------------------------- -**** test21.in -==== - { - FUNCTION, name: foo, qitem: foo(), qtype: , qptype: , natural: int foo(), line 1, using - VARIABLE, name: bar, qitem: bar, qtype: Bar, qptype: , natural: static Bar bar, line 5, using -} - { -} -------------------------------------------------------------------------------- -**** test22.in -errs: - [0] = 61: Name expected -==== -ERRORS: [61: Name expected] - { - VARIABLE, name: cpp_file_mutex, qitem: cpp_file_mutex, qtype: StaticMutex, qptype: , natural: static StaticMutex cpp_file_mutex, line 8, using - VARIABLE, name: cpp_file, qitem: cpp_file, qtype: Index, qptype: , natural: static Index cpp_file, line 9, using - FUNCTION, name: GetCppFileIndex, qitem: GetCppFileIndex(const String&), qtype: , qptype: String, natural: int GetCppFileIndex(const String& path), line 11, using - FUNCTION, name: GetCppFile, qitem: GetCppFile(int), qtype: String, qptype: , natural: const String& GetCppFile(int i), line 19, using - FUNCTION, name: SLPos, qitem: SLPos(SrcFile&), qtype: , qptype: SrcFile, natural: void SLPos(SrcFile& res), line 49, using - FUNCTION, name: Foo, qitem: Foo(int,const String&), qtype: , qptype: ;String, natural: void Foo(int x, const String& y), line 63, using - FUNCTION, name: Foo, qitem: Foo(int,const String&), qtype: , qptype: ;String, natural: void Foo(int x, const String& y), line 65, using - FUNCTION, name: PreProcess, qitem: PreProcess(Stream&), qtype: SrcFile, qptype: Stream, natural: SrcFile PreProcess(Stream& in), line 67, using -} -SrcFile { - CONSTRUCTOR, name: SrcFile, qitem: SrcFile(), qtype: , qptype: , natural: SrcFile(), line 54, using -} - { -} -------------------------------------------------------------------------------- -**** test23.in -==== -TreeNodeInfo { - STRUCT, name: TreeNodeInfo, qitem: class, qtype: TreeNodeInfo, qptype: Moveable, natural: class TreeNodeInfo : private Moveable , line 1, using - ENUM, name: SMALLCHARS, qitem: SMALLCHARS, qtype: , qptype: , natural: enum SMALLCHARS = 40 , line 2, using - INSTANCEVARIABLE, name: kind, qitem: kind, qtype: int8, qptype: , natural: int8 kind, line 4, using - INSTANCEVARIABLE, name: len, qitem: len, qtype: byte, qptype: , natural: byte len, line 5, using - INSTANCEVARIABLE, name: impressions, qitem: impressions, qtype: word, qptype: , natural: word impressions, line 6, using - INSTANCEVARIABLE, name: sortaccel, qitem: sortaccel, qtype: dword, qptype: , natural: dword sortaccel, line 7, using - ENUM, name: EMPTY, qitem: EMPTY, qtype: , qptype: , natural: enum EMPTY = -100 , line 33, using - INSTANCEFUNCTION, name: Ext, qitem: Ext(), qtype: TreeNodeInfo::Extended, qptype: , natural: Extended& Ext(), line 35, using - INSTANCEFUNCTION, name: Free, qitem: Free(), qtype: , qptype: , natural: void Free(), line 36, using - INSTANCEFUNCTION, name: Init, qitem: Init(), qtype: , qptype: , natural: void Init(), line 37, using - INSTANCEFUNCTION, name: Copy, qitem: Copy(const TreeNodeInfo&), qtype: , qptype: TreeNodeInfo, natural: void Copy(const TreeNodeInfo& src), line 38, using - INSTANCEFUNCTION, name: GetName, qitem: GetName()const, qtype: String, qptype: , natural: String GetName() const, line 44, using - INSTANCEFUNCTION, name: GetUrlName, qitem: GetUrlName()const, qtype: String, qptype: , natural: String GetUrlName() const, line 45, using - INSTANCEFUNCTION, name: GetNameA, qitem: GetNameA()const, qtype: String, qptype: , natural: String GetNameA() const, line 46, using - INSTANCEFUNCTION, name: GetUrlNameA, qitem: GetUrlNameA()const, qtype: String, qptype: , natural: String GetUrlNameA() const, line 48, using - INSTANCEFUNCTION, name: GetAltName, qitem: GetAltName()const, qtype: String, qptype: , natural: String GetAltName() const, line 49, using - INSTANCEFUNCTION, name: GetAltNameA, qitem: GetAltNameA()const, qtype: String, qptype: , natural: String GetAltNameA() const, line 50, using - INSTANCEFUNCTION, name: GetTitle, qitem: GetTitle()const, qtype: String, qptype: , natural: String GetTitle() const, line 51, using - INSTANCEFUNCTION, name: GetTitleA, qitem: GetTitleA()const, qtype: String, qptype: , natural: String GetTitleA() const, line 52, using - INSTANCEFUNCTION, name: GetDoubledId, qitem: GetDoubledId()const, qtype: , qptype: , natural: int GetDoubledId() const, line 54, using - INSTANCEFUNCTION, name: GetParentId, qitem: GetParentId()const, qtype: , qptype: , natural: int GetParentId() const, line 55, using - INSTANCEFUNCTION, name: GetMasterId, qitem: GetMasterId()const, qtype: , qptype: , natural: int GetMasterId() const, line 56, using - INSTANCEFUNCTION, name: GetImpressions, qitem: GetImpressions()const, qtype: , qptype: , natural: int GetImpressions() const, line 58, using - INSTANCEFUNCTION, name: GetNodeId, qitem: GetNodeId()const, qtype: String, qptype: , natural: String GetNodeId() const, line 60, using - INSTANCEFUNCTION, name: IsMaster, qitem: IsMaster()const, qtype: , qptype: , natural: bool IsMaster() const, line 61, using - INSTANCEFUNCTION, name: NoProtection, qitem: NoProtection()const, qtype: , qptype: , natural: bool NoProtection() const, line 62, using - INSTANCEFUNCTION, name: NoSameCustomer, qitem: NoSameCustomer()const, qtype: , qptype: , natural: bool NoSameCustomer() const, line 63, using - INSTANCEFUNCTION, name: NoOccupancyHigh, qitem: NoOccupancyHigh()const, qtype: , qptype: , natural: bool NoOccupancyHigh() const, line 64, using - INSTANCEFUNCTION, name: NonCommercial, qitem: NonCommercial()const, qtype: , qptype: , natural: bool NonCommercial() const, line 65, using - INSTANCEFUNCTION, name: Erotica, qitem: Erotica()const, qtype: , qptype: , natural: bool Erotica() const, line 66, using - INSTANCEFUNCTION, name: IsExtended, qitem: IsExtended()const, qtype: , qptype: , natural: bool IsExtended() const, line 68, using - INSTANCEFUNCTION, name: Less, qitem: Less(dword,const char*,int,const char*,int)const, qtype: , qptype: dword;;;;, natural: int Less(dword sortaccel, const char *aname, int alen, const char *name, int len) const, line 70, using - INSTANCEFUNCTION, name: Less, qitem: Less(const TreeNodeInfo&)const, qtype: , qptype: TreeNodeInfo, natural: int Less(const TreeNodeInfo& b) const, line 71, using - INSTANCEFUNCTION, name: Serialize, qitem: Serialize(Stream&), qtype: , qptype: Stream, natural: void Serialize(Stream& s), line 73, using - INSTANCEFUNCTION, name: operator=, qitem: operator=(const TreeNodeInfo&), qtype: TreeNodeInfo, qptype: TreeNodeInfo, natural: TreeNodeInfo& operator=(const TreeNodeInfo& src), line 75, using - CONSTRUCTOR, name: TreeNodeInfo, qitem: TreeNodeInfo(const TreeNodeInfo&), qtype: , qptype: TreeNodeInfo, natural: TreeNodeInfo(const TreeNodeInfo& src), line 76, using - CONSTRUCTOR, name: TreeNodeInfo, qitem: TreeNodeInfo(), qtype: , qptype: , natural: TreeNodeInfo(), line 77, using - DESTRUCTOR, name: TreeNodeInfo, qitem: ~TreeNodeInfo(), qtype: , qptype: , natural: ~TreeNodeInfo(), line 78, using -} -TreeNodeInfo::Extended { - STRUCT, name: Extended, qitem: struct, qtype: TreeNodeInfo::Extended, qptype: , natural: struct Extended, line 9, using - INSTANCEVARIABLE, name: name, qitem: name, qtype: String, qptype: , natural: String name, line 10, using - INSTANCEVARIABLE, name: aname, qitem: aname, qtype: String, qptype: , natural: String aname, line 11, using - INSTANCEVARIABLE, name: urlname, qitem: urlname, qtype: String, qptype: , natural: String urlname, line 12, using - INSTANCEVARIABLE, name: aurlname, qitem: aurlname, qtype: String, qptype: , natural: String aurlname, line 13, using - INSTANCEVARIABLE, name: title, qitem: title, qtype: String, qptype: , natural: String title, line 14, using - INSTANCEVARIABLE, name: atitle, qitem: atitle, qtype: String, qptype: , natural: String atitle, line 15, using - INSTANCEVARIABLE, name: altname, qitem: altname, qtype: String, qptype: , natural: String altname, line 16, using - INSTANCEVARIABLE, name: aaltname, qitem: aaltname, qtype: String, qptype: , natural: String aaltname, line 17, using - INSTANCEVARIABLE, name: nodeid, qitem: nodeid, qtype: String, qptype: , natural: String nodeid, line 18, using - INSTANCEVARIABLE, name: doubled_id, qitem: doubled_id, qtype: , qptype: , natural: int doubled_id, line 19, using - INSTANCEVARIABLE, name: parent_id, qitem: parent_id, qtype: , qptype: , natural: int parent_id, line 20, using - INSTANCEVARIABLE, name: master_id, qitem: master_id, qtype: , qptype: , natural: int master_id, line 21, using - INSTANCEVARIABLE, name: impressions, qitem: impressions, qtype: , qptype: , natural: int impressions, line 22, using - INSTANCEVARIABLE, name: master, qitem: master, qtype: , qptype: , natural: bool master, line 24, using - INSTANCEVARIABLE, name: noprotection, qitem: noprotection, qtype: , qptype: , natural: bool noprotection, line 24, using - INSTANCEVARIABLE, name: nosamecustomer, qitem: nosamecustomer, qtype: , qptype: , natural: bool nosamecustomer, line 24, using - INSTANCEVARIABLE, name: nooccupancyhigh, qitem: nooccupancyhigh, qtype: , qptype: , natural: bool nooccupancyhigh, line 24, using - INSTANCEVARIABLE, name: noncommercial, qitem: noncommercial, qtype: , qptype: , natural: bool noncommercial, line 24, using - INSTANCEVARIABLE, name: erotica, qitem: erotica, qtype: , qptype: , natural: bool erotica, line 24, using - CONSTRUCTOR, name: Extended, qitem: Extended(), qtype: , qptype: , natural: Extended(), line 26, using -} -TreeNodeInfo::=/title { - STRUCT, name: =/title, qitem: union, qtype: =/title, qptype: , natural: union =/title, line 28, using - INSTANCEVARIABLE, name: extended, qitem: extended, qtype: TreeNodeInfo::Extended, qptype: , natural: Extended *extended, line 29, using , pointer - INSTANCEVARIABLE, name: text, qitem: text, qtype: , qptype: , natural: char text[SMALLCHARS], line 30, using , pointer -} - { -} -------------------------------------------------------------------------------- -**** test24.in -==== - { - MACRO, name: KRPANO_TOUR_XML, qitem: KRPANO_TOUR_XML, qtype: , qptype: , natural: KRPANO_TOUR_XML, line 9, using - MACRO, name: TEST, qitem: TEST(x), qtype: , qptype: , natural: TEST(x), line 10, using - MACRO, name: TEST2, qitem: TEST2(x, y), qtype: , qptype: , natural: TEST2(x, y), line 11, using - ENUM, name: RES_IMAGE, qitem: RES_IMAGE, qtype: , qptype: , natural: enum ResourceType RES_IMAGE = 0, line 2, using - ENUM, name: RES_SWF, qitem: RES_SWF, qtype: , qptype: , natural: enum ResourceType RES_SWF = 1, line 3, using - ENUM, name: RES_ATTACHMENT, qitem: RES_ATTACHMENT, qtype: , qptype: , natural: enum ResourceType RES_ATTACHMENT = 2, line 4, using - ENUM, name: RES_DOWNLOAD, qitem: RES_DOWNLOAD, qtype: , qptype: , natural: enum ResourceType RES_DOWNLOAD = 3, line 5, using - ENUM, name: RES_SCREENSHOT, qitem: RES_SCREENSHOT, qtype: , qptype: , natural: enum ResourceType RES_SCREENSHOT = 4, line 6, using - ENUM, name: RES_UPLOADED_IMAGE, qitem: RES_UPLOADED_IMAGE, qtype: , qptype: , natural: enum ResourceType RES_UPLOADED_IMAGE = 5, line 7, using - ENUM, name: RES_PANORAMA_TREE_NFS, qitem: RES_PANORAMA_TREE_NFS, qtype: , qptype: , natural: enum ResourceType RES_PANORAMA_TREE_NFS = 6, line 12, using -} - { -} -------------------------------------------------------------------------------- -**** test25.inc -==== - { - FUNCTION, name: deflateInit_, qitem: deflateInit_(strm,level,version,stream_size)z_streamp strm;int level;const char*version;int stream_size;, qtype: , qptype: strm;level;version;stream_size, natural: int deflateInit_(strm, level, version, stream_size) z_streamp strm; int level; const char *version; int stream_size;, line 1, using - FUNCTION, name: Foo, qitem: Foo(int,Bar*), qtype: , qptype: ;Bar, natural: void Foo(int x, Bar *y), line 12, using -} -AAA { - STRUCT, name: AAA, qitem: struct, qtype: AAA, qptype: , natural: struct AAA, line 14, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 15, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: int y, line 15, using -} - { -} -------------------------------------------------------------------------------- -**** test26.in -==== -Foo { - INSTANCEFUNCTION, name: Foo, qitem: Foo(), qtype: , qptype: , natural: void Foo(), line 1, using - INSTANCEFUNCTION, name: Bar, qitem: Bar(), qtype: , qptype: , natural: void Bar(), line 3, using - INSTANCEFUNCTION, name: Bar2, qitem: Bar2(), qtype: , qptype: , natural: void Bar2(), line 5, using -} - { -x , line: 7 -} -------------------------------------------------------------------------------- -**** test27.in -==== -Alfa { - STRUCT, name: Alfa, qitem: struct, qtype: Alfa, qptype: , natural: struct Alfa, line 1, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: unsigned x:5, line 2, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: unsigned y:10, line 3, using - INSTANCEVARIABLE, name: h, qitem: h, qtype: String, qptype: , natural: String h, line 4, using -} - { -} -------------------------------------------------------------------------------- -**** test28.in -==== -Vector { - STRUCTTEMPLATE, name: Vector, qitem: struct, qtype: Vector, qptype: , natural: template struct Vector, line 1, using - INSTANCEFUNCTION, name: begin, qitem: begin(), qtype: Vector::Iterator, qptype: , natural: Iterator begin(), line 8, using -} -Vector::Iterator { - STRUCT, name: Iterator, qitem: struct, qtype: Vector::Iterator, qptype: , natural: struct Iterator, line 3, using - INSTANCEFUNCTIONTEMPLATE, name: operator->, qitem: operator->(T), qtype: V, qptype: 0, natural: template V operator->(T), line 4, using -} -Point { - STRUCT, name: Point, qitem: struct, qtype: Point, qptype: , natural: struct Point, line 11, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: x, qptype: , natural: xy, line 11, using -} - { - FUNCTION, name: Foo, qitem: Foo(), qtype: , qptype: , natural: void Foo(), line 13, using -} - { -x Point, line: 14 -v Vector, line: 15 -y Point, line: 16 -vv Vector, line: 17 -i Point, line: 18 -ii Point, line: 19 -} -------------------------------------------------------------------------------- -**** test29.in -==== -Upp { - NAMESPACE, name: Upp, qitem: namespace Upp, qtype: , qptype: , natural: namespace Upp, line 1, using -} -Upp::Vector { - STRUCT, name: Vector, qitem: struct, qtype: Upp::Vector, qptype: , natural: struct Vector, line 3, using -} -Upp::Vector::Iterator { - TYPEDEF, name: Iterator, qitem: typedef, qtype: T, qptype: , natural: typedef T *Iterator, line 4, using -} -Upp::AMap { - STRUCTTEMPLATE, name: AMap, qitem: struct, qtype: Upp::AMap, qptype: , natural: template struct AMap, line 7, using -} -Upp::AMap::Iterator { - TYPEDEF, name: Iterator, qitem: typedef, qtype: 2::Iterator, qptype: , natural: typedef typename V::Iterator Iterator, line 9, using -} -Upp::VectorMap { - STRUCTTEMPLATE, name: VectorMap, qitem: struct, qtype: Upp::VectorMap, qptype: MoveableAndDeepCopyOption>;Upp::AMap<0,1,Upp::Vector<1>,2>, natural: template > struct VectorMap : public MoveableAndDeepCopyOption >, public AMap< K, T, Vector, HashFn > , line 12, using -} -Upp::VectorMap::Iterator { - TYPEDEF, name: Iterator, qitem: typedef, qtype: Upp::AMap,HashFn>::Iterator, qptype: , natural: typedef typename AMap< K, T, Vector, HashFn >::Iterator Iterator, line 15, using -} -Upp::VectorMap::iterator { - TYPEDEF, name: iterator, qitem: typedef, qtype: Upp::VectorMap::Iterator, qptype: , natural: typedef Iterator iterator, line 16, using -} - { -} -------------------------------------------------------------------------------- -**** test30.in -==== -Point { - STRUCT, name: Point, qitem: struct, qtype: Point, qptype: , natural: struct Point, line 1, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 1, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: int y, line 1, using -} - { - FUNCTION, name: Fn, qitem: Fn(), qtype: , qptype: , natural: void Fn(), line 3, using -} - { -a Point, line: 6 -b Point, line: 7 -c Point, line: 8 -d Point, line: 8 -p Point, line: 9 -} -------------------------------------------------------------------------------- -**** test31.in -==== - { - ENUM, name: ONE, qitem: ONE, qtype: , qptype: , natural: enum Foo ONE, line 1, using - ENUM, name: TWO, qitem: TWO, qtype: , qptype: , natural: enum Foo TWO, line 1, using - ENUM, name: AONE, qitem: AONE, qtype: , qptype: , natural: enum FooA AONE, line 3, using - ENUM, name: ATWO, qitem: ATWO, qtype: , qptype: , natural: enum FooA ATWO, line 3, using - ENUM, name: EE1, qitem: EE1, qtype: , qptype: , natural: enum EE EE1 = 1, line 5, using - ENUM, name: EE2, qitem: EE2, qtype: , qptype: , natural: enum EE EE2 = 2, line 5, using - ENUM, name: EEbig, qitem: EEbig, qtype: , qptype: , natural: enum EE EEbig = 0xFFFFFFF0U , line 5, using -} -ClassFoo { - STRUCT, name: ClassFoo, qitem: class, qtype: ClassFoo, qptype: , natural: class enum ClassFoo, line 7, using - ENUM, name: ClONE, qitem: ClONE, qtype: , qptype: , natural: enum ClONE, line 7, using - ENUM, name: ClBTWO, qitem: ClBTWO, qtype: , qptype: , natural: enum ClBTWO, line 7, using -} -Cl3Foo { - STRUCT, name: Cl3Foo, qitem: class, qtype: Cl3Foo, qptype: , natural: class enum Cl3Foo, line 9, using - ENUM, name: C3ONE, qitem: C3ONE, qtype: , qptype: , natural: enum C3ONE, line 9, using - ENUM, name: C3TWO, qitem: C3TWO, qtype: , qptype: , natural: enum C3TWO, line 9, using -} - { -} -------------------------------------------------------------------------------- -**** test32.in -==== -Test { - STRUCTTEMPLATE, name: Test, qitem: class, qtype: Test, qptype: , natural: template class Test, line 5, using - INSTANCEVARIABLE, name: a, qitem: a, qtype: 0, qptype: , natural: T a, line 8, using - INSTANCEVARIABLE, name: b, qitem: b, qtype: 1, qptype: , natural: U b, line 9, using -} -Y { - STRUCT, name: Y, qitem: class, qtype: Y, qptype: , natural: class Y, line 12, using - INSTANCEFUNCTION, name: operator=, qitem: operator=(const Y&), qtype: Y, qptype: Y, natural: Y& operator=(const Y&) = default, line 13, using - CONSTRUCTOR, name: Y, qitem: Y(const Y&), qtype: , qptype: Y, natural: Y(const Y&) = default, line 14, using -} - { - FUNCTION, name: operator|, qitem: operator|(Flags,Flags), qtype: , qptype: Flags;Flags, natural: constexpr int operator|(Flags f1, Flags f2), line 17, using - VARIABLE, name: aligned_array, qitem: aligned_array, qtype: , qptype: , natural: alignas(double) unsigned char aligned_array[1024], line 34, using , pointer - FUNCTION, name: foo, qitem: foo(double)noexcept, qtype: , qptype: , natural: double foo(double) noexcept, line 36, using - VARIABLE, name: override, qitem: override, qtype: , qptype: , natural: int override, line 43, using - VARIABLE, name: final, qitem: final, qtype: , qptype: , natural: int final, line 44, using - VARIABLE, name: ThreadLocal, qitem: ThreadLocal, qtype: , qptype: , natural: thread_local int ThreadLocal, line 46, using - VARIABLE, name: in_inline_namespace, qitem: in_inline_namespace, qtype: , qptype: , natural: int in_inline_namespace, line 49, using - FUNCTION, name: Fn, qitem: Fn(), qtype: , qptype: , natural: void Fn(), line 52, using -} -X { - STRUCT, name: X, qitem: class, qtype: X, qptype: , natural: class X, line 19, using - CONSTRUCTOR, name: X, qitem: X(int), qtype: , qptype: , natural: X(int x), line 20, using - CONSTRUCTOR, name: X, qitem: X(), qtype: , qptype: , natural: X(), line 21, using - CONSTRUCTOR, name: X, qitem: X(string), qtype: , qptype: string, natural: X(string s), line 22, using -} -Point { - STRUCT, name: Point, qitem: struct, qtype: Point, qptype: , natural: struct Point, line 26, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 26, using - INSTANCEVARIABLE, name: y, qitem: y, qtype: , qptype: , natural: int y, line 26, using -} -U1 { - STRUCT, name: U1, qitem: union, qtype: U1, qptype: , natural: union U1, line 28, using - INSTANCEVARIABLE, name: m1, qitem: m1, qtype: , qptype: , natural: int m1, line 29, using - INSTANCEVARIABLE, name: m2, qitem: m2, qtype: complex, qptype: , natural: complex m2, line 30, using - INSTANCEVARIABLE, name: m3, qitem: m3, qtype: string, qptype: , natural: string m3, line 31, using -} -OverrideFinal { - STRUCT, name: OverrideFinal, qitem: struct, qtype: OverrideFinal, qptype: , natural: struct OverrideFinal, line 38, using - INSTANCEFUNCTION, name: Foo, qitem: Foo()final, qtype: , qptype: , natural: void Foo() final, line 39, using - INSTANCEFUNCTION, name: Bar, qitem: Bar()override, qtype: , qptype: , natural: void Bar() override, line 40, using -} - { -x Test>,Point>, line: 55 -y Test>,Point>, line: 56 -x , line: 57 -y , line: 59 -ll , line: 60 -p pointer, line: 61 -} -------------------------------------------------------------------------------- -**** test33.in -==== - { - FUNCTION, name: Foo, qitem: Foo(int), qtype: String, qptype: , natural: auto Foo(int x) -> String, line 1, using - FUNCTIONTEMPLATE, name: Test, qitem: Test(), qtype: @function(T)+v, qptype: , natural: template decltype(function(T) + v) Test(), line 3, using - FUNCTION, name: Bar, qitem: Bar(int,int), qtype: @x+y, qptype: ;, natural: auto Bar(int x, int y) -> decltype(x + y), line 6, using - FUNCTIONTEMPLATE, name: Body, qitem: Body(), qtype: , qptype: , natural: template void Body(), line 8, using -} - { -hh @H + H, line: 11 -} -------------------------------------------------------------------------------- -**** test34.in -==== -Foo { - TYPEDEF, name: Foo, qitem: typedef, qtype: String, qptype: , natural: using Foo, line 1, using - TYPEDEF, name: Foo, qitem: typedef, qtype: String, qptype: , natural: using Foo, line 6, using -} -Vec { - TYPEDEF, name: Vec, qitem: typedef, qtype: vector>, qptype: , natural: using Vec = std::vector>, line 3, using - TYPEDEF, name: Vec, qitem: typedef, qtype: vector>, qptype: , natural: using Vec = std::vector> *, line 8, using - TYPEDEF, name: Vec, qitem: typedef, qtype: vector>, qptype: , natural: using Vec = std::vector> volatile * const, line 11, using -} - { -} -------------------------------------------------------------------------------- -**** test35.in -==== - { - VARIABLE, name: backpaint, qitem: backpaint, qtype: byte, qptype: , natural: byte backpaint:2, line 1, using - VARIABLE, name: hasdhctrl, qitem: hasdhctrl, qtype: , qptype: , natural: bool hasdhctrl:1, line 2, using -} - { -} -------------------------------------------------------------------------------- -**** test36.in -==== -StaticVariableTest { - STRUCT, name: StaticVariableTest, qitem: struct, qtype: StaticVariableTest, qptype: , natural: struct StaticVariableTest, line 1, using - CLASSVARIABLE, name: foo, qitem: foo, qtype: , qptype: , natural: static int foo, line 2, using - CLASSVARIABLE, name: bar, qitem: bar, qtype: String, qptype: , natural: static String bar, line 3, using - CLASSVARIABLE, name: foo, qitem: foo, qtype: , qptype: , natural: int StaticVariableTest::foo, line 6, using - CLASSVARIABLE, name: bar, qitem: bar, qtype: String, qptype: , natural: String StaticVariableTest::bar, line 7, using -} - { -} -------------------------------------------------------------------------------- -**** test37.in -==== -Ns { - NAMESPACE, name: Ns, qitem: namespace Ns, qtype: , qptype: , natural: namespace Ns, line 1, using - ENUM, name: SM_NONE, qitem: SM_NONE, qtype: , qptype: , natural: enum SM_NONE, line 3, using - ENUM, name: SM_SINGLE, qitem: SM_SINGLE, qtype: , qptype: , natural: enum SM_SINGLE, line 3, using - ENUM, name: SM_DOUBLE, qitem: SM_DOUBLE, qtype: , qptype: , natural: enum SM_DOUBLE, line 3, using - VARIABLE, name: var1, qitem: var1, qtype: , qptype: , natural: enum var1, line 3, using - VARIABLE, name: String, qitem: String, qtype: , qptype: , natural: enum String, line 3, using -} -Ns::Foo { - STRUCT, name: Foo, qitem: struct, qtype: Ns::Foo, qptype: , natural: struct Foo, line 7, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 8, using - ENUM, name: SM_NONE, qitem: SM_NONE, qtype: , qptype: , natural: enum SM_NONE, line 9, using - ENUM, name: SM_SINGLE, qitem: SM_SINGLE, qtype: , qptype: , natural: enum SM_SINGLE, line 9, using - ENUM, name: SM_DOUBLE, qitem: SM_DOUBLE, qtype: , qptype: , natural: enum SM_DOUBLE, line 9, using - INSTANCEVARIABLE, name: var2, qitem: var2, qtype: , qptype: , natural: enum var2, line 9, using -} - { -} -------------------------------------------------------------------------------- -**** test38.in -==== -Foo { - STRUCT, name: Foo, qitem: struct, qtype: Foo, qptype: , natural: struct Foo, line 1, using - INSTANCEVARIABLE, name: rect, qitem: rect, qtype: Rect, qptype: , natural: Rect rect, line 2, using - CONSTRUCTOR, name: Foo, qitem: Foo(Rect), qtype: , qptype: Rect, natural: Foo(Rect r), line 3, using - CONSTRUCTOR, name: Foo, qitem: Foo(Rect), qtype: , qptype: Rect, natural: Foo(Rect r), line 6, using -} - { -r Rect, line: 6 -} -------------------------------------------------------------------------------- -**** test39.in -errs: - [0] = 63: Name expected -==== -ERRORS: [63: Name expected] - { - VARIABLE, name: cpp_file_mutex, qitem: cpp_file_mutex, qtype: StaticMutex, qptype: , natural: static StaticMutex cpp_file_mutex, line 10, using - VARIABLE, name: cpp_file, qitem: cpp_file, qtype: Index, qptype: , natural: static Index cpp_file, line 11, using - FUNCTION, name: GetCppFileIndex, qitem: GetCppFileIndex(const String&), qtype: , qptype: String, natural: int GetCppFileIndex(const String& path), line 13, using - FUNCTION, name: GetCppFile, qitem: GetCppFile(int), qtype: String, qptype: , natural: const String& GetCppFile(int i), line 21, using - FUNCTION, name: SLPos, qitem: SLPos(SrcFile&), qtype: , qptype: SrcFile, natural: void SLPos(SrcFile& res), line 51, using - FUNCTION, name: Foo, qitem: Foo(int,const String&), qtype: , qptype: ;String, natural: void Foo(int x, const String& y), line 65, using - FUNCTION, name: Foo, qitem: Foo(int,const String&), qtype: , qptype: ;String, natural: void Foo(int x, const String& y), line 67, using - FUNCTION, name: PreProcess, qitem: PreProcess(Stream&), qtype: SrcFile, qptype: Stream, natural: SrcFile PreProcess(Stream& in), line 69, using -} -SrcFile { - CONSTRUCTOR, name: SrcFile, qitem: SrcFile(), qtype: , qptype: , natural: SrcFile(), line 56, using -} - { -} -------------------------------------------------------------------------------- -**** test40.in -==== -Foo { - STRUCT, name: Foo, qitem: struct, qtype: Foo, qptype: , natural: struct Foo, line 1, using - CONSTRUCTOR, name: Foo, qitem: Foo()noexcept, qtype: , qptype: , natural: Foo() noexcept, line 2, using - CONSTRUCTOR, name: Foo, qitem: Foo(int)noexcept(noexcept(anything)), qtype: , qptype: , natural: Foo(int) noexcept(noexcept(anything)), line 3, using -} - { -} -------------------------------------------------------------------------------- -**** test41.in -==== - { - FUNCTIONTEMPLATE, name: _M_emplace_unique, qitem: _M_emplace_unique(_Args&&...__args), qtype: , qptype: _Args;, natural: template bool _M_emplace_unique(_Args&&... __args), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test42.in -==== -basic_istream { - STRUCT, name: basic_istream, qitem: class, qtype: basic_istream, qptype: basic_ios, natural: class basic_istream : public virtual basic_ios, line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test43.in -==== -Foo { - INSTANCEFUNCTIONTEMPLATE, name: Bar, qitem: Bar(B), qtype: , qptype: B, natural: template , void Bar(B v), line 1, using -} - { -} -------------------------------------------------------------------------------- -**** test44.in -==== - { - FUNCTION, name: _S_chk, qitem: _S_chk(typename template rebind<_Tp2>::other*), qtype: , qptype: rebind<_Tp2>::other, natural: void _S_chk(typename _Alloc2::template rebind<_Tp2>::other*), line 3, using -} - { -} -------------------------------------------------------------------------------- -**** test45.in -==== -FooBar { - STRUCT, name: FooBar, qitem: struct, qtype: FooBar, qptype: , natural: struct FooBar, line 1, using - INSTANCEVARIABLE, name: x, qitem: x, qtype: , qptype: , natural: int x, line 2, using -} - { - FUNCTION, name: Autocomplete, qitem: Autocomplete(), qtype: , qptype: , natural: void Autocomplete(), line 5, using -} - { -b FooBar, line: 7 -} -------------------------------------------------------------------------------- -**** test46.in -==== - { - VARIABLE, name: test1, qitem: test1, qtype: Vector>, qptype: , natural: Vector > test1, line 1, using - VARIABLE, name: test2, qitem: test2, qtype: Vector>, qptype: , natural: Vector> test2, line 2, using -} - { -} -------------------------------------------------------------------------------- -**** test47.in -==== -Foo { - STRUCT, name: Foo, qitem: class, qtype: Foo, qptype: , natural: class enum Foo, line 1, using - ENUM, name: XX, qitem: XX, qtype: , qptype: , natural: enum XX, line 1, using -} -Foo8 { - STRUCT, name: Foo8, qitem: class, qtype: Foo8, qptype: , natural: class enum Foo8, line 3, using - ENUM, name: XX8, qitem: XX8, qtype: , qptype: , natural: enum XX8, line 3, using -} -Bar { - STRUCT, name: Bar, qitem: class, qtype: Bar, qptype: , natural: struct enum Bar, line 5, using - ENUM, name: BAR, qitem: BAR, qtype: , qptype: , natural: enum BAR, line 5, using -} - { - ENUM, name: A, qitem: A, qtype: , qptype: , natural: enum A, line 7, using - ENUM, name: B, qitem: B, qtype: , qptype: , natural: enum B, line 7, using - ENUM, name: C, qitem: C, qtype: , qptype: , natural: enum C, line 7, using - ENUM, name: AA, qitem: AA, qtype: , qptype: , natural: enum AA, line 9, using -} - { -} -------------------------------------------------------------------------------- diff --git a/autotest/CppParser/test0.in b/autotest/CppParser/test0.in deleted file mode 100644 index 8eee7ab51..000000000 --- a/autotest/CppParser/test0.in +++ /dev/null @@ -1,54 +0,0 @@ -namespace Upp { - struct Foo {}; - struct String { - Foo Bar(); - Foo bar; - }; - - template - class One { - T *operator->(); - }; - - template - T& Single() {} - - template - struct Array { - T& operator[](int i); - Foo operator()(int i); - }; -}; - - -using namespace Upp; - -class ResourceCache { -public: - ValueMap GetAttrs(); - - static ResourceCache& The(); -}; - -void Expressions() -{ - String str1; - Upp::String str2; - - auto s1 = str1; - auto s2 = str2; - - auto one = One(); - auto one1 = One()->Bar(); - auto one2 = One()->bar; - - auto single = Single(); - auto single1 = Single().Bar(); - auto single2 = Single().bar; - - Array a; - auto a1 = a[0]; - auto a2 = a[0].bar; - auto a3 = a(0); - - auto th = ResourceCache::The(); \ No newline at end of file diff --git a/autotest/CppParser/test1.in b/autotest/CppParser/test1.in deleted file mode 100644 index 6ef6e057b..000000000 --- a/autotest/CppParser/test1.in +++ /dev/null @@ -1,18 +0,0 @@ -void Test() {} - -class Foo { - Foo(); -}; - -struct Point { - int x, y; - Point *next; - Foo bar; -}; - -Point global; - -void foo() -{ - int x = 10; - Point a, b, *c; diff --git a/autotest/CppParser/test10.in b/autotest/CppParser/test10.in deleted file mode 100644 index 3c6148bca..000000000 --- a/autotest/CppParser/test10.in +++ /dev/null @@ -1,5 +0,0 @@ -template -class Moveable : public B -{ - int boo; -}; diff --git a/autotest/CppParser/test11.in b/autotest/CppParser/test11.in deleted file mode 100644 index b49d3270c..000000000 --- a/autotest/CppParser/test11.in +++ /dev/null @@ -1,3 +0,0 @@ -struct Foo { - friend class Bar; -}; diff --git a/autotest/CppParser/test12.in b/autotest/CppParser/test12.in deleted file mode 100644 index d42d6aee6..000000000 --- a/autotest/CppParser/test12.in +++ /dev/null @@ -1,11 +0,0 @@ -enum Alpha { - FOO, BAR -}; - -typedef enum { - FOO, BAR -} Beta; - -typedef enum Gamma { - FOO, BAR -} Gamma; diff --git a/autotest/CppParser/test13.in b/autotest/CppParser/test13.in deleted file mode 100644 index adc8c28bf..000000000 --- a/autotest/CppParser/test13.in +++ /dev/null @@ -1,48 +0,0 @@ -typedef struct _LARGE_INTEGER { - -typedef union _LARGE_INTEGER { - struct { - DWORD LowPart; - LONG HighPart; - } ; - struct { - DWORD LowPart; - LONG HighPart; - } u; - - LONGLONG QuadPart; -} LARGE_INTEGER; - -typedef LARGE_INTEGER *PLARGE_INTEGER; - - -typedef struct _ULARGE_INTEGER { - -typedef union _ULARGE_INTEGER { - struct { - DWORD LowPart; - DWORD HighPart; - } ; - struct { - DWORD LowPart; - DWORD HighPart; - } u; - - ULONGLONG QuadPart; -} ULARGE_INTEGER; - -typedef ULARGE_INTEGER *PULARGE_INTEGER; - -typedef struct _LUID { - DWORD LowPart; - LONG HighPart; -} LUID, *PLUID; - -#define _DWORDLONG_ -typedef ULONGLONG DWORDLONG; -typedef DWORDLONG *PDWORDLONG; - -typedef struct _LIST_ENTRY { - struct _LIST_ENTRY *Flink; - struct _LIST_ENTRY *Blink; -} LIST_ENTRY, *PLIST_ENTRY, * PRLIST_ENTRY; diff --git a/autotest/CppParser/test14.in b/autotest/CppParser/test14.in deleted file mode 100644 index 53bec2b07..000000000 --- a/autotest/CppParser/test14.in +++ /dev/null @@ -1,28 +0,0 @@ -typedef struct { - int x; - struct Foo { - int a; - } y; - struct { - int bar; - }; - struct { - int foo; - } quack; -} name; - -namespace std { - struct string {}; -}; - -// void Foo(string a); - -using namespace std; - -struct Bar { - struct string {}; - - std::string Foo(string a); -}; - -void Foo(string a); diff --git a/autotest/CppParser/test15.in b/autotest/CppParser/test15.in deleted file mode 100644 index b38f22f19..000000000 --- a/autotest/CppParser/test15.in +++ /dev/null @@ -1,3 +0,0 @@ - #define _THROW0() throw () - -void Test() _THROW0() diff --git a/autotest/CppParser/test16.in b/autotest/CppParser/test16.in deleted file mode 100644 index db644bf17..000000000 --- a/autotest/CppParser/test16.in +++ /dev/null @@ -1,9 +0,0 @@ -typedef enum _MANDATORY_LEVEL { - MandatoryLevelUntrusted = 0, - MandatoryLevelLow, - MandatoryLevelMedium, - MandatoryLevelHigh, - MandatoryLevelSystem, - MandatoryLevelSecureProcess, - MandatoryLevelCount -} MANDATORY_LEVEL, *PMANDATORY_LEVEL; diff --git a/autotest/CppParser/test17.in b/autotest/CppParser/test17.in deleted file mode 100644 index 1de062291..000000000 --- a/autotest/CppParser/test17.in +++ /dev/null @@ -1,4 +0,0 @@ -typedef struct _LIST_ENTRY { - struct _LIST_ENTRY *Flink; - struct _LIST_ENTRY *Blink; -} LIST_ENTRY, *PLIST_ENTRY, * PRLIST_ENTRY; diff --git a/autotest/CppParser/test18.in b/autotest/CppParser/test18.in deleted file mode 100644 index e037045a6..000000000 --- a/autotest/CppParser/test18.in +++ /dev/null @@ -1 +0,0 @@ -String EncodeHtml(const String& x, const VectorMap& escape = VectorMap()); diff --git a/autotest/CppParser/test19.in b/autotest/CppParser/test19.in deleted file mode 100644 index a116047d5..000000000 --- a/autotest/CppParser/test19.in +++ /dev/null @@ -1 +0,0 @@ -[attr] [attr] int function([attr] [attr] string x[4], [attr] int y[4][5], [attr] const int& x, int (*f)[4]); diff --git a/autotest/CppParser/test2.in b/autotest/CppParser/test2.in deleted file mode 100644 index f1215bde4..000000000 --- a/autotest/CppParser/test2.in +++ /dev/null @@ -1,5 +0,0 @@ -template -struct _CrtEnableIf -{ - typedef _Ty _Type; -}; diff --git a/autotest/CppParser/test20.in b/autotest/CppParser/test20.in deleted file mode 100644 index 1c8a0e797..000000000 --- a/autotest/CppParser/test20.in +++ /dev/null @@ -1 +0,0 @@ -; \ No newline at end of file diff --git a/autotest/CppParser/test21.in b/autotest/CppParser/test21.in deleted file mode 100644 index c58db0ff9..000000000 --- a/autotest/CppParser/test21.in +++ /dev/null @@ -1,5 +0,0 @@ -int static foo(); - -FOO - -static Bar bar; \ No newline at end of file diff --git a/autotest/CppParser/test22.in b/autotest/CppParser/test22.in deleted file mode 100644 index 59115301c..000000000 --- a/autotest/CppParser/test22.in +++ /dev/null @@ -1,199 +0,0 @@ -NAMESPACE_UPP - -#ifdef _MSC_VER -#pragma inline_depth(255) -#pragma optimize("t", on) -#endif - -static StaticMutex cpp_file_mutex; -static Index cpp_file; - -int GetCppFileIndex(const String& path) -{ - INTERLOCKED_(cpp_file_mutex) { - return cpp_file.FindAdd(path); - } - return -1; -} - -const String& GetCppFile(int i) -{ - INTERLOCKED_(cpp_file_mutex) { - return cpp_file[i]; - } - static String x; - return x; -} -/* -void CppPos::Serialize(Stream& s) -{ - s % impl % line; - String fn = GetCppFile(file); - s % fn; - file = GetCppFileIndex(fn); -} - -String SSpaces(const char *txt) -{ - StringBuffer r; - while(*txt) - if(*txt == ' ') { - while((byte)*txt <= ' ' && *txt) txt++; - r.Cat(' '); - } - else - r.Cat(*txt++); - return r; -} -*/ -void SLPos(SrcFile& res) -{ - res.linepos.Add(res.text.GetLength()); -} - -SrcFile::SrcFile() : - preprocessorLinesRemoved(0), - blankLinesRemoved(0), - commentLinesRemoved(0) -{ -} - -void 3BUG(); - -void Foo(int x, const String& y); - -void Foo(int x, const String& y) {} - -SrcFile PreProcess(Stream& in) -{ - SrcFile res; - bool include = true; - while(!in.IsEof()) { - String ln = in.GetLine(); - SLPos(res); - while(*ln.Last() == '\\') { - ln.Trim(ln.GetLength() - 1); - ln.Cat(in.GetLine()); - SLPos(res); - } - const char *rm = ln; - if(IsAlNum(*rm)) { - const char *s = ln.Last(); - while(s > rm && *s == ' ') s--; - if(*s != ':') - res.text << '\2'; - } - while(*rm == ' ' || *rm == '\t') rm++; - if(*rm == '\0') - res.blankLinesRemoved++; - else - if(*rm == '#') - { - if(rm[1] == 'd' && rm[2] == 'e' && rm[3] == 'f' && - rm[4] == 'i' && rm[5] == 'n' && rm[6] == 'e' && !iscid(rm[7])) { - const char *s = rm + 8; - while(*s == ' ') s++; - String macro; - while(iscid(*s)) - macro.Cat(*s++); - if(*s == '(') { - while(*s != ')' && *s) - macro.Cat(*s++); - macro << ')'; - } -// res.text << '#' << AsCString(SSpaces(macro)); - if(include) - res.text << '#' << AsCString(macro); - } - res.preprocessorLinesRemoved++; - } - else { - bool lineContainsComment = false; - bool lineContainsNonComment = false; - String cmd; - while(*rm) { - if(*rm == '\"') { - lineContainsNonComment = true; - res.text << '\"'; - rm++; - while((byte)*rm && *rm != '\r' && *rm != '\n') { - if(*rm == '\"') { - res.text << '\"'; - rm++; - break; - } - if(*rm == '\\' && rm[1]) { - if(include) - res.text.Cat(*rm); - rm++; - } - if(include) - res.text.Cat(*rm); - rm++; - } - } - else - if(*rm == '\\' && rm[1]) { - lineContainsNonComment = true; - if(include) { - res.text.Cat(*rm++); - res.text.Cat(*rm++); - } - else - rm += 2; - } - else - if(rm[0] == '/' && rm[1] == '/') { - cmd = rm + 2; - if(!lineContainsNonComment) - res.commentLinesRemoved++; - break; - } - else - if(rm[0] == '/' && rm[1] == '*') { - lineContainsComment = true; - rm += 2; - for(;;) { - if(*rm == '\0') { - if(!lineContainsNonComment) - res.commentLinesRemoved++; - if(in.IsEof()) break; - SLPos(res); - ln = in.GetLine(); - rm = ~ln; - lineContainsNonComment = false; - } - if(rm[0] == '*' && rm[1] == '/') { - rm += 2; - break; - } - rm++; - } - if(include) - res.text.Cat(' '); - } - else { - lineContainsNonComment = true; - if(include) - res.text.Cat(*rm); - rm++; - } - } - if(include) - res.text << ' '; - if(cmd[0] == '$') { - if(cmd[1] == '-') include = false; - if(cmd[1] == '+') include = true; - if(cmd[1]) { - res.text.Cat(~cmd + 2); - res.text.Cat(' '); - } - } - if(lineContainsComment && !lineContainsNonComment) - res.commentLinesRemoved++; - } - } - return pick(res); -} - -END_UPP_NAMESPACE diff --git a/autotest/CppParser/test23.in b/autotest/CppParser/test23.in deleted file mode 100644 index 779daa5f0..000000000 --- a/autotest/CppParser/test23.in +++ /dev/null @@ -1,79 +0,0 @@ -class TreeNodeInfo : Moveable { - enum { SMALLCHARS = 40 }; - - int8 kind; - byte len; - word impressions; - dword sortaccel; -public: - struct Extended { - String name; - String aname; - String urlname; - String aurlname; - String title; - String atitle; - String altname; - String aaltname; - String nodeid; - int doubled_id; - int parent_id; - int master_id; - int impressions; - - bool master, noprotection, nosamecustomer, nooccupancyhigh, noncommercial, erotica; - - Extended(); - }; - union { - Extended *extended; - char text[SMALLCHARS]; - }; -private: - enum { EMPTY = -100 }; - - Extended& Ext(); - void Free(); - void Init(); - void Copy(const TreeNodeInfo& src); - - friend struct TreeInfo; - -public: -// int GetId() const { return id; } - String GetName() const { return kind ? String(text, len) : extended->name; } - String GetUrlName() const { return kind ? GetName() : extended->urlname; } - String GetNameA() const { return kind ? GetName() : extended->aname; } - - String GetUrlNameA() const { return kind ? String() : extended->aurlname; } - String GetAltName() const { return kind ? String() : extended->altname; } - String GetAltNameA() const { return kind ? String() : extended->aaltname; } - String GetTitle() const { return kind ? String() : extended->title; } - String GetTitleA() const { return kind ? String() : extended->atitle; } - - int GetDoubledId() const { return kind ? (int)Null : extended->doubled_id; } - int GetParentId() const { return kind == EMPTY ? Null : kind ? kind : extended->parent_id; } - int GetMasterId() const { return kind == EMPTY ? Null : kind ? kind : extended->master_id; } - - int GetImpressions() const { return kind ? impressions : extended->impressions; } - - String GetNodeId() const { return kind ? String() : extended->nodeid; } - bool IsMaster() const { return kind ? false : extended->master; } - bool NoProtection() const { return kind ? false : extended->noprotection; } - bool NoSameCustomer() const { return kind ? false : extended->nosamecustomer; } - bool NoOccupancyHigh() const { return kind ? false : extended->nooccupancyhigh; } - bool NonCommercial() const { return kind ? false : extended->noncommercial; } - bool Erotica() const { return kind ? false : extended->erotica; } - - bool IsExtended() const { return kind == 0; } - - int Less(dword sortaccel, const char *aname, int alen, const char *name, int len) const; - int Less(const TreeNodeInfo& b) const; - - void Serialize(Stream& s); - - TreeNodeInfo& operator=(const TreeNodeInfo& src); - TreeNodeInfo(const TreeNodeInfo& src); - TreeNodeInfo(); - ~TreeNodeInfo(); -}; diff --git a/autotest/CppParser/test24.in b/autotest/CppParser/test24.in deleted file mode 100644 index 5962b7ec8..000000000 --- a/autotest/CppParser/test24.in +++ /dev/null @@ -1,13 +0,0 @@ -enum ResourceType { - RES_IMAGE = 0, - RES_SWF = 1, - RES_ATTACHMENT = 2, - RES_DOWNLOAD = 3, - RES_SCREENSHOT = 4, - RES_UPLOADED_IMAGE = 5, - -#define KRPANO_TOUR_XML "tour.xml" -#define TEST(x) x * x -#define TEST2(x, y) x / y - RES_PANORAMA_TREE_NFS = 6, //New(72) Filesystem Tree with 'tour.xml' in root. -}; diff --git a/autotest/CppParser/test25.inc b/autotest/CppParser/test25.inc deleted file mode 100644 index f9a15798e..000000000 --- a/autotest/CppParser/test25.inc +++ /dev/null @@ -1,16 +0,0 @@ -int deflateInit_(strm, level, version, stream_size) - z_streamp strm; - int level; - const char *version; - int stream_size; -{ - return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, - Z_DEFAULT_STRATEGY, version, stream_size); - /* To do: ignore strm->next_in if we use it as window */ -} - -void Foo(int x, Bar *y); - -typedef struct AAA { - int x, y; -}; diff --git a/autotest/CppParser/test26.in b/autotest/CppParser/test26.in deleted file mode 100644 index 91422b257..000000000 --- a/autotest/CppParser/test26.in +++ /dev/null @@ -1,7 +0,0 @@ -void Foo::Foo() { - -void Foo::Bar(); - -void Foo::Bar2() { -label: - int x = 10; diff --git a/autotest/CppParser/test27.in b/autotest/CppParser/test27.in deleted file mode 100644 index a9f005c52..000000000 --- a/autotest/CppParser/test27.in +++ /dev/null @@ -1,5 +0,0 @@ -struct Alfa { - unsigned x:5; - unsigned y:10; - String h; -}; \ No newline at end of file diff --git a/autotest/CppParser/test28.in b/autotest/CppParser/test28.in deleted file mode 100644 index 9ced547e9..000000000 --- a/autotest/CppParser/test28.in +++ /dev/null @@ -1,19 +0,0 @@ -template -struct Vector { - struct Iterator { - template - V operator->(T); - }; - - Iterator begin(); -}; - -struct Point { x, y }; - -void Foo() { - Point x; - Vector v; - const auto& y = x; - auto vv = v; - for(auto i : v) { - for(const auto& ii : vv) { diff --git a/autotest/CppParser/test29.in b/autotest/CppParser/test29.in deleted file mode 100644 index 28abe2851..000000000 --- a/autotest/CppParser/test29.in +++ /dev/null @@ -1,18 +0,0 @@ -namespace Upp { -templace -struct Vector { - typedef T *Iterator; -}; - -template -struct AMap { - typedef typename V::Iterator Iterator; -}; - -template > -struct VectorMap : public MoveableAndDeepCopyOption >, - public AMap< K, T, Vector, HashFn > { - typedef typename AMap< K, T, Vector, HashFn >::Iterator Iterator; - typedef Iterator iterator; -}; -}; diff --git a/autotest/CppParser/test3.in b/autotest/CppParser/test3.in deleted file mode 100644 index bae51faeb..000000000 --- a/autotest/CppParser/test3.in +++ /dev/null @@ -1,9 +0,0 @@ -extern "C++" -{ - template - inline - typename _CrtEnableIf<(_Size > 1), void *>::_Type memcpy(_DstType (&_Dst)[_Size], const void *_Src, size_t _SrcSize) throw() - { - return memcpy_s(_Dst, _Size * sizeof(_DstType), _Src, _SrcSize) == 0 ? _Dst : 0; - } -} diff --git a/autotest/CppParser/test30.in b/autotest/CppParser/test30.in deleted file mode 100644 index fa546e2bb..000000000 --- a/autotest/CppParser/test30.in +++ /dev/null @@ -1,9 +0,0 @@ -struct Point { int x, y; } - -void Fn() -{ - auto x = [] { - Point a; - Point b; - Call([&,=a](Point c, Point d) mutable -> Point { - Point p; diff --git a/autotest/CppParser/test31.in b/autotest/CppParser/test31.in deleted file mode 100644 index 30916ee81..000000000 --- a/autotest/CppParser/test31.in +++ /dev/null @@ -1,12 +0,0 @@ -enum Foo { ONE, TWO }; - -enum FooA : int { AONE, ATWO }; - -enum EE : unsigned long { EE1 = 1, EE2 = 2, EEbig = 0xFFFFFFF0U }; - -enum class ClassFoo { ClONE, ClBTWO }; - -enum class Cl3Foo : char { C3ONE, C3TWO }; - -enum Foo; -enum Cl4foo : char; diff --git a/autotest/CppParser/test32.in b/autotest/CppParser/test32.in deleted file mode 100644 index 06594534c..000000000 --- a/autotest/CppParser/test32.in +++ /dev/null @@ -1,61 +0,0 @@ -// This is a test of minor C++11 features - -static_assert(sizeof(long)>=8, "64-bit code generation required for this library."); - -template -class Test { - static_assert(sizeof(long)>=8, "64-bit code generation required for this library."); - T a = 10; - U b{123}; -}; - -class Y { - Y& operator=(const Y&) = default; // default copy semantics - Y(const Y&) = default; -}; - -constexpr int operator|(Flags f1, Flags f2) { return Flags(int(f1)|int(f2)); } - -class X final { - X(int x) { if (0(s)} { } - // ... -}; - -struct Point { int x, y; } - -union U1 { - int m1; - complex m2; // ok - string m3; -}; - -alignas(double) unsigned char aligned_array[1024]; - -double foo(double) noexcept; - -struct OverrideFinal { - void Foo() final; - void Bar() override; -}; - -int override; -int final; - -thread_local int ThreadLocal; - -inline namespace Upp { - int in_inline_namespace; -}; - -void Fn() -{ - static_assert(sizeof(long)>=8, "64-bit code generation required for this library."); - Test< Test< Test >, Point> x; - Test>, Point> y; - int x{7}; - foo({123}); - int y = foo({123}); - long long ll = 9223372036854775807LL; - char* p = nullptr; diff --git a/autotest/CppParser/test33.in b/autotest/CppParser/test33.in deleted file mode 100644 index 817522ba9..000000000 --- a/autotest/CppParser/test33.in +++ /dev/null @@ -1,11 +0,0 @@ -auto Foo(int x) -> String; - -template -decltype(function(T) + v) Test(); - -auto Bar(int x, int y) -> decltype(x + y); - -template -void Body() -{ - decltype(H + H) hh; diff --git a/autotest/CppParser/test34.in b/autotest/CppParser/test34.in deleted file mode 100644 index 7895e7cd3..000000000 --- a/autotest/CppParser/test34.in +++ /dev/null @@ -1,12 +0,0 @@ -using Foo = String; - -template - using Vec = std::vector>; - -using Foo = String *; - -template - using Vec = std::vector> *; - -template - using Vec = std::vector> volatile * const; diff --git a/autotest/CppParser/test35.in b/autotest/CppParser/test35.in deleted file mode 100644 index e06c87cac..000000000 --- a/autotest/CppParser/test35.in +++ /dev/null @@ -1,2 +0,0 @@ - byte backpaint:2;//2 - bool hasdhctrl:1; diff --git a/autotest/CppParser/test36.in b/autotest/CppParser/test36.in deleted file mode 100644 index baeb8621e..000000000 --- a/autotest/CppParser/test36.in +++ /dev/null @@ -1,7 +0,0 @@ -struct StaticVariableTest { - static int foo; - static String bar; -} - -int StaticVariableTest::foo; -String StaticVariableTest::bar; diff --git a/autotest/CppParser/test37.in b/autotest/CppParser/test37.in deleted file mode 100644 index ff92568b0..000000000 --- a/autotest/CppParser/test37.in +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ns { - -enum { SM_NONE, SM_SINGLE, SM_DOUBLE } var1; - -String string; - -struct Foo { - int x; - enum { SM_NONE, SM_SINGLE, SM_DOUBLE } var2; -}; - -}; \ No newline at end of file diff --git a/autotest/CppParser/test38.in b/autotest/CppParser/test38.in deleted file mode 100644 index 442d73e2d..000000000 --- a/autotest/CppParser/test38.in +++ /dev/null @@ -1,7 +0,0 @@ -struct Foo { - Rect rect; - Foo(Rect r); -}; - -Foo::Foo(Rect r) -: rect(r. diff --git a/autotest/CppParser/test39.in b/autotest/CppParser/test39.in deleted file mode 100644 index 8059043a1..000000000 --- a/autotest/CppParser/test39.in +++ /dev/null @@ -1,201 +0,0 @@ -#include "CppBase.h" - -NAMESPACE_UPP - -#ifdef _MSC_VER -#pragma inline_depth(255) -#pragma optimize("t", on) -#endif - -static StaticMutex cpp_file_mutex; -static Index cpp_file; - -int GetCppFileIndex(const String& path) -{ - INTERLOCKED_(cpp_file_mutex) { - return cpp_file.FindAdd(path); - } - return -1; -} - -const String& GetCppFile(int i) -{ - INTERLOCKED_(cpp_file_mutex) { - return cpp_file[i]; - } - static String x; - return x; -} -/* -void CppPos::Serialize(Stream& s) -{ - s % impl % line; - String fn = GetCppFile(file); - s % fn; - file = GetCppFileIndex(fn); -} - -String SSpaces(const char *txt) -{ - StringBuffer r; - while(*txt) - if(*txt == ' ') { - while((byte)*txt <= ' ' && *txt) txt++; - r.Cat(' '); - } - else - r.Cat(*txt++); - return r; -} -*/ -void SLPos(SrcFile& res) -{ - res.linepos.Add(res.text.GetLength()); -} - -SrcFile::SrcFile() : - preprocessorLinesRemoved(0), - blankLinesRemoved(0), - commentLinesRemoved(0) -{ -} - -void 3BUG(); - -void Foo(int x, const String& y); - -void Foo(int x, const String& y) {} - -SrcFile PreProcess(Stream& in) -{ - SrcFile res; - bool include = true; - while(!in.IsEof()) { - String ln = in.GetLine(); - SLPos(res); - while(*ln.Last() == '\\') { - ln.Trim(ln.GetLength() - 1); - ln.Cat(in.GetLine()); - SLPos(res); - } - const char *rm = ln; - if(IsAlNum(*rm)) { - const char *s = ln.Last(); - while(s > rm && *s == ' ') s--; - if(*s != ':') - res.text << '\2'; - } - while(*rm == ' ' || *rm == '\t') rm++; - if(*rm == '\0') - res.blankLinesRemoved++; - else - if(*rm == '#') - { - if(rm[1] == 'd' && rm[2] == 'e' && rm[3] == 'f' && - rm[4] == 'i' && rm[5] == 'n' && rm[6] == 'e' && !iscid(rm[7])) { - const char *s = rm + 8; - while(*s == ' ') s++; - String macro; - while(iscid(*s)) - macro.Cat(*s++); - if(*s == '(') { - while(*s != ')' && *s) - macro.Cat(*s++); - macro << ')'; - } -// res.text << '#' << AsCString(SSpaces(macro)); - if(include) - res.text << '#' << AsCString(macro); - } - res.preprocessorLinesRemoved++; - } - else { - bool lineContainsComment = false; - bool lineContainsNonComment = false; - String cmd; - while(*rm) { - if(*rm == '\"') { - lineContainsNonComment = true; - res.text << '\"'; - rm++; - while((byte)*rm && *rm != '\r' && *rm != '\n') { - if(*rm == '\"') { - res.text << '\"'; - rm++; - break; - } - if(*rm == '\\' && rm[1]) { - if(include) - res.text.Cat(*rm); - rm++; - } - if(include) - res.text.Cat(*rm); - rm++; - } - } - else - if(*rm == '\\' && rm[1]) { - lineContainsNonComment = true; - if(include) { - res.text.Cat(*rm++); - res.text.Cat(*rm++); - } - else - rm += 2; - } - else - if(rm[0] == '/' && rm[1] == '/') { - cmd = rm + 2; - if(!lineContainsNonComment) - res.commentLinesRemoved++; - break; - } - else - if(rm[0] == '/' && rm[1] == '*') { - lineContainsComment = true; - rm += 2; - for(;;) { - if(*rm == '\0') { - if(!lineContainsNonComment) - res.commentLinesRemoved++; - if(in.IsEof()) break; - SLPos(res); - ln = in.GetLine(); - rm = ~ln; - lineContainsNonComment = false; - } - if(rm[0] == '*' && rm[1] == '/') { - rm += 2; - break; - } - rm++; - } - if(include) - res.text.Cat(' '); - } - else { - lineContainsNonComment = true; - if(include) - res.text.Cat(*rm); - rm++; - } - } - if(include) - res.text << ' '; - if(cmd[0] == '$') { - if(cmd[1] == '-') include = false; - if(cmd[1] == '+') include = true; - if(cmd[1]) { - res.text.Cat(~cmd + 2); - res.text.Cat(' '); - } - } - if(lineContainsComment && !lineContainsNonComment) - res.commentLinesRemoved++; - } - } - return pick(res); -} - -END_UPP_NAMESPACE diff --git a/autotest/CppParser/test4.in b/autotest/CppParser/test4.in deleted file mode 100644 index 00f2c11fc..000000000 --- a/autotest/CppParser/test4.in +++ /dev/null @@ -1,2 +0,0 @@ -template -void Fn(); diff --git a/autotest/CppParser/test40.in b/autotest/CppParser/test40.in deleted file mode 100644 index 16d124809..000000000 --- a/autotest/CppParser/test40.in +++ /dev/null @@ -1,4 +0,0 @@ -struct Foo { - Foo() noexcept : a(1), b(2) {} - Foo(int) noexcept(noexcept(anything)) : a(1), b(2) {} -}; diff --git a/autotest/CppParser/test41.in b/autotest/CppParser/test41.in deleted file mode 100644 index 5cef5c3f4..000000000 --- a/autotest/CppParser/test41.in +++ /dev/null @@ -1,2 +0,0 @@ -template -bool _M_emplace_unique(_Args&&... __args); diff --git a/autotest/CppParser/test42.in b/autotest/CppParser/test42.in deleted file mode 100644 index 94bfb6a29..000000000 --- a/autotest/CppParser/test42.in +++ /dev/null @@ -1,3 +0,0 @@ -class basic_istream : virtual public basic_ios -{ -}; diff --git a/autotest/CppParser/test43.in b/autotest/CppParser/test43.in deleted file mode 100644 index 6ab884836..000000000 --- a/autotest/CppParser/test43.in +++ /dev/null @@ -1,3 +0,0 @@ -template -template -void Foo::Bar(B v) {} diff --git a/autotest/CppParser/test44.in b/autotest/CppParser/test44.in deleted file mode 100644 index 986e3c3c3..000000000 --- a/autotest/CppParser/test44.in +++ /dev/null @@ -1,4 +0,0 @@ -template -static constexpr true_type -void -_S_chk(typename _Alloc2::template rebind<_Tp2>::other*); diff --git a/autotest/CppParser/test45.in b/autotest/CppParser/test45.in deleted file mode 100644 index 19f7a47e0..000000000 --- a/autotest/CppParser/test45.in +++ /dev/null @@ -1,7 +0,0 @@ -struct FooBar { - int x; -}; - -void Autocomplete() -{ - ::FooBar b; diff --git a/autotest/CppParser/test46.in b/autotest/CppParser/test46.in deleted file mode 100644 index f5d189be7..000000000 --- a/autotest/CppParser/test46.in +++ /dev/null @@ -1,2 +0,0 @@ -Vector > test1; -Vector> test2; \ No newline at end of file diff --git a/autotest/CppParser/test47.in b/autotest/CppParser/test47.in deleted file mode 100644 index 5739fc893..000000000 --- a/autotest/CppParser/test47.in +++ /dev/null @@ -1,9 +0,0 @@ -enum class Foo : int { XX }; - -enum class Foo8 : int8a { XX8 }; - -enum struct Bar { BAR }; - -enum { A, B, C }; - -enum : int { AA }; \ No newline at end of file diff --git a/autotest/CppParser/test5.in b/autotest/CppParser/test5.in deleted file mode 100644 index 5e33e578c..000000000 --- a/autotest/CppParser/test5.in +++ /dev/null @@ -1,6 +0,0 @@ -class Value { - bool operator<=(const Value& x) const { return Compare(x) <= 0; } - bool operator>=(const Value& x) const { return Compare(x) >= 0; } - bool operator<(const Value& x) const { return Compare(x) < 0; } - bool operator>(const Value& x) const { return Compare(x) > 0; } -}; diff --git a/autotest/CppParser/test6.in b/autotest/CppParser/test6.in deleted file mode 100644 index 932137f0e..000000000 --- a/autotest/CppParser/test6.in +++ /dev/null @@ -1 +0,0 @@ -[attribute] void test([attribute] const int a); diff --git a/autotest/CppParser/test7.in b/autotest/CppParser/test7.in deleted file mode 100644 index f133844df..000000000 --- a/autotest/CppParser/test7.in +++ /dev/null @@ -1,20 +0,0 @@ -__inline -char * -__insecure__strlwr_l( -[SA_Pre( Null=SA_No, NullTerminated=SA_Yes)] -[SA_Pre(Deref=1, Valid=SA_Yes)] -[SA_Post( NullTerminated=SA_Yes)] -[SA_Post(Deref=1, Valid=SA_Yes)] -char *_String, -[SA_Pre( Null=SA_Maybe)] [SA_Pre(Deref=1, Valid=SA_Yes)] -[SA_Pre(Deref=1, Access=SA_Read)] -_locale_t _Locale) -{ - char * _strlwr_l([SA_Pre( Null=SA_No, NullTerminated=SA_Yes)] - [SA_Pre(Deref=1, Valid=SA_Yes)] - [SA_Post( NullTerminated=SA_Yes)] - [SA_Post(Deref=1, Valid=SA_Yes)] - char *_String, - [SA_Pre( Null=SA_Maybe)] [SA_Pre(Deref=1, Valid=SA_Yes)] - [SA_Pre(Deref=1, Access=SA_Read)] _locale_t _Locale); - return _strlwr_l(_String, _Locale); } diff --git a/autotest/CppParser/test8.in b/autotest/CppParser/test8.in deleted file mode 100644 index a88dff940..000000000 --- a/autotest/CppParser/test8.in +++ /dev/null @@ -1,26 +0,0 @@ -struct { - DWORD TimeCheck; - BYTE DemotePercent; - BYTE PromotePercent; - BYTE Spare[2]; -} vPROCESSOR_IDLESTATE_INFO, *vPPROCESSOR_IDLESTATE_INFO; - -typedef struct { - DWORD TimeCheck; - BYTE DemotePercent; - BYTE PromotePercent; - BYTE Spare[2]; -} PROCESSOR_IDLESTATE_INFO, *PPROCESSOR_IDLESTATE_INFO; - -struct Point { - int x, y; -} xxx, yyy; - -typedef struct PointT { - int x, y; -} PPP; - -template -struct TPoint { - T x, y; -}; diff --git a/autotest/CppParser/test9.in b/autotest/CppParser/test9.in deleted file mode 100644 index f40ab400d..000000000 --- a/autotest/CppParser/test9.in +++ /dev/null @@ -1,6 +0,0 @@ -SHORT -_InterlockedCompareExchange16 ( - SHORT volatile *Destination, - SHORT ExChange, - SHORT Comperand - ); diff --git a/autotest/CtrlChildren/CtrlChildren.upp b/autotest/CtrlChildren/CtrlChildren.upp index 9a5f019da..644fdbbf8 100644 --- a/autotest/CtrlChildren/CtrlChildren.upp +++ b/autotest/CtrlChildren/CtrlChildren.upp @@ -1,5 +1,6 @@ uses - CtrlLib; + CtrlLib, + VirtualGui; file Etalon.log, diff --git a/autotest/CtrlChildren/main.cpp b/autotest/CtrlChildren/main.cpp index f4d3cc10f..5153cb1b1 100644 --- a/autotest/CtrlChildren/main.cpp +++ b/autotest/CtrlChildren/main.cpp @@ -2,7 +2,7 @@ using namespace Upp; -GUI_APP_MAIN +CONSOLE_APP_MAIN { TopWindow top; Label lbl; diff --git a/autotest/CtrlFrame/CtrlFrame.upp b/autotest/CtrlFrame/CtrlFrame.upp index 5872304d3..ea4a3c97f 100644 --- a/autotest/CtrlFrame/CtrlFrame.upp +++ b/autotest/CtrlFrame/CtrlFrame.upp @@ -1,5 +1,6 @@ uses - CtrlLib; + CtrlLib, + VirtualGui; file main.cpp; diff --git a/autotest/CtrlFrame/main.cpp b/autotest/CtrlFrame/main.cpp index c66d05e64..6bc49608b 100644 --- a/autotest/CtrlFrame/main.cpp +++ b/autotest/CtrlFrame/main.cpp @@ -2,7 +2,7 @@ using namespace Upp; -GUI_APP_MAIN +CONSOLE_APP_MAIN { NullFrameClass fr[50]; for(int q = 0; q < 10000; q++) { diff --git a/autotest/CtrlInfoParts/CtrlInfoParts.upp b/autotest/CtrlInfoParts/CtrlInfoParts.upp index 9a5f019da..644fdbbf8 100644 --- a/autotest/CtrlInfoParts/CtrlInfoParts.upp +++ b/autotest/CtrlInfoParts/CtrlInfoParts.upp @@ -1,5 +1,6 @@ uses - CtrlLib; + CtrlLib, + VirtualGui; file Etalon.log, diff --git a/autotest/CtrlInfoParts/main.cpp b/autotest/CtrlInfoParts/main.cpp index f0e248186..3a9aaff73 100644 --- a/autotest/CtrlInfoParts/main.cpp +++ b/autotest/CtrlInfoParts/main.cpp @@ -2,7 +2,7 @@ using namespace Upp; -GUI_APP_MAIN +CONSOLE_APP_MAIN { auto Print = [&](Ctrl& h) { DLOG("========================"); diff --git a/autotest/PPTest/PPTest.cpp b/autotest/PPTest/PPTest.cpp deleted file mode 100644 index a9e252b8f..000000000 --- a/autotest/PPTest/PPTest.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include - -using namespace Upp; - -CONSOLE_APP_MAIN -{ - StdLogSetup(LOG_FILE|LOG_COUT); - - String path = GetDataFile("test.in"); - PPSync(GetFileFolder(path)); - - Cpp cpp; - FileIn in(path); - cpp.Preprocess(path, in, path); - - String s = cpp.output; - String opath = GetDataFile("test.out"); - - SaveFile("/home/cxl/outs", s); - - LOG("======================"); - LOG(s); - -#ifdef flagSAVE - SaveFile(opath, s); -#else - ASSERT(LoadFile(opath) == s); -#endif - LOG("===================== OK"); -} diff --git a/autotest/PPTest/PPTest.upp b/autotest/PPTest/PPTest.upp deleted file mode 100644 index 30b503cc7..000000000 --- a/autotest/PPTest/PPTest.upp +++ /dev/null @@ -1,14 +0,0 @@ -uses - Core, - CppBase; - -file - PPTest.cpp, - test.in, - test.out, - help.in; - -mainconfig - "" = "", - "" = "SAVE"; - diff --git a/autotest/PPTest/help.in b/autotest/PPTest/help.in deleted file mode 100644 index 84d35d650..000000000 --- a/autotest/PPTest/help.in +++ /dev/null @@ -1,127 +0,0 @@ -#define COMBINE__(a, b) a##b -#define COMBINE(a, b) COMBINE__(a, b) - -#define COMBINE3__(a, b, c) a##b##c -#define COMBINE3(a, b, c) COMBINE3__(a, b, c) - -#define COMBINE4__(a, b, c, d) a##b##c##d -#define COMBINE4(a, b, c, d) COMBINE4__(a, b, c, d) - -#define COMBINE5__(a, b, c, d, e) a##b##c##d##e -#define COMBINE5(a, b, c, d, e) COMBINE5__(a, b, c, d, e) - -#define _cm_ , - -#define __countof(a) int(sizeof(a) / sizeof(a[0])) - -#define __Expand1(x) x(1) -#define __Expand2(x) __Expand1(x) x(2) -#define __Expand3(x) __Expand2(x) x(3) -#define __Expand4(x) __Expand3(x) x(4) -#define __Expand5(x) __Expand4(x) x(5) - -#define __List1(x) x(1) -#define __List2(x) __List1(x), x(2) -#define __List3(x) __List2(x), x(3) -#define __List4(x) __List3(x), x(4) -#define __List5(x) __List4(x), x(5) - -#define E__p(I) p##I - -#define MK__s__(x) s__s##x -#define MK__s_(x) MK__s__(x) - -// #define MK__s MK__s_(__LINE__) - -#define MK__s MK__s_(COMBINE3(BLITZ_INDEX__, _, __LINE__)) - -#define INITBLOCK \ -static void COMBINE(MK__s, _fn)(); static UPP::Callinit MK__s(COMBINE(MK__s, _fn), __FILE__, __LINE__); \ -static void COMBINE(MK__s, _fn)() - - -//--------------------------------------------------- - -#define E__NFValue(I) const Value& COMBINE(p, I) -#define E__NFBody(I) \ -String Format(const char *fmt, __List##I(E__NFValue)); -__Expand5(E__NFBody) - -// ============= - -INITBLOCK { - Value::SvoRegister("Color"); -} - -// ============= - - - #define max (a, b) (a < b ? b : a) - -max(12, 23) - -max (A, B) - -#undef max - -#define max(a, b) (a < b ? b : a) - -max(12, 23) - -max (A, B) - -// ============= - -#define macro something // comment - -macro -something -//$- comment - -#define mm(a, b, c, d) (d) [c] {b} - -mm(1, 2, 3, 4) - -mm(1, 2, -3, 4) - -mm(1, -2, -3, -4 -) - -// ============= - -#define MACRO(x) 123+x - -MACRO( -x -) - -MACRO(x -) - -MACRO(x) - - MACRO(x) - - MACRO(x -) - -// ============= - -#undef _STCONS - - #define _STCONS(ty, name, val) static const ty name = (ty)(val) - - _STCONS(float_denorm_style, has_denorm, denorm_absent); - - - -#define InterlockedIncrement16 _InterlockedIncrement16 - -SHORT -InterlockedIncrement16 ( - SHORT volatile *Addend -); diff --git a/autotest/PPTest/test.in b/autotest/PPTest/test.in deleted file mode 100644 index 381a4f12b..000000000 --- a/autotest/PPTest/test.in +++ /dev/null @@ -1,128 +0,0 @@ -#define COMBINE__(a, b) a##b -#define COMBINE(a, b) COMBINE__(a, b) - -#define COMBINE3__(a, b, c) a##b##c -#define COMBINE3(a, b, c) COMBINE3__(a, b, c) - -#define COMBINE4__(a, b, c, d) a##b##c##d -#define COMBINE4(a, b, c, d) COMBINE4__(a, b, c, d) - -#define COMBINE5__(a, b, c, d, e) a##b##c##d##e -#define COMBINE5(a, b, c, d, e) COMBINE5__(a, b, c, d, e) - -#define _cm_ , - -#define __countof(a) int(sizeof(a) / sizeof(a[0])) - -#define __Expand1(x) x(1) -#define __Expand2(x) __Expand1(x) x(2) -#define __Expand3(x) __Expand2(x) x(3) -#define __Expand4(x) __Expand3(x) x(4) -#define __Expand5(x) __Expand4(x) x(5) - -#define __List1(x) x(1) -#define __List2(x) __List1(x), x(2) -#define __List3(x) __List2(x), x(3) -#define __List4(x) __List3(x), x(4) -#define __List5(x) __List4(x), x(5) - -#define E__p(I) p##I - -#define MK__s__(x) s__s##x -#define MK__s_(x) MK__s__(x) - -// #define MK__s MK__s_(__LINE__) - -#define MK__s MK__s_(COMBINE3(BLITZ_INDEX__, _, __LINE__)) - -#define INITBLOCK \ -static void COMBINE(MK__s, _fn)(); static UPP::Callinit MK__s(COMBINE(MK__s, _fn), __FILE__, __LINE__); \ -static void COMBINE(MK__s, _fn)() - - -//--------------------------------------------------- - -#define E__NFValue(I) const Value& COMBINE(p, I) -#define E__NFBody(I) \ -String Format(const char *fmt, __List##I(E__NFValue)); -__Expand5(E__NFBody) - -// ============= - -INITBLOCK { - Value::SvoRegister("Color"); -} - -// ============= - - - #define max (a, b) (a < b ? b : a) - -max(12, 23) - -max (A, B) - -#undef max - -#define max(a, b) (a < b ? b : a) - -max(12, 23) - -max (A, B) - -// ============= - -#define macro something // comment - -macro -something -//$- comment -//$+ - -#define mm(a, b, c, d) (d) [c] {b} - -mm(1, 2, 3, 4) - -mm(1, 2, -3, 4) - -mm(1, -2, -3, -4 -) - -// ============= - -#define MACRO(x) 123+x - -MACRO( -x -) - -MACRO(x -) - -MACRO(x) - - MACRO(x) - - MACRO(x -) - -// ============= - -#undef _STCONS - - #define _STCONS(ty, name, val) static const ty name = (ty)(val) - - _STCONS(float_denorm_style, has_denorm, denorm_absent); - - - -#define InterlockedIncrement16 _InterlockedIncrement16 - -SHORT -InterlockedIncrement16 ( - SHORT volatile *Addend -); diff --git a/autotest/PPTest/test.out b/autotest/PPTest/test.out deleted file mode 100644 index f572ac77d..000000000 --- a/autotest/PPTest/test.out +++ /dev/null @@ -1,128 +0,0 @@ -#define COMBINE__(a, b) a##b -#define COMBINE(a, b) COMBINE__(a, b) - -#define COMBINE3__(a, b, c) a##b##c -#define COMBINE3(a, b, c) COMBINE3__(a, b, c) - -#define COMBINE4__(a, b, c, d) a##b##c##d -#define COMBINE4(a, b, c, d) COMBINE4__(a, b, c, d) - -#define COMBINE5__(a, b, c, d, e) a##b##c##d##e -#define COMBINE5(a, b, c, d, e) COMBINE5__(a, b, c, d, e) - -#define _cm_ , - -#define __countof(a) int(sizeof(a) / sizeof(a[0])) - -#define __Expand1(x) x(1) -#define __Expand2(x) __Expand1(x) x(2) -#define __Expand3(x) __Expand2(x) x(3) -#define __Expand4(x) __Expand3(x) x(4) -#define __Expand5(x) __Expand4(x) x(5) - -#define __List1(x) x(1) -#define __List2(x) __List1(x), x(2) -#define __List3(x) __List2(x), x(3) -#define __List4(x) __List3(x), x(4) -#define __List5(x) __List4(x), x(5) - -#define E__p(I) p##I - -#define MK__s__(x) s__s##x -#define MK__s_(x) MK__s__(x) - - - -#define MK__s MK__s_(COMBINE3(BLITZ_INDEX__, _, __LINE__)) - -#define INITBLOCK static void COMBINE(MK__s, _fn)(); static UPP::Callinit MK__s(COMBINE(MK__s, _fn), __FILE__, __LINE__); static void COMBINE(MK__s, _fn)() - - - - - - -#define E__NFValue(I) const Value& COMBINE(p, I) -#define E__NFBody(I) String Format(const char *fmt, __List##I(E__NFValue)); - -String Format(const char *fmt, const Value& p1); String Format(const char *fmt, const Value& p1, const Value& p2); String Format(const char *fmt, const Value& p1, const Value& p2, const Value& p3); String Format(const char *fmt, const Value& p1, const Value& p2, const Value& p3, const Value& p4); String Format(const char *fmt, const Value& p1, const Value& p2, const Value& p3, const Value& p4, const Value& p5); - - - - static void s__sBLITZ_INDEX_____LINE___fn(); static UPP::Callinit  s__sBLITZ_INDEX_____LINE__(s__sBLITZ_INDEX_____LINE___fn, __FILE__, __LINE__); static void s__sBLITZ_INDEX_____LINE___fn() { - Value::SvoRegister("Color"); -} - - - - - #define max (a, b) (a < b ? b : a) - - (a, b) (a < b ? b : a)(12, 23) - - (a, b) (a < b ? b : a) (A, B) - -#undef max - -#define max(a, b) (a < b ? b : a) - -(12 < 23 ? 23 : 12) - -(A < B ? B : A) - - - -#define macro something - - something -something -//$- comment -//$+ - -#define mm(a, b, c, d) (d) [c] {b} - -(4) [3] {2} <1> - - -(4) [3] {2} <1> - - - - - -(4) [3] {2} <1> - - - -#define MACRO(x) 123+x - - - -123+x - - -123+x - -123+x - - 123+x - - - 123+x - - - -#undef _STCONS - - #define _STCONS(ty, name, val) static const ty name = (ty)(val) - - static const float_denorm_style has_denorm = (float_denorm_style)(denorm_absent); - - - -#define InterlockedIncrement16 _InterlockedIncrement16 - -SHORT - _InterlockedIncrement16 ( - SHORT volatile *Addend -);