parrt
e07a6fa778
Update PHP Runtime to latest version
2020-11-24 11:34:57 -08:00
Terence Parr
7f5848305c
Merge branch 'master' into master
2020-11-24 10:36:57 -08:00
cliid
08a4b345b6
Merge branch 'master' into master
2020-10-24 19:38:14 +09:00
parrt
eba9308974
resolve
2020-10-20 12:40:38 -07:00
Eric Vergnaud
9a288bcb25
fix failing Python2 tests with utf-8 encoding
2020-10-11 15:48:11 +08:00
HackerJang
5ec39c2a65
Changed Python runtime Lexer.py, Parser.py to support version > 5
2020-10-11 10:59:35 +09:00
Eric Vergnaud
fa0c0b665e
fix failing Python2 tests with utf-8 encoding
2020-10-11 09:52:40 +08:00
Eric Vergnaud
07ddf8de45
fix failing Python2 tests with utf-8 encoding
2020-10-11 09:24:37 +08:00
Terence Parr
9e64dfc6e9
Merge pull request #2931 from ericvergnaud/javascript-es6-migration
...
Javascript es6 migration
2020-10-10 16:25:22 -07:00
Terence Parr
7b9dc37114
Merge pull request #2891 from eric-buaa-cn/patch-1
...
fix a typo
2020-10-10 16:17:36 -07:00
Terence Parr
69687b96bb
Merge pull request #2927 from ericvergnaud/fix-python3-typo
...
Fix undefined value
2020-10-10 16:11:22 -07:00
Terence Parr
e3243f74b2
Merge branch 'master' into master
2020-10-09 18:22:27 -07:00
Terence Parr
527118197f
Merge branch 'master' into master
2020-10-08 09:54:57 -07:00
Martin Mirchev
0ead01fb97
Made C# Trace Listener usable
2020-10-08 14:40:03 +02:00
Eric Vergnaud
215d57abff
try fix travis
2020-10-03 19:57:57 +08:00
Eric Vergnaud
eafb3d8ea6
fix circular dependency
2020-10-03 17:18:25 +08:00
Eric Vergnaud
0bd0a05f24
remove unnecessary test template
2020-10-03 17:17:56 +08:00
Eric Vergnaud
bec37fc0e5
updated by webpack
2020-10-03 14:06:27 +08:00
Eric Vergnaud
48f22a9a1e
fix import issue leading to invalid algo
2020-10-03 14:05:05 +08:00
Eric Vergnaud
3451dccd6c
formatting
2020-10-03 14:04:11 +08:00
Eric Vergnaud
d3cc9ecc73
Fix undefined value
2020-10-02 17:31:00 +08:00
Markus Trenkwalder
d735386bf2
Fix linker issue when compiling with CMake and MSVC on Windows by setting gtest_force_shared_crt=ON
2020-09-16 08:37:14 +02:00
Terence Parr
e73f72be73
Merge pull request #2911 from rmcgregor1990/separate-py3-tests
...
separate py3 runtime tests from src tree + actually run said tests in CI
2020-09-15 13:13:12 -07:00
Terence Parr
2e4bf8196a
Merge pull request #2905 from antlr/fix-javascript-perf-issue
...
Fix #2902
2020-09-15 09:36:22 -07:00
Robert McGregor
6f0657e5c9
separate py3 runtime tests from src tree + actually run said tests in CI
2020-09-14 20:38:22 +01:00
Eric Vergnaud
ef029cef40
Fix #2902
2020-09-13 20:53:49 +08:00
Charles Ruan
734d18cb35
Add missing const in StringUtils.h
2020-09-12 23:13:52 +08:00
Charles Ruan
ae0c7a31f8
Implement USE_UTF8_INSTEAD_OF_CODECVT macro in CMakeLists.txt in another way.
2020-09-12 21:32:06 +08:00
Charles Ruan
73f157fb91
Add utfcpp include paths in project.pbxproj for macOS compilation.
2020-09-12 20:51:09 +08:00
Charles Ruan
4bacd99255
add prompt for USE_UTF8_INSTEAD_OF_CODECVT macro in CMakeLists.txt.
2020-09-12 20:41:02 +08:00
Charles Ruan
2d86b34c40
Compile with utf8 on macOS.
2020-09-12 20:35:08 +08:00
Charles Ruan
72d86f91ed
1. Revert change: downgrade gcc version from 5 to 4.9.
...
2. Add macro USE_UTF8_INSTEAD_OF_CODECVT to judge use codecvt or utf8.
2020-09-12 01:30:14 +08:00
Charles Ruan
2dc9fb50be
1. remove wstring_convert and codecvt
...
2. let clang::fallthrough and throw_with_nested be compatible to gcc 4.9
3. downgrade gcc version from 5 to 4.9
2020-09-12 01:30:14 +08:00
Terence Parr
1ac3593fc4
Merge pull request #2848 from nburles/fix_static_const_odr_violations
...
[C++ runtime] Fix static const ODR violations
2020-09-11 08:58:45 -07:00
Terence Parr
168882d942
Merge branch 'master' into master
2020-09-10 12:56:08 -07:00
Terence Parr
fb2a34d5be
Merge branch 'master' into cpp_vocabulary_cleanup
2020-09-10 10:54:44 -07:00
Terence Parr
9a646e0367
Merge pull request #2847 from nburles/antlrinputstream_from_stringview
...
[C++ runtime] Add AntlrInputStream(std::string_view) constructor
2020-09-10 10:53:55 -07:00
Kilian Kilger
cdf67a5ed2
Merge branch 'master' into master
2020-09-10 18:36:54 +02:00
Kilian Kilger
19adda3a58
Add thread_local again in StringUtils.h due to better performance
2020-09-10 18:33:08 +02:00
irabeson
af53acd2a2
Merge branch 'master' into cpp_vocabulary_cleanup
2020-09-10 10:42:36 -04:00
ArthurSonzogni
f68c47a988
Fix clang compile error with --stdlib=libc++
...
On linux. Most users haven't installed libc++-dev, but ANTLR is passing
the "--stdlib=libc++" argument. As a result, this won't compile. Users
will see:
```
/tmp/antlr4/runtime/Cpp/runtime/src/antlr4-common.h:8:10: fatal error:
'algorithm' file not found
```
This is caused by the "WITH_LIBCXX" option.
It was introduced by:
d46ef90aa0
It causes the option "--stdlib=libc++" to be appended by default.
I believe its default value should have been left as "Off".
With "off" by default, clang will use its default C++ library, which is
always available.
The WITH_LIBCXX option is kept, being able to change the C++ library
might be useful?
BUG=https://github.com/antlr/antlr4/issues/2898
2020-09-06 15:30:54 +02:00
ericliu
f2007278bb
fix a typo
2020-08-27 14:14:47 +08:00
Matthew Paletta
3b3da29d45
Merge branch 'master' into master
2020-08-26 13:30:32 -07:00
Terence Parr
dfc7ffc39c
Merge branch 'master' into dart-clean
2020-07-27 11:33:40 -07:00
Eric Vergnaud
2bfce77e91
Fix a NPE
2020-07-12 22:12:02 +08:00
Matthew Paletta
6e3d900c96
Resynced to master
2020-07-04 21:34:28 -07:00
Shan M
e744435463
Adds LL1Analyzer to exports list
2020-07-01 12:10:47 +03:00
Shan M
795cd3b682
adds IntervalSet to the export list
2020-07-01 12:01:44 +03:00
Shan M
f780421da7
Adds DefaultErrorStrategy to export list
2020-07-01 12:00:41 +03:00
Matthew Paletta
0daa97a5f0
Added templated move support for antlrcpp::Any
2020-06-15 16:52:47 -07:00
Nathan Burles
254b144bf2
Add AntlrInputStream(std::string_view) constructor
...
Guarded by the __cplusplus macro so it is only available in C++17 or
newer.
2020-06-15 12:11:44 +01:00
Nathan Burles
a1d2d47da8
Avoid defining static const members in headers
...
Defining a static const member in a header breaks ODR, as the object will be
defined in every translation unit that includes the header.
Instead, the members should either be declared `inline` (which is
implicitly the case for `constexpr` members) or initialized in a cpp.
Alternatively, using an anonymous enum allows the definition to remain
inside the header meaning that the compiler can still choose to inline
values.
2020-06-15 08:40:57 +01:00
irabeson
3c0dbd83dd
[C++ runtime] Optimizations of Vocabulary::fromTokenNames
...
This commit doesn't change the behavior, it contains few small improvements:
- prevent useless copy when creating the variable tokenName
- avoid to check if tokenName is empty twice
- use std::string::empty() instead of creating an empty string to compare with
- use std::string::clear() instead of assigning an empty C string to clear a string
2020-06-04 23:25:12 -04:00
Kilian Kilger
88dffba62e
Improve coding style of auto usages
2020-06-03 20:48:19 +02:00
Larry Li
150ecabfff
Add docs for Dart target
2020-05-31 00:35:07 +10:00
Larry Li
2cb1618009
fix: run dart analyzer against google pedantic
2020-05-29 11:08:55 +10:00
Larry Li
62d56d83ae
Merge branch 'master' of github.com:antlr/antlr4 into dart-clean
2020-05-25 21:01:46 +10:00
Erik Gomersbach
52f7b0063c
Added missing swift version of the ParseTreeProperty class
2020-05-10 22:17:30 +02:00
Tristan Swadell
69ba58ecbe
Thread-safe ANTLR Go codegen
2020-05-01 01:57:54 -07:00
Terence Parr
8c50731894
Merge pull request #2772 from carocad/cyclic-import
...
Javascript: fix some cyclic dependencies
2020-04-17 09:03:54 -07:00
Denis Kyashif
1cb069d10f
refactored AntlrInputStream.cs by removing a redundand if-statement
...
signed contributors.txt
2020-04-08 18:24:58 +03:00
Camilo Roca
26715ec6df
fix: cyclic dependency between RuleContext.js, Trees.js and ParserRuleContext.js
...
check for RuleNode instead of RuleContext since that it the only implementation (RuleNode -> RuleContext -> ParserRuleContext)
2020-03-26 21:48:20 +01:00
Terence Parr
a4c66dc863
Merge pull request #2787 from carocad/root-es6
...
Javascript: migrate prototypical root modules to ES6
2020-03-26 10:33:27 -07:00
Camilo Roca
57b65a1c92
fix: assignment to constant var
2020-03-20 13:36:56 +01:00
Song Yang
0b980e93b3
Change to c++ block comments
2020-03-18 15:10:45 -04:00
Song Yang
575271020f
Copy documentation to all non-Java languages
2020-03-17 16:03:29 -04:00
Song Yang
d832f90a70
Correct doc on exitRule
2020-03-16 00:16:03 -04:00
Song Yang
aa9a51a334
Add documentation to ParseTreeWalker
2020-03-15 23:45:40 -04:00
Camilo Roca
dadd69ef97
refactored Utils.js to use es6 classes
...
use const/let for better scoping
use jsdoc
2020-03-16 00:24:56 +01:00
Camilo Roca
5b607b34ba
refactored Token.js to use es6 classes
...
use const/let for better scoping
use jsdoc
2020-03-16 00:16:11 +01:00
Camilo Roca
5baa2326ad
refactored PredictionContext.js to use es6 classes
...
use const/let for better scoping
use jsdoc
2020-03-16 00:08:55 +01:00
Camilo Roca
ee9474b194
refactored RuleContext.js to use es6 classes
...
refactored ParserRuleContext.js to use es6 classes
fix: dont wrap export in object
use const/let for better scoping
use jsdoc
2020-03-15 23:55:05 +01:00
Camilo Roca
4de9e80109
refactored Parser.js to use es6 classes
...
fix: dont wrap export in object
use const/let for better scoping
use jsdoc
2020-03-15 23:38:44 +01:00
Camilo Roca
94ee7cfbf9
refactored LL1Analyzer.js to use es6 classes
...
fix: dont wrap export in object
use const/let for better scoping
use jsdoc
2020-03-15 23:21:44 +01:00
Camilo Roca
ba6b0807c9
todo added due to code warning
2020-03-15 23:14:37 +01:00
Camilo Roca
fd8548acab
fix: dont return this on constructor
2020-03-15 23:14:11 +01:00
Camilo Roca
24ae4274a0
refactored Recognizer.js to use es6 classes
...
refactored Lexer.js to use es6 classes
fix: dont wrap class in object for exporting
use const/let for better scoping
use jsdoc
2020-03-15 22:46:08 +01:00
Camilo Roca
a3c380d7d4
refactored IntervalSet.js to use es6 classes
...
use const/let for better scoping
2020-03-15 16:29:28 +01:00
Camilo Roca
23351cadc4
refactored InputStream.js to use es6 classes
...
refactored FileStream.js to use es6 classes
fix: dont wrap class in an object for export
use const for better scoping
use jsdoc
2020-03-15 16:25:30 +01:00
Camilo Roca
181c44fb11
refactored CommonTokenStream.js to use es6 classes
...
fix: dont wrap class in an object for export
fix: annotate adjustSeekIndex with Number type to avoid warning
use const for better scoping
use jsdoc
2020-03-15 16:10:50 +01:00
Camilo Roca
5f6b7de72d
fix: remove unnecessary return statements
2020-03-15 16:04:28 +01:00
Camilo Roca
b2473f7564
refactored CommonTokenFactory.js to use es6 classes
...
fix: dont wrap class in an object for export
use const for better scoping
use jsdoc
2020-03-15 16:03:41 +01:00
Camilo Roca
2e139f8d08
fix: dont wrap class in an object for export
...
use jsdoc
2020-03-15 15:59:09 +01:00
Camilo Roca
4752ecf521
refactored BufferedTokenStream.js to use es6 classes
...
fix: dont wrap class in an object for export
use const/let for better scoping
use jsdoc
2020-03-15 15:55:15 +01:00
Camilo Roca
2988f32c3c
fix: invalid object destructuring
2020-03-07 14:03:59 +01:00
Camilo Roca
51bcf5ffad
refactored import statements to use object destructuring and avoid repetition
2020-03-07 13:59:30 +01:00
Camilo Roca
ae8602a463
refactored Transition.js to use es6 classes
...
use const for better scoping
2020-03-07 13:45:54 +01:00
Camilo Roca
6a38ae5e3d
fix: no need for return on constructor
2020-03-07 13:38:30 +01:00
Camilo Roca
6ebe0d1317
refactored SemanticContext.js.js to use es6 classes
...
use const/let for better scoping
use object destructuring
use jsdoc
2020-03-07 13:35:30 +01:00
Camilo Roca
21538ebb59
refactored PredictionMode.js to use es6 classes
...
use const/let for better scoping
use object destructuring
fix: dont wrap class in object for export
2020-03-07 13:16:42 +01:00
Camilo Roca
7f271a1fc0
refactored ParserATNSimulator.js to use es6 classes
...
use const/let for better scoping
use object destructuring
fix: dont wrap class in object for export
2020-03-06 22:38:11 +01:00
Camilo Roca
d1dce9e700
refactored LexerATNSimulator.js to use es6 classes
...
use const/let for better scoping
fix: dont wrap class in object for export
2020-03-06 22:12:49 +01:00
Camilo Roca
9aeac6d4f4
refactored LexerActionExecutor.js to use es6 classes
...
use const for better scoping
fix: dont wrap class in object for export
2020-03-06 20:05:05 +01:00
Camilo Roca
01c5dca26a
refactored ATNSimulator.js to use es6 classes
...
use const for better scoping
fix: dont wrap class in object for export
2020-03-06 19:54:10 +01:00
Camilo Roca
43f896d6dc
use const/let for better variable scoping
2020-03-06 19:49:10 +01:00
Camilo Roca
4f8527e9ee
refactored ATNDeserializer.js to use es6 classes
...
fix: dont wrap the class in an object for export
2020-03-06 19:33:38 +01:00
Camilo Roca
d61e4d5049
refactored LexerAction.js to use es 6 classes
...
use jsdoc
use module.exports
2020-03-06 19:29:23 +01:00
Camilo Roca
44331c067e
refactored ATNType.js to be a simple object with static definitions
2020-03-06 19:14:24 +01:00
Camilo Roca
78afe57b7d
refactored ATNState.js to es 6 classes
...
use module.exports
use jsdoc
2020-03-06 19:12:09 +01:00
Camilo Roca
430b7c1917
refactored ATNDeserializationOptions.js to es 6 classes
...
fix: dont wrap class in an object
refactored imports accordingly
2020-03-06 18:59:59 +01:00
Camilo Roca
7324e094b1
refactored ATNConfigSet.js to use es 6 classes
...
use module.exports
use const/let
use jsdoc
2020-03-06 18:46:34 +01:00
Camilo Roca
2246528ca6
use module.exports
...
fix: put the documentation on the method, not on the import
fix: move Token import to the top
2020-03-06 18:36:33 +01:00
Camilo Roca
1b440d364a
use jsdoc and const/let
2020-03-06 18:33:37 +01:00
Camilo Roca
8f1b2e5eb9
use jsdoc and const/let
2020-03-06 18:24:57 +01:00
Camilo Roca
15720d1e33
use jsdoc and const/let
2020-03-06 18:18:49 +01:00
Camilo Roca
e7b935e7e2
refactored ATN to be an es6 class
2020-03-06 18:10:34 +01:00
Terence Parr
225249fdae
Merge pull request #2761 from carocad/browser-support
...
Javascript: browser support increased with babel transformation
2020-02-25 09:35:36 -08:00
Camilo Roca
10bbcb9033
browser support increased with babel transformation
2020-02-23 19:09:26 +01:00
Camilo Roca
d95b3270c4
workaround current cyclic dependency on nodejs
2020-02-23 14:12:08 +01:00
Camilo Roca
5885aa4705
fix: RuleContext no longer needs object destructuring import
2020-02-23 13:09:36 +01:00
Camilo Roca
46ceb654f7
removed commented out call
2020-02-23 13:09:36 +01:00
Camilo Roca
1c946ce605
refactored antlr/tree exports to use es6 destructuring
2020-02-23 13:09:36 +01:00
Camilo Roca
6764f53024
export RuleContext directly instead of wrapping it on an anonymous object
2020-02-23 13:09:36 +01:00
Camilo Roca
20cbfc5a0a
export DFA and DiagnosticErrorListener directly instead of wrapping it on an anonymous object
2020-02-23 13:09:36 +01:00
Camilo Roca
96c2eb6a51
export Trees directly instead of wrapping it on an anonymous object
2020-02-23 13:09:36 +01:00
Camilo Roca
577a9b82bc
fix: no need to call RuleNode class as prototype chain is enough
2020-02-23 13:08:39 +01:00
Camilo Roca
5e42c49ced
fix: export ATN directly to avoid getting an empty object on (circular) imports
2020-02-23 13:08:39 +01:00
Camilo Roca
1eafbf9286
fix: dont destructure so early to avoid circular dependency problems
2020-02-23 13:08:39 +01:00
Camilo Roca
66c652142c
refactored Trees to be a plain object to avoid "this" invocation
2020-02-23 13:08:39 +01:00
Camilo Roca
af45a02d1e
refactored comments to be jsdoc compatible
2020-02-23 13:08:39 +01:00
Camilo Roca
edf24eab3f
fix: incorrect import of invalid_alt_number
...
removed unused RuleNode import
2020-02-23 13:08:39 +01:00
Camilo Roca
79d2c1c163
use const/let for better scoping
...
use object destructuring on import
2020-02-23 13:08:39 +01:00
Camilo Roca
4a7820aa4b
refactored comments to be jsdoc compatible
2020-02-23 13:08:39 +01:00
Camilo Roca
6cc2f082fb
use destructuring for imports
...
use module.exports with object literal for exports
2020-02-23 13:08:39 +01:00
Camilo Roca
e790ddb4ba
use const/let for better scoping
...
removed unused Utils import
2020-02-23 13:08:39 +01:00
Camilo Roca
32baf10944
refactored Tree implementations to be es6 classes
2020-02-23 13:08:39 +01:00
Camilo Roca
9d997438f9
refactored interfaces to be es6 classes
2020-02-23 13:08:39 +01:00
Eric Vergnaud
a1b89b7d93
add optional encoding
2020-02-16 13:05:56 +08:00
Terence Parr
db1c09c6d2
Merge pull request #2744 from julibert/master
...
Fix CMake packaging
2020-02-14 08:25:51 -08:00
Camilo Roca
6dd86eb960
fix: cannot reasign a const var
2020-02-10 22:23:54 +01:00
Camilo Roca
d6975d60b1
fix: second export was overwriting the first one
2020-02-10 22:22:12 +01:00
Camilo Roca
2d8e1b60d1
refactored PredPrediction and DFAState to JsDoc
2020-02-10 22:13:19 +01:00
Camilo Roca
2a294b8a60
fix DFA serializer doc position
2020-02-10 22:07:58 +01:00
Camilo Roca
68730a8288
refactored DFA docs to JsDoc compatible
2020-02-10 22:07:21 +01:00
Camilo Roca
8c1730f687
use const/let and module.exports
2020-02-10 22:01:04 +01:00
Camilo Roca
116dbca78a
refactor PredPrediction and DFAState to es6 classes
2020-02-10 21:58:44 +01:00
Camilo Roca
82d51aee99
use const/let
...
use module exports instead of exports
2020-02-10 21:56:40 +01:00
Camilo Roca
772286cf00
refactor DFASerializer and LexerDFASerializer to ES6 classes
2020-02-10 21:54:23 +01:00
Camilo Roca
e5910c3019
use object destructuring
2020-02-10 21:52:26 +01:00
Camilo Roca
a8e8402b77
refactor DFA function prototype into es6 classes
2020-02-10 21:51:11 +01:00
julibert
b37d2e3815
Fix CMake packaging.
2020-02-09 20:01:24 +01:00
Camilo Roca
4b4aa68be3
fix: npm build is not a valid command
2020-02-08 15:14:10 +01:00
Camilo Roca
d8435e13c3
removed conditional nodejs import in favour of webpack bundle
...
use const/let instead of var
use object destructuring
fix: missing new statement for DOM file reader
2020-02-07 14:08:19 +01:00
Camilo Roca
c2180d2d5c
adapted antlr4 js to use webpack for browser publishing
...
lib/require.js custom require removed in favour of webpack bundle
documentation updated
package-lock.json added
2020-02-07 13:57:20 +01:00
Camilo Roca
aeebc0bb0b
fix: use module.exports instead of exports to follow node best practices
...
cosmetic changes
2020-02-02 23:52:47 +01:00
Camilo Roca
a7017d1a49
missing const
2020-02-02 23:43:12 +01:00
Camilo Roca
19458051c0
refactored error directoryto use classes, const and let
2020-02-02 23:37:21 +01:00
Steve Vinoski
38200b6e31
Fix #2727 : improve setTokenFactory in Cpp target
...
Change the setTokenFactory template functions and the getTokenFactory
functions to use a plain pointer rather than a Ref. This makes the
caller of setTokenFactory responsible for managing the lifetime and
memory of the token factory instance they pass in. Change
CommonTokenFactory::DEFAULT to be a unique_ptr, and correct all places
using it as a Ref.
2020-01-24 08:11:41 -05:00
Larry Li
7cb0d427d4
dart test performance with aot compilation
2020-01-19 21:20:44 +11:00
Larry Li
46bd9e5569
add dart target
2020-01-19 18:22:06 +11:00