Commit Graph

4845 Commits

Author SHA1 Message Date
Nathan Burles 9fa56a4cd9 Added lexer channels enum to match Java target 2016-07-07 14:04:01 +01:00
Mike Lischke 6de938dbf7 Merge pull request #11 from chrisheller/chrisheller-patch-1
Document cmake minimum version.
2016-06-27 09:08:33 +02:00
Chris Heller c4785ab8be Document cmake minimum version.
Document the minimum cmake version needed to build C++ target (if compiling with cmake).  Also, fix a missing space in cmake command between directory path and defining where the ANTLR .jar is located.
2016-06-26 15:28:26 -07:00
Mike Lischke 8046c28a5e A few more text escape calls in DefaultErrorStrategy.
And some cleanup.
2016-06-26 11:35:38 +02:00
Mike Lischke c462e03126 Merge branch 'master_upstream' 2016-06-26 11:12:23 +02:00
Mike Lischke 2352ff03e1 getSerializedATN() wasn't properly overwritten. 2016-06-26 11:10:31 +02:00
Mike Lischke a6699eac34 Merge pull request #9 from nuuman/patch-1
Update DefaultErrorStrategy.cpp
2016-06-26 11:07:20 +02:00
nuuman a2d6b62a1a Update DefaultErrorStrategy.cpp
Property escape vocabulary reporting
2016-06-25 21:06:53 +02:00
Terence Parr 47e268dfea Merge pull request #1218 from ericvergnaud/python-performance-issue
Python performance issue
2016-06-23 08:54:27 -07:00
Eric Vergnaud 26c409103d Fix #1217
The root cause was that ATNConfigSet was not using he required custom hashing strategy for ParserATNSimulator.
The commit includes a number of additional fixes, related to code that was never executed before due to the root cause.
A similar issue is also likely to exist in the JavaScript runtime, I'll fix it later.
2016-06-23 15:51:39 +02:00
Eric Vergnaud 15430d4bf9 remove unwanted semicolon in generated Python code 2016-06-23 15:06:49 +02:00
Eric Vergnaud c260ce75d1 make it possible to add breakpoint 2016-06-23 15:06:14 +02:00
Mike Lischke c8f80b167d Small naming fix. 2016-06-22 11:24:26 +02:00
Mike Lischke a127f34a74 Changed Win deployment script to produce 2 smaller zips instead of a big one. 2016-06-22 10:56:38 +02:00
Mike Lischke 01638eb246 Updated README.md.
Also need to mention that commit a2f5cf1 fixed issue #4.
2016-06-21 17:25:39 +02:00
Mike Lischke f6515e5aaf A few adjustments in doc + runtime tests for the changed library name + input stream handling. 2016-06-21 17:25:39 +02:00
Mike Lischke 1da7e8eea0 Fixed #include. 2016-06-21 16:28:44 +02:00
Mike Lischke a2f5cf12fd Fixed + simplified loading text to parse from a file.
- The previous approach to load and convert UTF-8 data via a stream didn't work well, so I replaced that with a simple load-to-buffer + convert buffer from UTF-8 to UTF-32.
- Removed deleted Token.cpp file from XCode project.
2016-06-21 16:23:28 +02:00
Mike Lischke 8c62740f16 Missed to commit an XCode project change. 2016-06-21 10:53:36 +02:00
Mike Lischke d718fa9f44 Windows runtime deployment.
- Created deployment script for Windows + updated doc/releasing-antlr.md.
- Created projects for both VS2013 and VS2015 to be used by the deployment script.
- Fixed trouble with a bug in VS2015 where std::codecvt_utf8<char32_t> is not properly supported.
- Fixed a few #include paths + a number of warnings.
2016-06-21 10:51:31 +02:00
Mike Lischke 89442c6cb8 Changes for deployment.
- Settled on a final library name scheme: base part is "libantlr4-runtime" on MacOS + Linux. The extension determines the type (.a static lib, .dylib dynamic lib in MacOS, .so dynamic lib in Linux). No more mention of target language (cpp) or type (static) in the lib name. On Windows we omit the lib prefix, so the name becomes: antlr4-runtime.dll + antlr4-runtime.lib. We may later want to add version information there, but doing that automatically is difficult.
- Updated XCode project and CMakeLists.txt file for the new naming scheme.
- Added deployment scripts for source code (for Linux + iOS) and MacOS.
- Added C++ section in docs/releasing-antlr.md.
2016-06-19 15:31:09 +02:00
Mike Lischke 19dbd8e746 A fix for the Linux demo project. 2016-06-17 15:54:21 +02:00
Mike Lischke 3b5b400d03 A few fixes for the previous listener change.
Also fixed runtime tests again.
2016-06-17 11:27:52 +02:00
Mike Lischke 4a7ec859aa Simplified parse tree listener handling.
No need to use shared_ptr for management. Listeners are, like the other main classes (parser, lexer, input stream etc.) provided by the application and hence managed there.
2016-06-17 10:22:19 +02:00
Mike Lischke dd48c0fbd5 A few final touches to make runtime tests passing. 2016-06-16 11:20:42 +02:00
Mike Lischke e68cdc3c0e A few of the previously reverted changes are still good. 2016-06-15 13:46:27 +02:00
Mike Lischke 4a8010b4eb Revert "A few more places that no longer pass a shared_ptr around."
This reverts commit 728af59528.
2016-06-15 13:30:37 +02:00
Mike Lischke 728af59528 A few more places that no longer pass a shared_ptr around. 2016-06-14 15:17:23 +02:00
Mike Lischke dcb0d4aa62 Some cleanup. 2016-06-14 14:05:18 +02:00
Mike Lischke 0814d49cf6 Small alt check fix in LexerATNSimulator. 2016-06-14 14:05:18 +02:00
Mike Lischke 7ac5252fe9 Explicitly delete copy c-tor + copy operator to for Visual Studio.
VS requires to have copy operations disabled on classes which hold vectors of unique pointers (clang is a bit more relaxed about this).
2016-06-13 17:38:57 +02:00
Mike Lischke 7488621983 Visual Studio build fix. 2016-06-13 16:47:32 +02:00
Mike Lischke b9c28d8c9c Signficantly simplified Token handling.
In order to lower the overhead when passing around Token instances via smart pointers and because the ownership is clear (token streams own them), these instances can be passed as raw pointers.
2016-06-13 13:12:02 +02:00
Mike Lischke 23eeae4b44 Simplification of the ATN config lookup handling.
No need for the ConfigLookup(Impl) class as we only need a way to determine if a config has been added to a set or not. This can be done much simpler by using individual hash codes produced by either ATNConfigSet or OrderedATNConfigSet (idea taken from C# runtime).
2016-06-12 16:08:16 +02:00
Mike Lischke c920d57331 DFA states member is now a set (instead of a map). 2016-06-11 12:57:29 +02:00
Mike Lischke e9d2a04be1 Removed shared_ptr instances for ATNConfigSet.
ATNConfigSet instance follow a clear ownership (all owned by DFAState instances, which stay alive all time). Hence we can use a unique_ptr for memory management instead and pass raw pointers around where needed.
2016-06-10 16:13:15 +02:00
Mike Lischke fec23ce989 Simplified equality check in ATNConfigSet. 2016-06-10 14:58:22 +02:00
Mike Lischke b8fcb5f30d More performance increase for C++ target (25% now).
All shared_ptr<> now use const& for function parameters to avoid constant copies + locks. Ownership and lifetime control is still ensured by the owning containers. Code templates have been updated as well.
2016-06-09 12:02:30 +02:00
Mike Lischke 1cbbc1b760 Merge branch 'antlr-upstream' 2016-06-07 17:44:53 +02:00
Mike Lischke d18109eccf Merge branch 'feature/addtests' 2016-06-07 17:28:41 +02:00
Mike Lischke 3a95a36e3f 12% speed improvement for C++ runtime. 2016-06-07 16:27:25 +02:00
Mike Lischke 963f4fc507 ... and for Linux the same. 2016-06-06 16:15:30 +02:00
Mike Lischke b90398f8a6 A few fixes for Visual Studio after added the xpath stuff. 2016-06-06 16:13:38 +02:00
Mike Lischke ff129beadf Some smaller fixes for Windows. 2016-06-06 15:58:14 +02:00
Mike Lischke a4bc611fd5 Changed namespaces + fixed runtime tests.
- Changed namespace chain (org::antlr::v4::runtime) to just antlr4 in all files.
- Fixed runtime tests for that.
- Added conversion of the xpath code, which compiles now (no tests, tho, as there are runtime tests for it).
- Removed TestRig stuff. That doesn't work in C++.
2016-06-06 15:55:27 +02:00
Mike Lischke 73248ac2e3 Some changes in the C++ target doc + a some template fixes.
- Avoiding double semicolons is tricky with the kind of rule nesting. Previous changes for that caused the tests to break as there were semicolons missing then.
- VS complained about the shift code generated using 1L as base, which is signed. Changed that to 1ULL, which is what is actually intended.
- Reverted the change to avoid a warning in RuleSempredFunction() in Cpp.stg as the fix didn't work 100%. We need a different solution.
2016-06-05 14:35:11 +02:00
Mike Lischke d6339f5cf4 Added some notes about Unicode to the C++ target doc. 2016-06-04 16:46:09 +02:00
Mike Lischke 80ced92d55 Added informations about C++ target specific stuff to the docs. 2016-06-04 15:28:04 +02:00
Mike Lischke b8867c732d Fixed warning in C++ code generation and remove obsolete file. 2016-06-04 13:04:01 +02:00
Mike Lischke 4a6b68c6f6 All C++ runtime tests pass now.
- A few remaining changes had to be done for the C++ runtime tests which now completely pass.
- Added a runtime testing overview document.
- Added a description of C++ target.
- Updated the ANTLR release document.
2016-06-04 12:11:38 +02:00