Commit Graph

4824 Commits

Author SHA1 Message Date
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
Mike Lischke ac664a91b8 A few more fixes. 2016-06-02 17:32:19 +02:00
Mike Lischke b7ade0ade1 TestParseTrees + TestSemPredEvalLexer C++ test groups pass now. 2016-06-02 12:22:24 +02:00
Mike Lischke be2e71130a TestListeners C++ tests pass now.
- Needed a few adjustments in the test templates for this, which required to change target test templates for all other languages too.
2016-06-02 10:18:19 +02:00
Mike Lischke 28ccc4962b TestParseTrees passes now. 2016-06-01 15:20:11 +02:00
Mike Lischke 6bf1193839 All tests of TestLeftRecursion.java now pass.
- Fixed all disabled tests and enabled them.
- Some more adjustments of the test template + target template was needed.
- Worked on semicolon usage in Cpp.stg to avoid double semicolons. Might need more work, tho.
2016-06-01 12:08:13 +02:00
Mike Lischke 86014ac3a6 TestParserExec tests pass now.
- A few more adjustments to make this test group pass.
- Fixed a few issues in C++ runtime as well.
2016-06-01 10:22:48 +02:00
Mike Lischke 814a1821be TestParserErrors passes now.
Fixed a bug in the Cpp.stg file where more input was consumed than should be.
2016-05-30 16:27:12 +02:00
Mike Lischke 08f844af0e Fixed 2 problems found by runtime tests.
- TestLexerExce group passes now.
- Reverted wrong removal of action text output that prevent named actions from showing up properly.
2016-05-29 16:47:51 +02:00
Mike Lischke 815bb95982 TestLeftRecursion passes, but with some disabled tests.
There are a number of disabled tests that need extra work (all because of target specific action code).
2016-05-29 12:17:29 +02:00
Mike Lischke a0665677c1 Lots of fine tuning to get more tests passing. 2016-05-27 22:38:42 +02:00
Mike Lischke 95b7f488a4 Merge branch 'master' into feature/addtests 2016-05-26 12:21:43 +02:00
Mike Lischke 27b76b5a33 Fixed token toString() so it produces the output expected by the tests. 2016-05-26 12:20:26 +02:00
Mike Lischke 657be5f1ac Fixed generation code for lexer tests. 2016-05-25 13:36:52 +02:00
David Sisson b1b8de748a Fixed a number of issues in the generated tests. Many more to go. 2016-05-24 19:17:50 -07:00
David Sisson bdc4f6a48f Merge branch 'feature/addtests' of https://github.com/DanMcLaughlin/antlr4 into feature/addtests 2016-05-24 11:45:21 -07:00
David Sisson bebb63a126 Updated generation a bit. 2016-05-24 11:44:43 -07:00
Mike Lischke 89c01af247 Merge branch 'master' into feature/addtests 2016-05-24 17:40:29 +02:00
Mike Lischke f103e05bc3 Some additions for better operation.
- Allow loading new input instead of setting up a new input stream.
- Made is<> template function inline, for hopefully faster execution.
- A few other fixes in stream + lexer classes.

- Reverted another rename from context to _localctx in the Cpp.stg file as this is used for certain actions.
2016-05-24 17:39:21 +02:00
David Sisson 3e21e0b6e3 Regenerate all of the tests with the latest test generation template. 2016-05-24 08:30:50 -07:00
David Sisson b920bb7011 Added run support to the test runner. 2016-05-24 02:00:15 -07:00