Commit Graph

5675 Commits

Author SHA1 Message Date
Terence Parr 8ed1105290 Merge pull request #1353 from marcohu/fix_1233
Grammar dependency management for Maven plugin
2016-11-21 11:21:58 -08:00
parrt df89ad6180 don't require output encoding in antlr4 mvn plugin 2016-11-21 11:05:31 -08:00
parrt 06285d16d7 improve doc on runtime targets 2016-11-21 10:51:07 -08:00
parrt d580f2184f Use JFrame instead of JDialog to get "expand window" buttons 2016-11-21 10:42:52 -08:00
Marco Hunsicker cfc538bfdc Merge branch 'master' of https://github.com/antlr/antlr4 into fix_1233 to solve
Conflicts:
	contributors.txt
2016-11-21 19:23:48 +01:00
Terence Parr 37ff8a3161 Merge pull request #1248 from renatahodovan/configset-contains
Fix comparisons in ATNConfigSet.__contains__ of Python targets.
2016-11-21 10:08:51 -08:00
Terence Parr f4eb903d5d Merge pull request #1382 from parrt/hanjoes-swift-target-new-test
swift target rebased on current master
2016-11-20 21:07:58 -08:00
parrt 27a59988a2 take out flag for cmake as it doesn't work on linux. turn off C++ tests on mac 2016-11-20 20:28:12 -08:00
parrt 8e33fe49f5 turn out stderr output from clang++ compiles 2016-11-20 19:53:05 -08:00
parrt 66be087c38 merge old and new travis; improve so it runs C++ on osx; update BaseSwiftTest so it mirrors other targets; remove unneeded dep in pom to some json stuff 2016-11-20 19:50:54 -08:00
Marco Hunsicker cb785d5d1e Use method to strip quotes. This could be factored out as it seems generally usefull 2016-11-20 19:21:54 +01:00
Marco Hunsicker 89e3f063c9 Remove path from grammar name when present 2016-11-20 19:19:53 +01:00
Marco Hunsicker d9af7896a7 Don't require imports directory 2016-11-20 19:05:14 +01:00
Marco Hunsicker bfc8bf0459 Ensure valid output encoding 2016-11-20 19:03:46 +01:00
Marco Hunsicker 5612d1069e Signed certificate of origin 2016-11-20 14:00:59 +01:00
Marco Hunsicker a077d3d072 Merge branch 'master' of https://github.com/antlr/antlr4 into fix_1233 2016-11-20 12:49:39 +01:00
Eric Vergnaud 9d926d6c2a port from python 2 version 2016-11-20 15:56:43 +08:00
Eric Vergnaud c50b10f865 clarify javascript visitor code 2016-11-20 14:10:05 +08:00
hanjoes e0b326677b Migrating the current Swift tests to the new testing framework. 2016-11-19 18:30:48 -08:00
hanjoes 49d9a39a79 in the middle of transition. 2016-11-19 18:30:48 -08:00
janyou cddb8a6ff2 Update Swift.stg
add namedActions
2016-11-19 18:30:48 -08:00
janyou 281d624751 Update RuntimeMetaData.swift 2016-11-19 18:30:48 -08:00
janyou abf2a1883c Update SwiftTarget.java
"4.5.1"->"4.5.3"
2016-11-19 18:30:48 -08:00
janyou fc3fa24464 Update Swift.stg 2016-11-19 18:30:48 -08:00
janyou 61248c8a4d Update Swift.stg 2016-11-19 18:30:48 -08:00
janyou d1dbfccdd6 Update Swift.test.stg 2016-11-19 18:30:48 -08:00
janyou 033e5ed136 Update Trees.swift 2016-11-19 18:30:48 -08:00
janyou e3cc81bc32 Update RuleContext.swift 2016-11-19 18:30:48 -08:00
janyou 97c5ebd359 Update Parser.swift 2016-11-19 18:30:48 -08:00
Ewan Mellor 977daa6766 Disable the JDK 6 and 7 builds on this branch -- no point loading up
Travis.
2016-11-19 18:30:48 -08:00
Ewan Mellor a3d37a082e Work around apparent rvm bug that is in Travis's Xcode image. 2016-11-19 18:30:48 -08:00
Ewan Mellor 8bd4155878 Use Xcode 8 on the Travis macOS builds, because we need Swift 3. 2016-11-19 18:30:48 -08:00
Ewan Mellor 4d0718b6f1 Install mono on the macOS Travis builds. 2016-11-19 18:30:48 -08:00
Ewan Mellor eadb6b21e6 Use Homebrew to install python3 on the macOS build on Travis. 2016-11-19 18:30:48 -08:00
Ewan Mellor c024166dfa Fix path to Swift test files. 2016-11-19 18:30:48 -08:00
Ewan Mellor a641c69fc6 Fix build script -- there is no readlink -f on macOS. 2016-11-19 18:30:48 -08:00
Ewan Mellor 1c6f6c4aed Ignore .xcuserdata, and remove those that were here already. 2016-11-19 18:30:48 -08:00
Ewan Mellor 5ac3a79234 Explicitly lay out the matrix for Travis.
This means that we only have one run on macOS, using the default JDK.
Travis does not support JDK-switching on macOS.
2016-11-19 18:30:48 -08:00
Ewan Mellor 017f6586d7 Have both Linux and macOS tests on Travis.
The Swift tests will not work on Linux, because they depend on Xcode, so
we need a separate macOS run for them.
2016-11-19 18:30:48 -08:00
Ewan Mellor c611a64461 Remove commented-out debug code. 2016-11-19 18:30:48 -08:00
Ewan Mellor b52e8e46b2 Skip Swift tests on non-Mac platforms #1339
Swift tests depend on Xcode (via xcrun) so only run them on Macs.

