Commit Graph

271 Commits

Author SHA1 Message Date
Will Faught edbf3225ef Fix LRWithLabelsListener to call EList.String 2016-07-06 10:19:25 -07:00
Will Faught a05dea54ec Fix test case build errors 2016-07-06 09:02:42 -07: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 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
Will Faught c9ac8a6c61 Generate Go tests 2016-06-16 23:29:10 -07:00
Will Faught c72ef6383e Clean up Go test templates 2016-06-16 23:27:47 -07:00
Will Faught 80f99b50da Fix Property calls in generated Go tests 2016-06-16 23:20:52 -07:00
Will Faught 4e560db250 Fix SetErrorHandler and NewBailErrorStrategy calls in generated Go tests 2016-06-16 23:20:52 -07:00
Will Faught 40b7e1bf12 Fix parser tokens in generated Go tests 2016-06-16 23:20:45 -07:00
Mike Lischke dd48c0fbd5 A few final touches to make runtime tests passing. 2016-06-16 11:20:42 +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 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 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 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
Wolfgang Johannes Kohnen f8f872bfc9 runtime-testsuite/Go: fix recursion 2016-06-06 08:12:50 +02:00
Wolfgang Johannes Kohnen bf7cc8ce80 runtime-testsuite/Go: Cache Go test environment and make it self-contained.
* "go install" the Go runtime inside a temporary GOPATH directory.
 * Remove unnecessary GOPATH variable elements.
 * Change some instances of stringly typing to strongly typing.
 * Remove a few pointless indirections.
 * Cleanup erase helper methods, make eraseFiles (eraseDirectory)
   static and recursive (used by @AfterClass as well).
 * Other minor cleanups.
 * => this works on travis now and is about twice as fast! :)
2016-06-05 21:52:53 +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 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
Wolfgang Johannes Kohnen 4fd4e51810 runtime-testsuite/go: Make path construction slightly more robust.
* also piggy back a typo fix.
2016-05-28 11:15:14 +02:00
Wolfgang Johannes Kohnen f2dc9f476b runtime-testsuite/Go: timeout tests, honour GOROOT 2016-05-27 22:56:56 +02:00
Mike Lischke a0665677c1 Lots of fine tuning to get more tests passing. 2016-05-27 22:38:42 +02:00
Will Faught a0314a8946 Change File.separator to File.pathSeparator 2016-05-27 11:26:38 -07:00
Will Faught 7e8fb7a7f3 Handle empty current GOPATH when setting GOPATH 2016-05-27 11:05:16 -07:00
Will Faught 9562d87d49 Change willfaught/antlr4 to pboyer/antlr4 2016-05-26 23:43:43 -07:00
Will Faught 3434e802be Fix test GOPATH env var to include current GOPATH
Also:

