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
Ewan Mellor
6d5d1f1c23
Add build system changes needed for Swift backend.
2016-11-19 18:30:48 -08:00
Ewan Mellor
c989064e32
Added (part of) a Swift backend.
...
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
Ewan Mellor
69d9cfe302
Added a Swift runtime.
...
This comes from https://github.com/janyou/Antlr-Swift-Runtime and is
marked Copyright (c) 2015 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
janyou
5ad9e4dfcb
Update contributors.txt
2016-11-19 18:30:48 -08:00
Ewan Mellor
771e8e9c63
Sign the contributor's agreement.
2016-11-19 18:30:48 -08:00
parrt
d9490e16da
undo damage done by intellij pulling out imports from python :(
2016-11-19 18:29:04 -08:00
parrt
883e013cc6
Fixes #1318 .
2016-11-19 16:13:50 -08:00
parrt
34f0c66a89
Fixes #1342 .
2016-11-19 16:00:17 -08:00
Terence Parr
10ce5d2625
Merge pull request #1311 from sebkur/allow_path_in_token_vocab
...
Allow paths as tokenVocab option
2016-11-19 15:30:19 -08:00
parrt
144baa9ade
cannot raise string exceptions
2016-11-19 15:09:13 -08:00
Terence Parr
30e4ec29c8
Merge pull request #1251 from renatahodovan/execATN-conflictingAlts
...
Fix the initialization of conflictingAlts in execATN in Python targets.
2016-11-19 14:58:39 -08:00
parrt
c0b5a40bcf
Python3 target filterPrecedencePredicates should take collection:set not list as hint. Manual implementation of https://github.com/antlr/antlr4/pull/1247/files
2016-11-19 14:51:12 -08:00
Terence Parr
f0177c96f8
Merge pull request #1246 from renatahodovan/nextToken-self-fix
...
Fix eofToken access in ListTokenSource.nextToken() by Python targets.
2016-11-19 14:43:06 -08:00