This also bumps the maven-surefire-plugin version to 2.19.1, because
2.12.4 crashes when it sees an empty <include> block.
2016-11-19 18:30:48 -08:00
Ewan Mellor cf1487feb4 Replace init with init_ in DelegatorRuleOverridesLookaheadInDelegate.
init is the name of the instance initializer function in Swift, so generating
a grammar with that name causes problems, since it is generated into
function names on the parser.

I thought that renaming this would be a problem for other targets, but it
doesn't look like it, and actually the convention of using type_ rather than
type is already in use in this file.  Match this by adopting init_ as the
name, and regenerate the tests to match.

This was initially handled in https://github.com/janyou/ANTLR-Swift-Target
(using the name initIt instead of init).
2016-11-19 18:30:48 -08:00
Ewan Mellor ee469ae6d8 Regenerate the tests using mvn -Pgen generate-test-sources.
This adds all the new Swift tests.
2016-11-19 18:30:48 -08:00
Ewan Mellor 6d6327aa9d Move the Token declarations into an enum.
This avoids the naming conflict in the tests between the use of ATN as a
token name and as a type name.
2016-11-19 18:30:48 -08:00
Ewan Mellor 869bcfe429 Mark matchWildcard call with a try, since it can throw. 2016-11-19 18:30:48 -08:00
Ewan Mellor cb1fcd9294 Implement TreeNodeWithAltNumField with a TODO.
I'm getting an error about this, but I don't know what it's supposed to do.
2016-11-19 18:30:48 -08:00
Ewan Mellor 66ac63877a Remove line that just looks completely bogus and which causes error messages. 2016-11-19 18:30:48 -08:00
Ewan Mellor 76cebe470d Update Swift.test.stg to include templates that were added on master since
the initial fork.
2016-11-19 18:30:48 -08:00
Ewan Mellor 5b37b3e236 Add OptionalValue declarations to each of the non-Swift targets, so that
this can be used in the test templates.

It is a no-op for every target other than Swift.

This pairs with cset 8251422b.
2016-11-19 18:30:48 -08:00
Ewan Mellor dbe832766d Wrap some values with <OptionalValue> declarations.
I don't know what this is for.

I also presume that this requires corresponding changes in the other targets
that aren't there yet (per the comment at the bottom).  Just committing this
for now.

This comes from https://github.com/janyou/ANTLR-Swift-Target and is
marked Copyright (c) 2016 janyou on top of the BSD license and Copyrights
for Terence Parr and Sam Harwell derived from the original ANTLR source.
2016-11-19 18:30:48 -08:00