- Change "antlr4" imports to "github.com/antlr/antlr4/runtime/Go/antlr"
- Remove parser prefix from Property and pred calls
- Change TParser.X tokens to TParserX
2016-05-26 23:37:25 -07:00
Will Faught 34877767c1 Change package alias antlr4 to antlr 2016-05-26 23:31:19 -07: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 bebb63a126 Updated generation a bit. 2016-05-24 11:44:43 -07: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
David Sisson b3a17b00a2 Set up so we compile link all of the files in the test directory. Does not run the binary afterwards, but that's because there's still a print being generated somewhere (and I have no idea where it's coming from). 2016-05-24 01:44:17 -07:00
Wolfgang Johannes Kohnen b6f384bf3c runtime test/Go: Use $PATH and $GOROOT to find go executable. 2016-05-23 11:11:53 +02:00
Mike Lischke 7d69f24201 Small corrections to make the test module compile. 2016-05-22 19:15:36 +02:00
David Sisson c8e60b7fe0 Down to one issue -- tree::ParseTree and tree:RuleNode aren't related as they are in some tests. Need to find either the right relationship or come up with an alternative test. 2016-05-21 15:59:22 -07:00
David Sisson ae4dcbabbd properly escape templates 2016-05-20 22:15:48 -07:00
David Sisson 6aa03ed9a2 attempts compilation 2016-05-20 22:14:28 -07:00
David Sisson 9920efd353 More updates to the C++ test runner. 2016-05-09 21:45:14 -07:00
David Sisson db6f3c983d Added the start of linker support. 2016-05-09 20:53:33 -07:00
David Sisson a212755734 Cleaned up the test runner. 2016-05-08 21:27:40 -07:00
David Sisson cbe9c2f1f7 Returned other tests to active duty. 2016-05-06 20:19:48 -07:00
David Sisson eddf2a1b36 updating BaseCppTest.java 2016-05-06 20:07:40 -07:00
David Sisson b976a4942d fix which tests to run for cpp 2016-05-06 19:48:57 -07:00
David Sisson 358bde8844 Updated runtime tests with updated generation templates. 2016-05-06 19:33:13 -07:00
David Sisson 00083a77e8 Adding missing file. 2016-05-05 22:09:58 -07:00
David Sisson e4fd106948 update packages 2016-05-05 22:07:57 -07:00
David Sisson 43dc1df1f2 More needed files. 2016-05-05 22:04:47 -07:00
David Sisson f018236ad7 Added minimum set of files. 2016-05-05 21:56:13 -07:00
David Sisson 6433481bc7 Added minimum set of files. 2016-05-05 21:56:07 -07:00
Mike Lischke 5489ad2ac6 A few changes in test files after running the test generator (mostly reordered tests). 2016-05-04 10:14:24 +02:00
Mike Lischke 0e5b501aa8 Merge branch 'feature/templates' into feature/templates-org 2016-04-23 16:42:26 +02:00
parrt b92f22769e [maven-release-plugin] prepare for next development iteration 2016-03-30 16:25:49 -07:00
parrt 567fcc6311 [maven-release-plugin] prepare release antlr4-master-4.5.3 2016-03-30 16:25:45 -07:00
parrt 9352c9cf6d force 3.5 python to see if we can get travis to work. 2016-03-30 11:32:40 -07:00
parrt 9e98714a1d Add ability to set parse tree internal node super class with option contextSuperClass. Provide impl in Java target that has altNum backing field. Add test across targets to set/get alt num. Fixes #1152. 2016-03-30 11:00:47 -07:00
parrt f36e77fc2a use latest python 2016-03-29 15:33:22 -07:00
Michael Peyton Jones b1b2579621 Add tests for alternative precedence in left-recursive transformation 2016-02-22 12:49:00 +00:00
parrt 08f3ad798e [maven-release-plugin] prepare for next development iteration 2016-01-29 15:29:01 -08:00
parrt c5a296596d [maven-release-plugin] prepare release 4.5.2 2016-01-29 15:28:57 -08:00
parrt fa6f674e33 [maven-release-plugin] rollback the release of 4.5.2 2016-01-29 15:27:40 -08:00
parrt 009f3cac3a [maven-release-plugin] prepare release 4.5.2 2016-01-29 15:27:19 -08:00
parrt 6b31ceaa9d [maven-release-plugin] rollback the release of 4.5.2 2016-01-29 15:26:02 -08:00
parrt 6b3f9816cb [maven-release-plugin] prepare for next development iteration 2016-01-29 14:13:15 -08:00
parrt b446c50722 [maven-release-plugin] prepare release 4.5.2 2016-01-29 14:13:11 -08:00
Peter Boyer 92b8f9f891 Various test fixes 2016-01-19 10:44:16 -05:00
Peter Boyer 86d65cf719 Fix lexer test failures 2016-01-16 17:11:00 -05:00
Peter Boyer 8f70a6f553 Fix test and GetRuleInvocationStack 2016-01-13 21:19:13 -05:00
Peter Boyer 7fc028409e Fix some more tests 2016-01-12 09:42:29 -05:00
Peter Boyer 7473c21b1e Even more test fixes yayaya 2016-01-08 16:57:54 -05:00
Peter Boyer 857600be43 Numerous test fixes 2016-01-08 09:28:38 -05:00
Peter Boyer 096f26d3ae Minor fixes for left recursive rules 2016-01-07 09:46:00 -05:00
Peter Boyer 21999adb6e Fix a bunch of compiler errors in Go runtime-testsuite 2016-01-06 19:12:37 -05:00
Peter Boyer 81b47eedd7 Various minor fixes 2016-01-05 17:05:12 -05:00
Peter Boyer 960c59e373 Fix more issues in code generation 2016-01-05 12:16:35 -05:00
Peter Boyer 977a1c3ae7 Fix issue with tests 2016-01-05 09:30:28 -05:00
Peter Boyer f2852686a7 Some of the runtime-testsuite tests now pass 2016-01-04 14:57:47 -05:00
Peter Boyer a2e273c5f6 Stub out runtime-testsuite test generator 2015-12-23 18:10:47 -06:00
Peter Boyer 7c812fb320 Various minor fixes, update of runtime-testsuite for go 2015-12-20 19:41:12 -05:00
Peter Boyer c1f473e6ef Stubbed out test suite 2015-12-18 16:39:49 -05:00
Terence Parr 05b50325a8 Merge pull request #991 from michaelpj/sync-before-predict
Reinstitute `sync` calls before `adaptivePredict`
2015-11-19 12:37:09 -08:00
Eric Vergnaud 5c101e750e re-enable full csharp test suite 2015-09-19 02:43:28 +08:00
Eric Vergnaud 7beb07bfc3 SUCCESS!!!! All ANTLR targets successfully build and pass tests on travis-ci! 2015-09-19 02:42:20 +08:00
Eric Vergnaud 2cea58868f get errors from xbuild 2015-09-19 01:33:17 +08:00
Eric Vergnaud f21ec5826e More info, maybe? 2015-09-19 00:59:19 +08:00
Eric Vergnaud 6d859a5168 Get compile error for failing test 2015-09-19 00:51:37 +08:00
Eric Vergnaud 8bf760a437 now try mono 2015-09-19 00:02:47 +08:00
Eric Vergnaud cbd3fad083 fix maven warnings 2015-09-18 23:39:39 +08:00
Eric Vergnaud 68cdaea368 now trying mono! 2015-09-18 23:29:52 +08:00
Eric Vergnaud 50e1512e4f ok, now locate python3.4! 2015-09-18 23:17:40 +08:00
Eric Vergnaud f05c9962df force travis build 2015-09-18 02:28:48 +08:00
Eric Vergnaud 377fd29f85 try again 2015-09-18 02:13:53 +08:00
Eric Vergnaud 6e9680f9cf trying to get python3 tests to run on travis-ci 2015-09-18 02:09:52 +08:00
Eric Vergnaud f7a9a73d64 fix test generation parameters, enable non-java targets 2015-09-17 02:51:10 +08:00
Eric Vergnaud a24b4fdf06 fix TestGenerator unclear path detection, enable generation of all targets except javascript browsers 2015-09-17 02:50:09 +08:00
Michael Peyton Jones 0c29b54fcb Update generated test source 2015-09-07 17:47:02 +01:00
Michael Peyton Jones af00e52de6 Correctly append newline to test output 2015-09-07 17:37:05 +01:00
Michael Peyton Jones 797cf08111 Delete remaining commented out syncs.
These sync calls are truly redundant - when we are in a simple
alternative block, we can recover sufficiently with `recoverInline`, and
so the syncs do not add anything.
2015-09-07 17:37:05 +01:00
Michael Peyton Jones 940cbcf19f Uncomment syncs before adaptivePredict
These allow slightly better error recovery before we run
`adaptivePredict`, as illustrated by the test.
2015-09-07 11:56:30 +01:00
Eric Vergnaud a80052fa2a Fixed a bug when locating JavaScript runtime, and refactored common code 2015-09-03 23:23:01 +08:00
Eric Vergnaud b65d521574 Fix test generator to support browser tests generation when generating all tests 2015-09-03 23:20:02 +08:00
Eric Vergnaud ebf8b9aaea Fix templates which were referring to a missing class 2015-09-03 23:18:58 +08:00
Eric Vergnaud bf00f6b57e Switch to selenium v46 2015-09-03 23:17:37 +08:00
parrt c07aa4ede1 [maven-release-plugin] prepare for next development iteration 2015-08-20 12:11:58 -07:00
parrt 3611fde621 [maven-release-plugin] prepare release 4.5.1-1 2015-08-20 12:11:55 -07:00
parrt 3d181af904 [maven-release-plugin] prepare for next development iteration 2015-07-15 14:45:48 -07:00
parrt 79dae1e6f6 [maven-release-plugin] prepare release 4.5.1 2015-07-15 14:45:45 -07:00
Jason van Zyl 398f7fcf53 Run all Java target tests by default
And we will use the "tests" profile to initiate the tests for the rest of the targets.
2015-06-29 22:03:16 -04:00
Jason van Zyl f48aa50a61 Add a command and README.md for the generation of the runtime test harness.
The workflow we want to support is for an Antlr dev to tweak the harness, examine the output
and when it's desirable checkin the results. This is an offline process done by a dev.
2015-06-29 18:09:39 -07:00
Jason van Zyl ee4bb93449 Enable the generation of the runtime tests
Note: I had to tweak generator not to assume a particular directory structure. I will
revisit this but the whole maven build is working.
2015-06-29 18:09:39 -07:00
Jason van Zyl a13352d8e7 Make javascript test sources compile. Jetty and Selenium required. 2015-06-29 18:09:39 -07:00
Jason van Zyl fd13f137f2 All projects are now building and tests passing from Maven 2015-06-29 18:09:39 -07:00
Terence Parr e921ba69c8 tweak java version 2015-06-29 18:09:38 -07:00
parrt b05e3ccdb8 messing with poms to get test generation in there. it doesn't seem to compiled and properly though. mvn compile works but mvn install doesn't finished compiling generated tests. 2015-06-29 18:09:38 -07:00
Sam Harwell eeb158d9ec rm circular dependency; update a comment 2015-06-29 18:09:38 -07:00
Sam Harwell 9247334a07 Update getTargetNameFromTemplatesFileName() to also work on Windows systems 2015-06-29 18:09:38 -07:00
Terence Parr dec5d26a3d tweak pom so it compiles in `compile` phase and `install` phase but doesn't run tests correctly. 2015-06-29 18:09:37 -07:00
parrt 8e361ef401 gen all targets now pays attention to -o option. Simplified target spec. `Regen tests with java org.antlr.v4.testgen.TestGenerator -root /Users/parrt/antlr/code/antlr4` from command-line. 2015-06-29 18:09:37 -07:00
parrt 7b5ac5a751 fix Node test gen 2015-06-29 18:09:37 -07:00
parrt da818c0c5c got javascript/node tests passing; folded in all js targets 2015-06-29 18:09:36 -07:00
parrt 8e89af918f all Python2 runtime tests pass 2015-06-29 18:09:35 -07:00
parrt d1f95085fe all Python3 runtime tests pass. Using same "get resource" mechanism to find runtime python code as I did for C#. 2015-06-29 18:09:35 -07:00
parrt ef870a4703 reset resource locations to entire runtime dir. 2015-06-29 18:09:34 -07:00
parrt 80b011adef reset resource locations to target name under antlr4/runtime for consistency. 2015-06-29 18:09:34 -07:00
parrt 3b641b0e22 ugh. intellij missed a file for commit (again!) wtf? 2015-06-29 18:09:34 -07:00
parrt 6711cdf321 Got C# target runtime tests working by finding files as resource not relative path. updated intellij proj to include correct stuff as resources. 2015-06-29 18:09:34 -07:00
parrt e8c4bc4b09 Manual copy/add-to-git from antlr4-csharp repo (w/o history) to show how C# target should get injected into main antlr4 repo. Pieces go into tool for code gen, runtime-testsuite, and of course the runtime module. 2015-06-29 18:09:34 -07:00
parrt 1cd4ad125c add import for BaseTest so tool tests compile. it all appears to compile and tool tests pass. 2015-06-29 18:09:33 -07:00
parrt e1c22147f8 Ooops. do the same update for ErrorQueue, which also moved location. 2015-06-29 18:09:32 -07:00
parrt 66ccef187e update test gen templates and the generated templates themselves to use the new location for BaseTest. 2015-06-29 18:09:32 -07:00
parrt 0430833450 move ErrorQueue, used by BaseTest, to the runtime test area. 2015-06-29 18:09:32 -07:00
parrt 8ae7f22f86 move BaseTest to be in the runtime test area to be consistent with other targets. 2015-06-29 18:09:32 -07:00
parrt fdcfe5482f mv tool tests into their own top level directory; mv test template support .stg into the runtime-testsuite area 2015-06-29 18:09:32 -07:00
parrt 9170f57aff tweak TestGenerator so it sorts test names so order is always same in TestX.java files. 2015-06-24 16:36:40 -07:00
parrt fcd8a67965 don't allow recursive subdirs of tests 2015-06-24 12:54:02 -07:00
Jason van Zyl 46202d98a2 Integrating tests for all supported targets
- A profile "rts" has been created which runs the integration tests. By default the the project containing the runtimes tests will not run so that users casually checking out and building the project do not have to install the tools required to test all the supported Antlr targets.

- The base test classes that are required for running the integration tests are downloaded from the other Antlr repos, dynamically added to the compile classpath and used by the currently checked in integration tests

To run the the full build with all the integration tests use the following:

mvn clean install -Prts
2015-06-24 13:45:40 -04:00
Terence Parr 0e2e135771 tweak bild 2015-06-22 17:58:53 -07:00
Terence Parr 317ce86583 add dependency on tool for tests 2015-06-22 17:19:54 -07:00
parrt 9c57b650c1 add unit test src for now; it is altogether from all targets 2015-06-22 13:24:50 -07:00
ericvergnaud b09119e426 fix failing tests generation
those 4 tests used \r as input although \r has no impact on what is
being tested. Replaced or removed \r so tests can be generated and ran.
2015-06-22 12:34:19 -07:00
ericvergnaud fe13b23628 fix failing test generation
failed in Python because « type » is reserved
2015-06-22 12:15:11 -07:00