Commit Graph

398 Commits

Author SHA1 Message Date
Ewan Mellor 6c11160b51
Remove tokenNames / getTokenNames from the Recognizer interface.
This has been ported over from the Java code, but it was deprecated there.
There's no point having it in the Swift runtime because we don't have the
legacy code to support.  Also, it wasn't implemented properly, so it
never worked.

Remove {DFA,IntervalSet}.toString(_:[String?]?)
and the inits in ParserInterpreter and DFASerializer for the same reason.
Switch the unit tests to use the alternate toString(_:Vocabulary).
2017-10-25 13:28:40 -07:00
Ewan Mellor 39c01f6da7
Update the Swift tests for Swift Package Manager 4.0.
SwiftPM has changed its default layout for new packages (i.e. when we
use "swift package init --type executable" during the test).  It now is
<projectName>/Sources/<projectName>/main.swift, so we need to adjust the
paths appropriately.

This includes a small change to print stdout as well as stderr if a
unit test fails to build.  swift-build-tool takes the compiler subprocess's
stderr and puts it on stdout.  *sheesh*  This meant that we were losing
critical error messages.
2017-10-20 10:12:47 -07:00
Niels Basjes ac9f75303e Fixed empty CodePointCharStream throwing exception on getText. Fixes #1949 2017-08-02 14:30:46 +02:00
Sam Harwell 0803c74eb2 Report InputMismatchException with original context information
Fixes #1922
2017-07-27 18:34:13 -05:00
Eric Vergnaud 5e0eee056d oops, forgot to flag the dotnet tests 2017-06-28 23:39:54 +08:00
Eric Vergnaud 32fc500102 Fix typo and rebalance 2017-06-27 07:43:59 +08:00
Eric Vergnaud 0e573fb0a5 categorise tests to fix Travis timeout 2017-06-27 00:50:49 +08:00
alimg 60cce436c2 Merge branch 'master' of https://github.com/antlr/antlr4 into py-input-mismatch-error 2017-06-25 19:02:26 +03:00
Eric Vergnaud dbff375c54 fix failing test 2017-06-25 14:13:18 +08:00
Eric Vergnaud 2e56ccfe19 simplify test 2017-06-25 14:13:01 +08:00
Eric Vergnaud 94ca69b727 add test for #1925 2017-06-25 10:13:58 +08:00
alimg 405dc20488 add parser error test case to replicate the Python formatting issue 2017-06-20 16:48:08 +03:00
Hanzhou Shi f15d9a31a3 revert one trivial change in go test. 2017-06-03 22:57:22 -07:00
Hanzhou Shi 77eddc8e76 fix linker issue on travis ubuntu 2017-06-03 22:57:21 -07:00
Hanzhou Shi e8962dad7e reads SWIFT_HOME from environment variables. 2017-06-03 22:57:21 -07:00
Hanzhou Shi 3095de982e All tests passing. But slow. 2017-06-03 22:57:21 -07:00
Hanzhou Shi 8cbd7c0693 Get parser tests working. 2017-06-03 22:57:21 -07:00
Hanzhou Shi 6acec92866 Refactoring swift test framework. 2017-06-03 22:57:21 -07:00
Terence Parr f2ee752a58 Merge pull request #1848 from davesisson/master
Fix tests for PR #1844.
2017-05-12 09:18:46 -07:00
David Sisson e9dd953cf1 Fixed another occurrence of NewFileInputStream. 2017-04-29 19:55:32 -07:00
David Sisson 81b8078860 updated 2017-04-29 17:52:21 -07:00
David Sisson f41ce7fed4 Fix tests for PR #1844. 2017-04-29 17:27:08 -07:00
Dong Xie e94b3acaed [dotnet] fix again for the test speed up 2017-04-28 16:18:36 +01:00
Dong Xie 5fffe4bb2e [dotnet] try to get test run faster; update from 1.0.1 to 1.0.3; fix test dir removal not recursive 2017-04-27 17:23:48 +01:00
Terence Parr efc0a14879 Merge pull request #1810 from xied75/dotnetcore
[dotnet] update to .netcore v1.0.1; add osx build
2017-04-17 09:55:32 -07:00
Terence Parr 9519bfc36f Merge pull request #1818 from parrt/fix-1815-again
Fixes #1815 (for real this time!)
2017-04-06 14:36:22 -07:00
parrt f858cd5948 Fixes #1815 (for real this time!). Fix text set for erroneous escapes so tool doesn't fail later. Remove some duplicate error messages. Add test for #1815. 2017-04-06 14:34:37 -07:00
Dong Xie da4987dc38 [dotnet] update to .netcore v1.0.1; add osx build 2017-04-04 15:26:40 +01:00
Hanzhou Shi 07048fe787 Fixing unit tests. 2017-04-02 09:41:55 -07:00
parrt 62baf4bd0a [maven-release-plugin] prepare for next development iteration 2017-03-30 14:11:59 -07:00
parrt d4d7e3d3bc [maven-release-plugin] prepare release 4.7 2017-03-30 14:11:49 -07:00
parrt b5648f405b tweak documentation about various targets 2017-03-30 10:44:28 -07:00
Terence Parr 6e474eb43e Merge pull request #1776 from bhamiltoncx/js-char-streams
New JavaScript CharStreams functions
2017-03-29 14:38:41 -07:00
Terence Parr 828461337f Merge pull request #1775 from bhamiltoncx/csharp-char-streams
New C# CharStreams static factory class
2017-03-29 14:37:06 -07:00
Ben Hamilton 200379802a Tidy comments and add tests to ensure UTF-16 and UTF-32 support Unicode code points > U+FFF 2017-03-29 10:06:08 -07:00
Ben Hamilton ab0655598e Improve memory usage of CodePointCharStream: Use 8-bit, 16-bit, or 32-bit buffer 2017-03-27 16:46:42 -07:00
parrt eb49080720 add test showing cost to load from a file where we know the size. Add test of small file to load as well. 2017-03-27 11:34:23 -07:00
parrt 4ca382c9b0 add dependence on JOL http://hg.openjdk.java.net/code-tools/jol to compute buffer sizes. Dumps footprint now too. 2017-03-26 13:27:57 -07:00
parrt 00d5781bee update sample lexer timing numbers after IntervalSet binary search update. 2017-03-24 14:01:21 -07:00
parrt 9cf26d0163 add my results to Ben's, small cleanup. 2017-03-24 13:45:37 -07:00
parrt da71ea375f add legacy ascii *load* back. separate out stream locate time / mem overhead from load tests. 2017-03-24 13:39:20 -07:00
Ben Hamilton b2869ee0d7 Fix TimeLexerSpeed when run from jar 2017-03-23 14:18:17 -07:00
parrt 0713128d04 add size information to the load for streams 2017-03-23 10:54:19 -07:00
Ben Hamilton f72e22550c charstreams-js 2017-03-22 11:03:16 -07:00
Ben Hamilton 307df9c68d New C# CharStreams static factory class 2017-03-20 13:07:08 -07:00
parrt 648f517da0 add more load times 2017-03-17 14:08:25 -07:00
parrt b961c86143 add load times 2017-03-17 13:37:01 -07:00
parrt aa177cf415 Forgot to add UTF-8 encoding to legacy. 2017-03-17 13:09:11 -07:00
parrt 553742e149 rm deadcode 2017-03-17 12:07:01 -07:00
parrt 251d27493e add lexer speed tests for new unicode streams 2017-03-17 12:06:07 -07:00