Commit Graph

3084 Commits

Author SHA1 Message Date
Alexander Bigerl 49cf9d4fe2 C++ runtime: disable build of dep utf8cpp tests and samples 2021-04-24 18:55:46 +02:00
Matthew Paletta f901c8d39a Merge branch 'master' of https://github.com/antlr/antlr4 2021-04-09 19:12:33 +01:00
Mike Lischke 4b4ca4058a
Revert "Cpp target: No building tests/samples for external utfcpp" 2021-04-09 14:18:25 +02:00
Terence Parr 697074c3e9
Merge branch 'master' into master 2021-04-08 09:18:40 -07:00
Terence Parr eec33c5210
Merge branch 'master' into patch-1 2021-04-08 09:16:57 -07:00
Terence Parr 765de17f2a
Merge pull request #3073 from jirislaby/master
Cpp/runtime: use utfcpp from system if possible
2021-04-08 09:15:30 -07:00
Alexander Bigerl 3238961241
Merge branch 'master' into patch-1 2021-04-08 16:06:07 +02:00
b1f6c1c4 0172e8661f
Update ExternalAntlr4Cpp.cmake 2021-04-07 17:42:27 -04:00
Andrei DAMIAN e7bdb71a28 c++ finally don't use std::function 2021-04-03 18:22:17 +03:00
Eric Vergnaud d82e8921a6 Fix issue where original ATN would be damaged by IntervalSet operations. Foxes #3216 2021-03-19 00:11:03 +08:00
Eric Vergnaud 20a4d9d138 always trigger enter/exit rules (same as Java/C#) 2021-03-19 00:06:02 +08:00
parrt c0e22b99d6 js build modified some files 2021-03-11 14:36:29 -08:00
parrt 2b5bb2249e [maven-release-plugin] prepare for next development iteration 2021-03-11 14:18:19 -08:00
parrt 5e5b6d35b4 [maven-release-plugin] prepare release 4.9.2 2021-03-11 14:18:13 -08:00
parrt cb4e59d420 bump version to 4.9.2 2021-03-11 14:10:44 -08:00
Mike Lischke 4431f1ff69 Small improvement 2021-03-10 13:21:54 +01:00
Mike Lischke ff629d543a Another build fix
C++ is not <any other language where you don't need a useless constructor>
2021-03-10 12:07:09 +01:00
Mike Lischke 9d1737f33b Build fix 2021-03-10 11:58:49 +01:00
Mike Lischke 5731e64e22 Added a sanity check for input size. 2021-03-10 11:49:22 +01:00
Mike Lischke 84d4ce73de More changes to the ANTLRInputStream and ANTLRFileStream classes
- Added a default c-tor to the input stream to avoid an ambiquity.
- Changed the input stream API so that it can take a string pointer + length and use that for UTF conversion, avoiding so unnecessary copies. Convenience methods exist to use a std::string or a std::string_view.
- With that only a single load() method is necessary.
- In ANTLRFileStream the other c-tors are now also deleted, as they make no sense there.
2021-03-10 11:21:04 +01:00
Mike Lischke 93c06214a6 Fixed C++ tests and build warnings 2021-03-09 11:01:57 +01:00
Mike Lischke faa64fdfa7 Merge branch 'master-upstream' 2021-03-09 09:44:28 +01:00
Mike Lischke 62a829fb65 Fixed ANTLRInputStream and ANTLRFileStream
A previous change to add std::string_view support to ANTLRInputStream for C++17 caused some trouble because of ABI changes. This has been changed to define 2 constructors, one for std::string_view (for C++17) and the original one for std::string.
This is turn caused an error in ANTLRFileStream, which also takes a string in the constructor (but handling it as file name instead of input). To make this clearer the c-tor taking a std::string has been deleted in ANTLRFileStream and the class now requires to load input via the loadFile() function. This might cause some trouble for those users who had used the std::string constructor of ANTLRFileStream, but I think the better error reporting outweighs the little annoyance.
2021-03-09 09:42:55 +01:00
Jiri Slaby 5a808b470e Cpp/runtime: use utf8cpp from system if possible
Try to find system's utf8cpp first, instead of downloading it from
github. utf8cpp 3 defines a cmake package, so we can use find_package.
Older utf8cpps don't, so we try also find_path. If all that fails, we
still fall back to github download.

This is needed as distributions cannot download stuff from their build
systems. And people want to use libraries/headers from the distribution
anyway.

I had to reorder the file a bit, so that the libraries are defined
through the utf8cpp detection
2021-02-23 08:19:40 +01:00
Felix Nieuwenhuizen a08edf89ce add hints about C++ standard to readmes 2021-02-15 19:57:36 +01:00
Felix Nieuwenhuizen 03ee69bc3f add example showing how to compile Cpp runtime with a different standard 2021-02-15 18:50:29 +01:00
Felix Nieuwenhuizen 98a3f7d640 allow override of CMAKE_CXX_STANDARD 2021-02-15 18:50:29 +01:00
Felix Nieuwenhuizen 66bf523beb whitespace cleanup 2021-02-15 18:50:29 +01:00
ericvergnaud 84722e9fcc
Fix javascript intervals (#3083)
* run jest tests in CI

* fix issue when merging sets of intervals

* fix CI config

* improve readability

* more tests
2021-02-14 16:51:41 +08:00
Eric Vergnaud 94f9759d14 fix #2007 2021-02-13 15:10:17 +08:00
Eric Vergnaud 26291a11d8 align debug output on java 2021-02-13 15:09:52 +08:00
Eric Vergnaud 586721462c Fix #3078 2021-02-13 15:09:34 +08:00
Eric Vergnaud e99363ac1a fix typos, fixes #3075 2021-02-13 02:30:50 +08:00
Eric Vergnaud 25196001d7 add test 2021-02-13 02:29:55 +08:00
Eric Vergnaud 64d49cc4d8 add jest for testing 2021-02-13 02:29:35 +08:00
Ken Domino 4b649103f3
Restructure C# runtime and fix Issue #2693 (#3057)
* Fixes for https://github.com/antlr/antlr4/issues/2693

* Adding script for comparing Java and C# profile output.

* Update lexer grammar.

Tightening up the grammar rules. Still Java9.

* Tighten up grammar.

* Adding in new base classes for C# runtime tests for profiling.

* Complete test for Profile = true.

Update ProfileDescriptor to now parse and output profile. The grammar is asm8080 from grammars-v4, tightened up. The input is the example provided there, truncated to included fewer lines as that causes a null-ptr crash with the older runtime. I verified by modifying the .csproj in /tmp.

* Restructuring the Antlr C# runtime so that it is consistent with all other runtimes, a source directory (now antlr4/runtime/CSharp/src), and a test directory (antlr4/runtime/CSharp). In the test area, I added a test for profiling in issue-2593. This test requires the Antlr tool and Antlr C# tool to be build. The path is assumed in a relative path to the test, ../../../../tool/target/antlr4-*-SNAPSHOT-complete.jar, with globbing performed. The test simply checks the return result, output not important. There are no changes to the runtime C# source files other than placing them under src/. Several other build files were changed to reflect the new location of the Antlr C# runtime. I updated the instructions for users on how to build the runtime, including information on checking the environment--now explicitly specified here so people know what to install!
2021-02-02 09:51:41 +08:00
Alexander Bigerl ed2631b2d0
Merge branch 'master' into patch-1 2021-02-01 08:38:46 +01:00
Kko 8bcc12de28 Fix #3052 2021-01-27 15:07:54 +08:00
ericvergnaud 365a56f10f
Merge pull request #3050 from kaby76/issue-3049
Fix for https://github.com/antlr/antlr4/issues/3049
2021-01-27 01:40:35 +08:00
ericvergnaud f37dfef7e5
Merge pull request #3054 from KvanTTT/MissedVersionInCSharpRuntime
Fix missed version in C# runtime
2021-01-27 01:39:58 +08:00
ericvergnaud bca2536f3f
Circleci project setup (#3055)
* Add .circleci/config.yml

* setup config

* use jdk8 image

* Updated config.yml

* Updated config.yml

* Updated config.yml

* more targets

* Updated config.yml

* update config

* update config

* update config

* update config

* update config

* Updated config.yml

* Updated config.yml

* Updated config.yml

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update runtime version

* update config

* update config

* python3 config

* update config

* align Python2 and Python3 test hierarchy

* update runtime version

* update config

* update config

* update config

* update config

* explore dart issue

* update dart installer

* update config

* update dart installer

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* use sudo on circle ci

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* Fix NPE

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* update config

* more consistent badges

* do not parallelize tests on circle-ci
2021-01-26 12:56:16 +08:00
Ivan Kochurkin cf16ec791e Fix missed version, https://github.com/antlr/antlr4/pull/2987#pullrequestreview-575417430 2021-01-25 21:14:18 +03:00
kaby76 ce479dc228 Fix for https://github.com/antlr/antlr4/issues/3049 2021-01-24 10:46:39 -05:00
Eric Vergnaud 020333deff work around Swift crash where reading hashValue on SemanticContext.AND instance would call the empty constructor (possibly a Swift bug?) 2021-01-24 13:46:58 +08:00
ericvergnaud b050ac43de
Merge pull request #3046 from ericvergnaud/update-LL1Analyzer
Update LL1 analyzer in C#, Python, JavaScript, Cpp and Swift runtimes, aligning on the Java runtime
Fixes #3042
2021-01-24 11:12:18 +08:00
Eric Vergnaud 954649d5aa Fix various javascript warnings and typos 2021-01-23 20:39:53 +08:00
Eric Vergnaud 58da376bef fix #3042 in Swift runtime 2021-01-23 19:19:02 +08:00
Eric Vergnaud 4322672435 fix #3042 in Go runtime 2021-01-23 18:50:21 +08:00
Eric Vergnaud 559d526648 fix #3042 in Cpp runtime 2021-01-23 18:47:54 +08:00
Eric Vergnaud e8dfc30f91 fix typo 2021-01-23 18:18:30 +08:00