Commit Graph

296 Commits

Author SHA1 Message Date
rdb 40ea0ab786 cppparser: support directives __LINE__, __FILE__, __has_include 2017-01-04 22:46:57 +01:00
rdb 8d305273dd Merge remote-tracking branch 'origin/master' into cmake 2016-12-07 23:05:40 +01:00
rdb b182224463 interrogate: fix issues with abstract classes and covariance (fixes EggPolygon constructor) 2016-12-05 17:22:24 -05:00
rdb a056543d5a Support push_macro and pop_macro in cppparser 2016-12-05 02:02:25 +01:00
Sam Edwards e3fcacb1f7 Merge branch 'master' into cmake 2016-11-30 19:21:50 -08:00
Sam Edwards 573dad8dde general: Fix missing includes. 2016-11-30 19:21:34 -08:00
rdb d54d43ac34 cppparser: fix issue with templated external method definitions 2016-11-03 18:04:14 +01:00
rdb 22f0b50851 More Interrogate C++11 support changes:
* Parse variadic templates
 * Add (incomplete) type_traits support
 * Parse anonymous class template params
 * Parse volatile/lvalue/rvalue methods
 * Don't generate destructor for indestructible types
 * Add xmmintrin.h header
 * Allow invoking extensions with references
2016-11-03 12:17:11 +01:00
rdb 1467541b8d Interrogate issues: "fix #pragma once" for files specified on command-line, fix "unexpected $end" not having line numbers when parsing template parameter list 2016-11-01 12:19:11 +01:00
Mitchell Stokes 59b0913b0b Cleanup .gitignore files
Remove all .gitignore files in subdirectories and add a few new ignores
to the top-level directory .gitignore file.
2016-10-30 20:06:12 -07:00
rdb 29ea65bb3f Merge branch 'release/1.9.x' 2016-08-09 01:44:21 +02:00
rdb db97747981 cppparser: Parse nonstandard specifier order like "const static" 2016-08-09 01:27:30 +02:00
rdb 8381118a97 Assorted tweaks and compile warning fixes 2016-07-14 12:54:39 +02:00
Sam Edwards fffd105f96 Merge branch 'master' into cmake 2016-06-25 19:12:14 -07:00
Sam Edwards 2933b8ed39 general: Fix missing includes. 2016-06-25 19:10:38 -07:00
rdb 242cc5f57d Support template "using" definitions in interrogate 2016-05-31 18:48:32 +02:00
rdb ce29ae490d Interrogate improvements, more properties, MAKE_SEQ_PROPERTY 2016-05-11 00:16:53 +02:00
rdb fb78fe6e2a Interrogate enum class support (maps to Python 3.4 enums), sanify wrapper code 2016-05-07 00:45:26 +02:00
Sam Edwards 441371e8d9 Merge branch 'master' into cmake 2016-03-15 18:30:55 -07:00
Sam Edwards d28608aed1 cppparser: Fix missing includes. 2016-03-15 18:30:24 -07:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb caa03c53dd Interrogate cppparser improvements, C++11/14/17 additions:
* Support trailing return type.
 * Ignore C++14 digit separators.
 * Parse C++14 binary number representations.
 * Support "using"-style type aliases.
 * Support decltype and auto with "new".
 * Remove silly "long float" and "long long float".
 * Support default visibility with class inheritance.
 * Remove -longlong hack since C++11 supports long long natively.
 * Support unary plus operator.
 * Preserve bitfield definitions.
 * Support constructor inits using braces.
 * Support override/final specifiers.
 * Ignore [[attributes]] in certain cases
 * Add support for typeid() in expressions
 * Parse (but ignore) lambda expressions
 * Differentiate between casts, add const_cast/reinterpret_cast
 * Support thread_local variables.
2016-02-16 01:18:51 +01:00
rdb 5cd4342ed5 Merge branch 'master' into cmake 2016-02-05 17:16:15 +01:00
rdb 090e912ce6 Cleanup of comments and whitespace 2016-02-01 22:30:43 +01:00
rdb 9a38a6b075 Handle bool expressions separately in cppparser 2016-01-31 17:47:25 +01:00
rdb 83ed206551 Support implicitly generated copy constructor and default constructor in interrogate 2016-01-03 21:55:50 +01:00
rdb be60303502 Support =default and =delete methods in Interrogate 2016-01-03 19:56:20 +01:00
rdb cdc8d7d4d9 Interrogate should pick up definitions in all files explicitly named 2015-12-26 15:24:19 +01:00
rdb db6f0342cc Add properties with has/clear (interrogatedb v3.1) 2015-12-24 14:25:45 +01:00
rdb 1b857d6bda A few interrogate improvements 2015-11-28 17:54:01 +01:00
rdb c93e50ca05 Merge branch 'release/1.9.x'
Conflicts:
	.travis.yml
	dtool/src/cppparser/cppBison.cxx.prebuilt
	dtool/src/cppparser/cppBison.yxx
	makepanda/makepanda.py
