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
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
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
Terence Parr
e32799f048
Merge pull request #1371 from FloorGoddijn/master
...
CPP runtime : Added a specialized ctor for Any for nullptr.
2016-11-19 14:23:53 -08:00
Terence Parr
db5d306285
Merge pull request #1187 from renatahodovan/atnconfig_instantiate
...
Fix initialization of ATNConfig when computing SLL prediction termination condition.
2016-11-19 14:21:22 -08:00
Terence Parr
1ba897ace4
Merge pull request #1186 from renatahodovan/python-enterrule-typo
...
Fix typo in the parser of the Python3 runtime.
2016-11-19 14:16:17 -08:00
parrt
5153154658
Merge branch 'fix_typos' of git://github.com/sebkur/antlr4 into sebkur-fix_typos
2016-11-19 11:52:17 -08:00
Floor
1931ff7280
* Added a specialized ctor for Any for nullptr.
...
There was an inconvenience that an Any created with a nullptr returned false for isNull()
* removed warning [forcing value to bool 'true' or 'false'] when calling is<>
2016-11-18 17:24:11 +01:00
parrt
125a509e4e
Fixes #1369 by removing any redundant edges.
2016-11-17 12:41:32 -08:00
parrt
1aa3c957eb
add test for extra atn issues. currently failing.
2016-11-17 12:27:32 -08:00
Mike Lischke
3062d09e92
Merge pull request #48 from FloorGoddijn/master
...
using new preprocessor macro ANTLR4CPP_DLL instead of _WINDLL
2016-11-16 15:27:11 +01:00
Mike Lischke
9ac9c1c79a
Overhaul of the TokenStreamRewriter class.
...
Fixes bug #49 .
2016-11-16 15:17:46 +01:00
Mike Lischke
e5aa03c0b0
Merge branch 'master_upstream'
2016-11-16 13:31:06 +01:00
Mike Lischke
af0ac9e2bb
Fixed a number of mem leaks in TokenStreamRewriter.
...
Also added a workaround for duplicate ATN state transitions. Looks there is a problem in the ATN generation by ANTLR which needs investigation.
2016-11-16 13:27:58 +01:00
parrt
08e9776a4a
shift template-based runtime test to legacy, new mechanism uses annotation to get multi-line strings into java. all tests pass minus about 15 in C#
2016-11-15 11:08:19 -08:00
Mike Lischke
74d094bee7
Merge branch 'master_upstream'
2016-11-10 20:35:10 +01:00
Mike Lischke
da57be191a
Avoid warnings when building on Linux.
2016-11-10 10:28:13 +01:00
Floor
e0090254aa
using new preprocessor macro ANTLR4CPP_DLL in stead of the windows defined _WINDLL to define ANTLR4CPP_PUBLIC and EXPIMP_TEMPLATE for dll configurations.
...
There was a problem when the static lib was used at a client dll ( which itself defines the _WINDLL)
2016-11-09 13:45:37 +01:00
Terence Parr
f29a7940d8
Merge pull request #1345 from pboyer/intervalSetBug
...
Fix bug in IntervalSet
2016-11-07 23:19:22 +01:00
Peter Boyer
9bb49842ef
cleanup
2016-11-07 16:27:39 -05:00
Peter Boyer
aace3de380
Fix bug in interval set
2016-11-07 16:23:10 -05:00
Mike Lischke
92b032820e
Merge branch 'master_upstream'
2016-11-07 11:19:12 +01:00
Mike Lischke
3b3fe3da57
Merge branch 'master_upstream'
...
Had to resolve a number of conflicts + added code required for the C++ target to generate header files, after the recent changes in the main repo.
2016-11-07 11:16:02 +01:00
parrt
71c52eb0fa
building 4.6 runtime requires 4.5 antlr mvn plugin
2016-11-06 11:27:30 -08:00
parrt
ffaedd209d
Set version in code to 4.6.
2016-11-06 11:21:06 -08:00
parrt
95c850e5f8
set version in prep for 4.6
2016-11-05 16:48:36 -07:00
Peter Boyer
485465ee7a
Merge pull request #83 from pboyer/reduce-model-changes
...
Reduce model changes from parrt
2016-11-05 15:29:37 -04:00
parrt
6d022379bc
Pull in parrt's branch 'model-updates-for-new-targets' which appears to have freshened some non Go stuff as well. Simplify Go filename construction.
2016-11-05 08:48:37 -07:00
Mike Lischke
e71e95080a
Merge branch 'master_upstream'
...
Also updated the list of ignored tests in the Cpp.test.stg file (lke it is done for the other targets).
2016-11-05 15:07:59 +01:00
Peter Boyer
f553056a2b
Fix unused import error
2016-11-04 14:40:15 -04:00
Peter Boyer
0541f34a7e
Merge with origin/master
2016-11-04 14:08:12 -04:00
Peter Boyer
aa568711d9
Remove PortDebug
2016-11-04 13:55:39 -04:00
Sebastian Kürten
6a8a93286f
Move a @since tag to start of a new line
...
Javadoc requires block tags to appear at the start of lines.
2016-11-01 11:46:16 +01:00
Sebastian Kürten
8b16ff180a
Fix a few typos in Javadoc
2016-11-01 11:46:04 +01:00
kai stammerjohann
1feef18e3e
ParserRuleContext init members
2016-11-01 09:06:27 +01:00
Mike Lischke
f794820aaf
Reworked mutex handling + updated C++ template for a var init
...
- Mutexes have been consolidated. Instead of one per DFA (which can easily get to hundreds of them) we only have one mutex in the Recognizer class and all other parties use this for serialization. It's only about protected the DFA anyway, which is stored in a recognizer (lexer/parser).
- ATNState::getStateType() returns a size_t value now (actually an enum).
- Replaced checks via RTTI for transitions by the (serialization) type of the transition, for simplicity.
- Added some missing initialization for fields in certain ATN state classes.
- Fixed mem leak in DFA by shadowing the s0 field. That way still have a ref to the self created instance, even is s0 was replaced later.
- Added variable init in code generation for a rule context declaration (e.g. for labels).
2016-10-29 14:46:38 +02:00
Floor
951d0f06d7
cpp runtime: updated the vs2013 project reflecting the last changes
2016-10-21 13:07:15 +02:00
Peter Boyer
adef6f690a
Cleanup var statements ( #73 )
...
* Cleanup var statements
* Fix type decl
2016-10-17 12:57:26 -04:00
Peter Boyer
07f7dae78f
Fix type decl
2016-10-17 12:04:05 -04:00
Peter Boyer
191b8f9d58
Cleanup var statements
2016-10-17 11:41:56 -04:00
Mike Lischke
9e77edcb34
ATNState::transactions improvements
...
The transaction field was access with trivial getters and setters which server no real purpose, so I made the vector public and remove all the obsolete accessor functions. This simplifies the API (e.g. use .size() instead of getNumberOfTransitions()).
This change required a few other changes in runtime.
Additionally, I radically cut down the ATN::toString method to return only what the Java runtime is doing instead of a full dump of the state and it's transitions.
2016-10-14 17:10:00 +02:00
Mike Lischke
aabf4baf60
Added default c-tor to ParseTree + improved createInstance.
...
createInstance now use move semantics for its parameters.
2016-10-14 17:05:00 +02:00
Mike Lischke
014070de66
Converted smart pointer for the rule context in RecognitionException
...
Since we pass around raw pointer for volatile references now, we must not create smart pointers from them or we will get a double free.
2016-10-14 17:03:38 +02:00
parrt
285c7fca6c
resolve contribs conflict
2016-10-13 16:21:00 -07:00
Peter Boyer
2444386091
Remove JavaScript PORT_DEBUG, re-enable runtime tests for other language targets ( #69 )
...
* Re-enable runtime tests for other language targets
* Fix typo in js code
* Remove PORT_DEBUG statements
* Fix missing
* Fix testAltNum
2016-10-13 17:06:22 -04:00
Terence Parr
8d0ae8599e
Merge pull request #1221 from ericvergnaud/javascript-consistency
...
Following #1218 , ensure consistency of ATNConfigSet hashing strategy …
2016-10-13 14:05:36 -07:00