2015-11-19 18:43:13 +01:00
rdb df4c4bc250 Fix various cppparser issues parsing the VRPN headers 2015-11-19 18:35:29 +01:00
rdb 909856c75d Improve interrogate diagnostics when encountering unknown types 2015-11-19 13:07:28 +01:00
Sam Edwards b1a294631a Merge branch 'master' into cmake 2015-11-11 12:35:13 -08:00
Sam Edwards 5ebb6c511f general: Fix missing includes. 2015-11-11 12:35:04 -08:00
rdb 5b291a9b10 Merge branch 'master' into cmake 2015-11-09 19:21:12 +01:00
rdb db3ab953e4 Remove ppremake, genPyCode, and all hacks created to support them 2015-11-09 19:06:49 +01:00
rdb ac1c036cac interrogatedb 3.0 to restructure make_seq, improve make_seq handling and performance 2015-11-09 18:03:30 +01:00
Sam Edwards c902774cfd Merge branch 'master' into cmake 2015-11-07 20:06:59 -08:00
Sam Edwards 3b667a83ed general: Fix several missing includes. 2015-11-07 20:05:17 -08:00
rdb d1732a4dca Fix minor preprocessor bugs, particularly parsing files with CRLF 2015-11-08 02:10:38 +01:00
rdb da17cce447 Fix error and warnings in 32-bit Windows build 2015-11-01 16:57:52 +01:00
rdb 155ae811aa Fix some edge cases for preprocessor, support auto keyword, MSVC compile fix 2015-10-17 02:54:07 +02:00
rdb 920210c999 Fix the vast majority of Interrogate parse issues and warnings, add support for inline namespace and constexpr 2015-10-16 14:57:40 +02:00
rdb 6a0c98d54e Work around strange interrogate issues 2015-10-13 15:40:48 +02:00
rdb b65ad853fe Support C++11/14 features: nullptr, decltype, unicode literals, custom literals, alignof 2015-10-12 23:32:50 +02:00
rdb a43d6a45c1 Fix issue building with pre-C++11 compiler 2015-10-12 14:20:23 +02:00
rdb ba45120eac Try to stay compatible with Bison 2.5 (for Ubuntu precise), support C++11 and C++17 static_assert, improve error reporting, handle several gcc keyword aliases, fix bug handling preprocessor expression in which the same manifest occurs more than once 2015-10-11 16:52:33 +02:00
rdb 1c9ff40236 Require new Bison version on Windows, fallback to prebuilt files if not present 2015-10-10 16:29:14 +02:00
rdb e327c7e978 Vastly improve quality of Interrogate error messages, also fix erroneous location indications
This change also causes Interrogate to safely ignore "register" keywords in function parameters
2015-10-10 15:15:22 +02:00
rdb 62e8106ef1 Interrogate now correctly implements C++11 semantics for closing template parameter lists 2015-10-10 04:08:00 +02:00
rdb 6feef4e230 Interrogate now parses (and ignores) explicit template instantiations 2015-10-09 13:33:05 +02:00
rdb 7f3f546cdd Interrogate now parses "volatile" qualifier in instance identifiers correctly 2015-10-05 02:56:40 +02:00
rdb aebce2e74c Merge branch 'release/1.9.x' 2015-10-05 01:23:31 +02:00
rdb 893740478c Fix sporadic interrogate parser issue 2015-10-04 17:20:49 +02:00
rdb c0ff9d8e5f Merge branch 'release/1.9.x' 2015-08-04 18:00:35 +02:00
rdb de715b5a0e Fix inability for interrogate to parse /*c*//* and /*c*/// 2015-08-04 17:49:19 +02:00
rdb 9178ed2871 Fix some preprocessor expressions in Interrogate 2015-07-14 21:04:50 +01:00
Sam Edwards 5ee04074c2 Merge branch 'master' into cmake
# Conflicts:
#	direct/src/actor/Actor.py
2015-07-12 19:27:56 -07:00
Sam Edwards 16bfd3750f Add missing includes. 2015-07-12 19:27:13 -07:00
rdb 7026854cc2 Fixes to get the C binding generator to work 2015-07-05 16:07:08 +02:00
rdb 2515ea5dff Merge branch 'release/1.9.x' 2015-06-13 13:37:33 +02:00
rdb 48208b0f27 Support #pragma once in interrogate 2015-06-13 13:33:11 +02:00
rdb 11ed8a4d8d Use dynamic type lookup for interrogate to eliminate inter-module dependencies
It is now no longer necessary to link to core.pyd
Also includes a slight coercion optimization for trivial types
2015-06-06 19:36:40 +02:00
rdb f42c6645d5 Update prebuilt bison files for people who build without bison 2015-06-03 19:54:01 +02:00
rdb cc62e731b7 Fix compilation with ppremake 2015-06-01 00:21:32 +02:00
Sam Edwards 8b876843d4 Merge branch 'master' into cmake 2015-05-02 11:33:52 -07:00
rdb d430e611bb size_t params of methods in template classes did not support 64-bit values on 64-bit systems 2015-04-14 15:47:35 +02:00
rdb 8e76328b3b Fix Bullet support (Broken float division in default args in interrogate) 2015-04-09 13:08:17 +02:00
Sam Edwards 64120cd7d8 general: Add missing includes and forward-declarations. 2015-03-28 19:27:48 +01:00
Sam Edwards 41d8e26549 general: Add missing includes and forward-declarations. 2015-03-28 11:16:40 -07:00
Sam Edwards a0f704b67a CMake: Update CMakeLists for recent upstream changes. 2015-03-28 11:16:19 -07:00
Sam Edwards 69c22868e1 Merge branch 'master' into cmake 2015-03-28 10:23:28 -07:00
rdb 38d02fadf9 Fix various interrogate issues with parsing PhysX headers 2015-03-23 19:27:29 +01:00
rdb 9513046e59 Various substantial changes to Interrogate:
* Allow arbitrary selection of optional keyword arguments in some cases
* Reduce code bloat of generated bindings
* Work around awkward resolution of set_shader_input overloads
* Document the code a bit better
* Make coercion a bit cleaner for reference counted types
* A few optimization tweaks
* Use generic errors in NDEBUG build to reduce size of string pool
2015-02-15 13:48:13 +01:00
Sam Edwards 6ee1170453 Merge branch 'master' into cmake
Conflicts:
	panda/src/display/pythonGraphicsWindowProc.cxx
	panda/src/putil/config_util.cxx
2015-02-11 09:53:13 -08:00
rdb b2f73d0877 Merge branch 'master' into interrogate-overhaul 2015-02-08 12:11:19 +01:00
rdb 33249c5f43 Make pregenerated bison files up-to-date (for people without bison) 2015-02-07 17:40:31 +01:00
rdb ecf627b315 Fix a bug substituting some enums
(Still a bug: some enums in templated classes don't get instanced properly)
2015-01-05 17:04:38 +01:00
rdb 5e905d4463 Fix various parser bugs, improve error reporting
(to show the included file chain -vv is now needed)
2015-01-04 20:30:24 +01:00
rdb 34761a0b9b Merge branch 'master' into interrogate-overhaul
Conflicts:
	dtool/src/cppparser/cppBison.yxx
2015-01-03 16:52:44 +01:00
rdb 368e1ca644 Support noexcept and rvalue references in C++ parser 2015-01-02 14:57:33 +01:00
rdb 202008c470 Support digraphs and alternate operator names in CPPParser 2015-01-02 14:55:06 +01:00
rdb 6db5d0dc11 Huge cppparser and interrogate overhaul, bringing:
* Better support for typedefs
* Same code should compile for both 32-bit and 64-bit
* C++11 typed enum support
* Synthesize __setitem__ when operator [] returns reference
* Rewrite coerce system to have better performance
* Change semantics of __getattr__ and __setattr__ to match
  Python's, add __getattribute__, __delattr__ and __delitem__
* Improve performance of slot functions a bit more
* Reduce memory overhead of type system
* Some support for wrapping arrays of numeric types
* C++11 character type support in cppparser
* Chars are handled as strings of length 1
* Template functions for CreatePyInstance that use runtime type map
* More functions from dtool as extension functions
* Code cleanup
2014-12-30 16:43:52 +01:00
rdb b3fd8b94ad Interrogate should be able to parse any constexpr as enum value, including one that references a different enum value 2014-12-03 21:51:58 +01:00
rdb a65b477734 Commit patches by cfsworks:
cxx: Fix missing includes masked by composite builds.
misc: Fix typos in comments.
config: Fix missing config forward-declarations.
direct: Adjust Python imports to panda3d.* instead of pandac.*.
display: Split graphicsWindow out into an extension.
framework: Use if/elif/elif/endif instead of ifdef/elif/elif/endif.
ode: Remove erroneous INLINE declarations.
interval: Fix missing import.
2014-10-19 22:41:47 +00:00
Sam Edwards 442f58986d include: Fix a couple more missing includes... 2014-10-18 16:53:17 -07:00
Sam Edwards eaeff00901 dtool: Undo a few changes to dtoolbase that aren't strictly necessary, to better parallel upstream. 2014-10-18 16:53:13 -07:00
Sam Edwards a85d1f4cc2 Merge remote-tracking branch 'upstream/master' into cmake 2014-10-18 15:13:30 -07:00
rdb 31a71c990d Fix issues with OS X 10.9 compilation, fix issues uncovered by clang 2014-10-12 18:45:37 +00:00
Sam Edwards de8eb894b7 CMake: Update CMakeLists files to match recent changes to Sources.pp files. 2014-09-22 21:40:53 -07:00
Sam Edwards 57fb97053b Merge branch 'master' into cmake 2014-09-22 21:13:05 -07:00
rdb db7a6561f2 When finding comment for an enum, don't accidentally pick up a same-line comment of an enum value on the preceding line 2014-09-21 13:22:52 +00:00
rdb d9c529a5d0 Update prebuild cppBison files 2014-09-20 11:54:04 +00:00
rdb a6229f1fac Support for comments in enums. Improve comment handling in C++ parser. Improve doxygen reference. Update interrogate interface. (Addendum to interrogatedb v2.3.) 2014-09-19 23:34:11 +00:00
rdb c178aba639 Add property support to interrogate (using MAKE_PROPERTY or using published members) 2014-09-19 15:23:52 +00:00
rdb 30d8cc29b3 Rewrite handling of stringify and token-paste operators to work better. Add support for variadic macros. 2014-09-19 15:14:11 +00:00
rdb 5437a3e5a9 Allow const variables with initializers to be used in expressions (like enum definitions). Also fix compiler warning. 2014-09-14 22:02:16 +00:00
Sam Edwards 5e77793b0f CMake: Add some install(...) directives. 2014-02-04 22:43:23 -07:00
kestred 9ee6e59795 Change %pure_parser to %pure-parser in cppBison.yxx (%pure_parser is very very deprecated) 2014-01-19 00:45:02 -07:00
rdb 7ea0d099e9 More progress on Config.cmake, fix bison, add BUILD_DTOOL/BUILD_PANDA to toggle trees. 2013-12-16 20:33:20 +01:00
rdb 57c9b1ae64 Add composite_sources, add bison macro, emulate CMAKE_CURRENT_DIR_IN_INTERFACE in pre-2.8.11 2013-12-16 17:21:11 +01:00
rdb a8cde9f6f1 Use a custom target for bison as the built-in one is ill-equipped for our purposes. Also, add pandabase. 2013-12-13 16:35:16 +01:00
rdb abec123074 Merge branch 'master' of ssh://github.com/kestred/panda3d into cmake 2013-12-13 14:19:28 +01:00
kestred d1572173d3 CMake: Configure: Add XYZZY_LIBRARY(IES) variable declarations for Find packages. Other cleanup and reorginizaion. 2013-12-12 12:30:42 -07:00
Sam Edwards e9518eab5c CMake: Build dtool/cppparser without requiring HAVE_INTERROGATE; fix its use of paths. 2013-11-29 02:59:46 -07:00
Sam Edwards 163cbe4ea2 Massively clean up CMakeLists files by removing use of ${CMAKE_CURRENT_LIST_DIR}; this is handled by add_subdirectory instead. 2013-11-29 02:19:55 -07:00
Sam Edwards 111b1f0548 Add p3cppparser building to the CMake build system. 2013-11-28 23:36:22 -07:00
rdb 5b1ea47fee add F_operator flag 2013-11-18 18:37:27 +00:00
David Rose dfe16c64f6 rename all Panda-built libraries to begin with libp3 or libpanda 2011-12-06 02:39:21 +00:00
David Rose 9294ea77f7 interrogate supports wchar_t * and L"foo" 2011-11-29 23:25:23 +00:00
David Rose cebecba2fc add interrogate -noangles 2011-11-06 18:02:17 +00:00
David Rose 633e697d54 allow typename keyword in lieu of class, in template declarations 2011-11-04 16:58:39 +00:00
David Rose eacd4cfefb missing include 2011-10-11 01:37:25 +00:00
David Rose 134e9a9e92 dual names for interrogate 2011-10-11 00:45:51 +00:00
rdb c740c43f4c Update prebuilt bison files 2011-01-02 15:17:22 +00:00
rdb beb90c565f Add functionality allowing extension functions to interrogate 2011-01-02 15:14:02 +00:00
David Rose d3d778734d add '^' to const expressions 2010-05-06 22:50:31 +00:00
David Rose 882b544805 fix forcetype for template instantiations 2010-02-28 03:29:03 +00:00
David Rose 8f96a87460 pstrtod 2009-06-14 16:10:09 +00:00
David Rose 0bc22b6034 prebuild-bison 2009-01-20 20:02:50 +00:00
David Rose a6f4fb2377 operator bool () -> __nonzero__() 2009-01-20 03:17:44 +00:00
David Rose 58e0537e3c wide interrogate improvements: sequence protocol, MAKE_SEQ, __setitem__, and parameter coercion 2008-11-07 21:12:42 +00:00
David Rose 964c76f2e0 pandaFileStream 2008-09-09 00:06:47 +00:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 07e5322800 simple fix to token-pasting problem 2008-05-09 18:48:20 +00:00
David Rose 611a10f796 try again to satisfy compilers 2008-01-17 01:22:57 +00:00
David Rose 651513d595 use reinterpret_cast for 64-bit architecture 2007-09-13 19:25:09 +00:00
David Rose bc488bb495 allow (and ignore) args to #endif 2007-08-16 17:19:12 +00:00
David Rose 8392266935 BEGIN_PUBLISH .. END_PUBLISH applies to methods too 2007-07-13 21:22:22 +00:00
Josh Yelon 1e7c8513c3 Interrogate include-path alterations 2007-06-27 23:57:19 +00:00
David Rose ecad9e186e fix issues with parser-inc and new interrogate search rules 2007-06-22 15:21:44 +00:00
Josh Yelon 7dc0da379b Corrected include-file search-path 2007-06-21 23:46:25 +00:00
David Rose a51d4712cf prebuild-bison 2007-04-21 01:45:13 +00:00
David Rose 346928ece7 support BLOCKING keyword 2007-04-18 21:51:36 +00:00
David Rose 55225290b8 add MemoryBase to fix malloc issues, especially on OSX 2006-11-17 02:13:10 +00:00
David Rose a3cc24dd6f dos2unix 2006-09-01 18:52:52 +00:00
Roger Hughston 859fc08886 small memory leak with multiple #defines... 2006-05-12 23:48:02 +00:00
David Rose 03c35a63ff CHAR -> CHAR_TOK (avoid conflict with Windows SDK) 2006-04-06 17:51:24 +00:00
David Rose eaf21c7e2b fix unary - in interrogate 2006-01-21 00:49:17 +00:00
David Rose 572a146c24 untabify 2006-01-13 18:38:07 +00:00
David Rose 237d193cac fix malloc issues on Linux 2005-09-30 19:49:25 +00:00
Josh Yelon 9729541f63 Added macrocomposites 2005-09-27 22:05:52 +00:00
David Rose a16bce7a37 prebuild-bison 2005-07-13 17:10:56 +00:00
David Rose 01c82da5df interrogate supports wstring 2005-07-13 15:37:56 +00:00
David Rose 7eab63d1e6 remove indent.cxx 2005-07-06 17:40:25 +00:00
David Rose be6d48df86 move TypedObject etc. stuff to dtool 2005-07-06 17:29:46 +00:00
Dave Schuyler 0dd3363dd1 formatting 2005-04-25 23:39:51 +00:00
David Rose c4fb3aa93a bison 1.875c now requires parens within the macro args 2005-01-28 17:15:40 +00:00
David Rose 77f6853877 fix problem parsing quoted commas in a manifest parameter 2004-12-09 23:21:40 +00:00