Commit Graph

2374 Commits

Author SHA1 Message Date
Mike Lischke e810ca6084 Fixed regression introduced by wrong optimization. Fixes #1708. 2017-03-07 20:15:10 +01:00
chund 313ab9dcce Merge branch 'master' into master 2017-03-06 08:59:50 +01:00
Hanzhou Shi 0c71574c8e Specify output folder so generated files can be ignored correctly. 2017-03-05 20:56:29 -08:00
Hanzhou Shi e1898324df Run "swift test" in test. 2017-03-05 20:49:02 -08:00
Hanzhou Shi b66ffe86f9 Remove generated parser files and added testRig.
Current version of swift package manager doesn't support shell command
or any mechanism that we can leverage to generate parser files. Adding
a python script to kick off the unit tests.
2017-03-05 20:44:22 -08:00
Mike Lischke e002b177c6 Fixed crash with multi threaded parsers warming up at the same time.
The lock for the shared DFA state needs to protect a few more operations than just the addDFAState stuff and had to move up one call level. This in turn requires now 2 places where the lock must be aquired.
2017-03-04 14:20:09 +01:00
Dong Xie e49b0977f5 fix #1725; get dotnet target test run 2017-03-04 01:42:44 +00:00
Terence Parr 4a5e65c5e7 Merge pull request #1701 from Thomasb81/Fix_syntaxError_proto
[Cpp] Fix syntaxError prototype issue
2017-03-03 13:30:00 -08:00
thomasb8138 26e41343a6 Remove IRecognizer reference in xcode project (reverted from commit f6b09429b6) 2017-03-03 21:39:17 +01:00
D054757 f4e955b528 Improve error message in exceptions 2017-03-03 13:46:55 +01:00
thomasb8138 f6b09429b6 Remove IRecognizer reference in xcode project 2017-03-03 08:49:52 +01:00
thomasb8138 ce40463986 Remove IRecognizer reference from MSVCS project 2017-03-03 08:49:10 +01:00
parrt d9d21fe9b3 found 2 cases that called function on empty set. 2017-03-02 14:18:00 -08:00
parrt 6572b08095 Fixes #1703 properly this time. addendum to #1718 2017-03-02 14:13:27 -08:00
thomasb8138 b681d76b4a Remove IRecognize class + rename rename to Recognize 2017-03-02 23:09:30 +01:00
thomasb8138 ef6058ba6f Merge branch 'Fix_syntaxError_proto' 2017-03-02 23:01:51 +01:00
parrt 37fdf66c13 Fixes #1703. Updated comments to ensure people test isNil() or size() before requesting min, max, any single element. 2017-03-02 10:49:25 -08:00
Terence Parr 6245938be9 Merge pull request #1712 from mike-lischke/cpp-demo-fix
Using new Unicode syntax for C++ demo project.
2017-03-02 10:40:41 -08:00
parrt 3df19fbcc8 make format consistent with most of antlr project 2017-03-02 10:38:48 -08:00
parrt e353fa0484 update comment @since tag to 4.7.1 2017-03-01 14:53:43 -08:00
Terence Parr e04e7a40cc Merge pull request #1697 from hanjoes/master
Swift imple of #1665, #1674.
2017-03-01 14:50:50 -08:00
Terence Parr 7f479fa5dc Merge pull request #1700 from jvasileff/patch-1
Fix minor typo: possessive "its"
2017-03-01 14:45:46 -08:00
Terence Parr 0539fb4b0d Merge pull request #1699 from Thomasb81/fix_1698
Fix for #1698
2017-03-01 14:43:12 -08:00
Terence Parr 26249918f5 Merge pull request #1694 from mike-lischke/master
C++ implementation of issue #1665 and issue #1674
2017-03-01 14:41:15 -08:00
Mike Lischke e368fb30ea Using new Unicode syntax for C++ demo project. 2017-02-28 15:32:25 +01:00
Terence Parr 39ba47554a shift setParent up one level 2017-02-27 12:13:12 -08:00
thomasb8138 5c9f174f28 Fix typo 2017-02-26 20:31:32 +01:00
thomasb8138 c668c931fd Fix syntaxError prototype in order to use Recognizer instead of IRecognizer. 2017-02-26 20:11:08 +01:00
John Vasileff 10fdcaa432 Fix minor typo: possessive "its" 2017-02-26 00:22:31 -05:00
thomasb8138 2d390b7a71 TokenStreamRewriter::replace(const std::string &programName, size_t from, size_t to, const std::string& text) expect a valid reference on std::string object. Not a null pointer. 2017-02-25 19:11:34 +01:00
Hanzhou Shi 38c3aaae8f Implements #1674 "augment TerminalNode with setParent()" for Swift target. 2017-02-25 09:17:37 -08:00
Mike Lischke 382d8f1e92 Merge branch 'master_upstream' 2017-02-25 10:48:32 +01:00
Mike Lischke a55baba44c More versions updated. 2017-02-25 10:48:12 +01:00
Hanzhou Shi 392c637565 Implements #1665 for Swift target. Slightly different because #899 was not addressed in Swift target. 2017-02-24 23:14:24 -08:00
Mike Lischke a4e0948600 Updated version number. 2017-02-24 20:08:17 +01:00
Mike Lischke 126112fbbc C++ implementation of issue #1665 and issue #1674 2017-02-24 08:44:21 +01:00
parrt 6215f18ec3 rename 4.6.1 to 4.7 everywhere 2017-02-23 14:48:58 -08:00
Terence Parr 05dad185f3 Merge pull request #1690 from mike-lischke/master
Fixed a number of data type + signedness issues in the C++ target
2017-02-23 14:10:29 -08:00
Ben Hamilton fd4246cf3f Implement new extended Unicode escape \u{10ABCD}. Bump UUID. Add lots more tests. 2017-02-23 09:39:44 -08:00
Mike Lischke cd6bb1f2a0 Merge branch 'master_upstream' 2017-02-23 10:57:31 +01:00
Terence Parr ce09abb480 Merge pull request #1679 from Thomasb81/Issue_1666
Issue 1666
2017-02-22 13:14:37 -08:00
Terence Parr 1dc70310a3 Merge pull request #1685 from KvanTTT/master
Fix C# Pair.cs, Right arrow escaping in XML Comments
2017-02-22 13:09:57 -08:00
thomasb8138 cb177712f6 Use reference instead of pointer 2017-02-22 21:55:46 +01:00
Mike Lischke 0101770e5f Fixed a number of data type + signedness issues.
The UnbufferedCharStream had a few invalid casts which could lead to wrong numbers. This patch also fixes issue #1619.
2017-02-22 12:09:52 +01:00
Mike Lischke 14991143d4 Merge branch 'master_upstream' 2017-02-22 11:32:22 +01:00
Mike Lischke 4a940aeeda Fix for issue #1608 (runtime build failure with gcc 6.3.1)
Additionally, a warning has been removed.
2017-02-22 11:31:57 +01:00
Ivan Kochurkin f24b19ff8a Right arrow escaping in XML Comments. 2017-02-22 02:57:01 +03:00
Ivan Kochurkin 160f893922 Fix C# Pair.cs, #1634. 2017-02-22 02:47:11 +03:00
thomasb8138 78a20b72a3 Clean fix 2017-02-21 23:43:13 +01:00
parrt 912342b01f tweak to C++ runtime; nullptr not 0 2017-02-21 09:39:02 -08:00
Terence Parr 91df265278 Merge pull request #1672 from bhamiltoncx/code-point-transitions
New class CodePointTransitions to create SetTransitions for Unicode code points > U+FFFF
2017-02-20 14:37:36 -08:00
Thomasb81 1341d35f37 Merge branch 'master' into Issue_1666 2017-02-20 22:49:16 +01:00
thomasb8138 df0cd343c1 Fix https://github.com/antlr/antlr4/issues/1666 2017-02-20 22:27:15 +01:00
Mike Lischke 528f675dd6 Some compilers need the functional include. 2017-02-20 12:42:53 +01:00
parrt 44942bc5fc Merge branch 'master' into lecode-official-master 2017-02-19 14:08:26 -08:00
Ben Hamilton 760d3eff82 Use generator expressions instead of list comprehensions 2017-02-18 11:55:49 -08:00
Ben Hamilton 7b9b0835b8 Python 2.7 InputStream: Properly support Unicode code points 2017-02-18 11:54:11 -08:00
parrt 81681abfb3 augment TerminalNode with setParent(). Technically, this is not backward compatible as it changes the interface but no one was able to create custom TerminalNodes anyway so I'm adding as it improves internal code quality. addChild now sets the parent rather than create. MUCH better. 2017-02-18 11:21:17 -08:00
Ben Hamilton 291638ca2d CodePointTransitions 2017-02-17 13:30:22 -08:00
Terence Parr 2b3508d57e Merge pull request #1662 from bhamiltoncx/no-more-char-casts
Get rid of all (char) casts
2017-02-17 13:21:16 -08:00
Terence Parr f5bbcaab51 Merge pull request #1664 from bhamiltoncx/csharp-error-message-unicode
Support Unicode values > U+FFFF in C# runtime error messages
2017-02-17 13:19:02 -08:00
parrt f8e7a2cf08 merge in dotnet stuff 2017-02-17 11:02:52 -08:00
Terence Parr 628aa8ff02 Merge pull request #1665 from parrt/factor-create-leaves
factor out the creation of error nodes and terminal nodes in the parser
2017-02-16 10:43:30 -08:00
parrt e200f2a56b factor out the creation of error nodes and terminal nodes in the parser so that they act like a built-in factory during parse tree construction. 2017-02-16 10:36:59 -08:00
Ben Hamilton f88e0cbfe0 Unicode SMP support for C# runtime error messages 2017-02-16 10:25:49 -08:00
Terence Parr 1df5cd6206 Merge pull request #1661 from bhamiltoncx/lexer-max-unicode
Change MAX_CHAR_VALUE to 0x10FFFF
2017-02-16 10:16:18 -08:00
Ben Hamilton 88ecb3d9fa Get rid of all (char) casts 2017-02-16 09:55:08 -08:00
Ben Hamilton b190b6eca6 MAX_CHAR_VALUE to 0x10FFFF 2017-02-16 09:46:09 -08:00
Ben Hamilton c35bbabc16 PR #1658: Also write stderr to file 2017-02-16 09:44:40 -08:00
Ben Hamilton 3188d6a883 Allow setting source name when creating CodePointCharStream from string 2017-02-14 15:49:00 -08:00
David Neumann e967463e91 Merge branch 'master' into master 2017-02-14 11:20:02 +01:00
Terence Parr fb805a589b Merge pull request #1643 from bhamiltoncx/fix-csharp-code-point-input-stream
Easy: Fix C# CodePointCharStream to actually work with code points > U+FFFF
2017-02-13 15:18:27 -08:00
Terence Parr 287f17b796 Merge pull request #1652 from bhamiltoncx/csharp-lexer-parser-output-file
C# support for lexer and parser output to a file
2017-02-13 15:10:54 -08:00
Terence Parr 9b7e2a81ce Merge pull request #1651 from bhamiltoncx/python-lexer-parser-output-file
Python 2 and Python 3 support for lexer and parser output to a file
2017-02-13 15:10:19 -08:00
Terence Parr 565f6299c0 Merge pull request #1650 from bhamiltoncx/js-fromcodepoint-polyfill
Fix JavaScript InputStream.getText() when input contains Unicode values > U+FFFF
2017-02-13 15:08:59 -08:00
Terence Parr 3cbc2af0cc Merge pull request #1655 from lionelplessis/fix-#1298-for-csharp
Fix #1298 for CSharp
2017-02-13 10:29:47 -08:00
Terence Parr ae5250685d Merge pull request #1637 from bhamiltoncx/char-streams
Make BaseJavaTest and TestRig work with Unicode values > U+FFFF
2017-02-10 14:11:34 -08:00
Ben Hamilton 6611c1ae27 C# runtime and test harness support for writing test output to file 2017-02-10 13:37:44 -08:00
Ben Hamilton 2c447a2b75 Python 2 and Python 3 support for lexer and parser output to a file instead of stdout 2017-02-10 13:11:24 -08:00
Ben Hamilton 51edf3cece Fix InputStream.getText() when input contains Unicode values > U+FFFF 2017-02-10 11:41:00 -08:00
Ben Hamilton 32a3a95da1 Import fromcodepoint.js 2017-02-10 11:40:55 -08:00
lionelplessis 895681044e Fix #1298 for CSharp 2017-02-10 17:55:10 +01:00
Ben Hamilton 2d24fa7457 Fix C# CodePointInputStream to actually work with SMP code points 2017-02-02 15:55:03 -08:00
Terence Parr 182f3c4647 Merge pull request #1628 from bhamiltoncx/js-string-codepointat-polyfill
JavaScript runtime: Optionally support decoding UTF-16 sequences to Unicode code points
2017-01-31 10:26:29 -08:00
Ivan Kochurkin e5867ee58f Java: LexerInterpreter ctor without channelNames argument marked as Deprecated. 2017-01-31 16:32:32 +03:00
Ivan Kochurkin b1a9daa6b0 C# runtime: LexerInterpreter ctor without channelNames argument marked as Obsolete.
LexerInterpreter.cs reformatted.
2017-01-31 16:29:49 +03:00
Ben Hamilton 499e44b03a Pass through source name 2017-01-30 14:16:33 -08:00
Ben Hamilton 38ba75e96e Inline test instead of using anonymous function 2017-01-30 13:52:14 -08:00
Ivan Kochurkin 7b8ba3550b channelNames support in LexerInterpreter (C#, C++, Java, Swift). 2017-01-31 00:34:10 +03:00
Ivan Kochurkin 8359a998b6 Updated generated files. 2017-01-31 00:34:10 +03:00
Ivan Kochurkin c3d96eb5d7 Added channelNames to all runtimes. 2017-01-31 00:32:21 +03:00
Terence Parr fb22b1dbcb Merge pull request #1639 from ericvergnaud/missing-js-export
missing js export
2017-01-30 13:26:18 -08:00
Terence Parr e8f45783cd Merge pull request #1630 from bhamiltoncx/python-runtime-test-utf-8
Use UTF-8 for Python runtime tests, allow specifying error handling
2017-01-30 11:32:55 -08:00
Terence Parr 444d35ecde Merge pull request #1632 from bhamiltoncx/csharp-runtime-unicode
New C# runtime class CodePointCharStream
2017-01-30 11:27:16 -08:00
Eric Vergnaud d5b88cda71 missing js export 2017-01-31 02:53:58 +08:00
Ben Hamilton 0f52b7c0d9 CharStreams 2017-01-30 10:09:56 -08:00
Ben Hamilton e0104885e8 Use polyfill for JS unicode code point reading 2017-01-30 09:49:20 -08:00
Ben Hamilton ce6ce0f45d Polyfill for String.codePointAt for ECMAScript 5.1 browsers 2017-01-30 09:49:03 -08:00
Ben Hamilton d9d4d8c6c4 Restore Python3 FileStream to ascii/strict 2017-01-30 08:49:32 -08:00
Ben Hamilton 2defcc3e1f Change default encoding back to 'ascii'. Specify encoding=utf-8 and errors=replace in Python2/Python3 test templates. 2017-01-30 08:45:48 -08:00
Ben Hamilton 99ed4b6de6 Python StdinStream/FileStream -> UTF-8 2017-01-30 07:32:30 -08:00
Terence Parr e7d6331632 Merge pull request #1631 from bhamiltoncx/remove-unused-csharp-method
Remove unused C# runtime method Utils.ToCharArray
2017-01-29 13:07:57 -08:00
parrt 2fbd297063 open visibility slightly so we can override to fix bugs etc... 2017-01-29 12:58:25 -08:00
Terence Parr bd8a367398 Merge pull request #1627 from bhamiltoncx/utf8-code-point-decoder
New class UTF8CodePointDecoder
2017-01-29 12:54:58 -08:00
parrt 3c924384eb add comment 2017-01-29 12:51:31 -08:00
Terence Parr 508d2f988f Merge pull request #1626 from bhamiltoncx/new-code-point-char-stream
New class CodePointCharStream (alternative to ANTLRInputStream)
2017-01-29 12:50:44 -08:00
parrt 03470b0083 add comment 2017-01-29 10:41:01 -08:00
Terence Parr 37adfd4e30 Merge pull request #1625 from bhamiltoncx/integer-list-unicode
New method IntegerList.toCharArray()
2017-01-29 10:38:29 -08:00
Terence Parr bf4fa40ff9 Merge pull request #1606 from hanjoes/spm
Tweak Repo to use SwiftPackageManager.
2017-01-29 10:31:53 -08:00
Dong Xie 95db50d540 [dotnet] target: use project reference in json instead of nupkg; fix for tests 2017-01-27 15:16:28 +00:00
Ben Hamilton 52e5bcd783 Unicode code point support for C# runtime 2017-01-26 11:41:42 -08:00
Ben Hamilton 5391d2a830 Remove unused C# runtime method Utils.ToCharArray 2017-01-26 10:54:42 -08:00
Ben Hamilton 558aa7b011 UTF8CodePointDecoder 2017-01-24 15:23:03 -08:00
Ben Hamilton 212a948656 CodePointCharStream 2017-01-24 13:12:28 -08:00
Ben Hamilton 3b25e076fc Restore null check 2017-01-24 11:39:05 -08:00
Ben Hamilton bbf8476c8e New method IntegerList.toCharArray() 2017-01-24 11:30:50 -08:00
Terence Parr 97aaddc006 Merge branch 'master' into fix-missing-variable-declarations 2017-01-24 09:54:05 -08:00
Dong Xie 4c4fdc0f83 Merge remote-tracking branch 'upstream/master' into dotnetcore 2017-01-24 16:23:31 +00:00
Dong Xie 8a08a6ed56 [csharp] dotnet test files added, test passing 2017-01-24 16:21:13 +00:00
bekket mcclane 4f3785a29e Merge branch 'master' into master 2017-01-23 17:52:59 +08:00
Terence Parr 449a32d4ae Merge pull request #1603 from marcelo-rocha/fix-parse-tree-property
Fix parse tree property
2017-01-22 12:43:24 -08:00
Terence Parr 7f8890bc3c Merge pull request #1596 from willfaught/format
Format Go runtime files
2017-01-22 12:43:00 -08:00
Terence Parr e1c51d367e Merge pull request #1607 from mike-lischke/master
Some deployment changes because of license file changes.
2017-01-22 12:42:33 -08:00
Dong Xie 9e590c08b7 [csharp] able to compile with dotnet cli under Linux
1, moved xproj file into Antlr4.Runtime sub-folder to keep convention
2, removed two cs files that no longer needed
3, fill in missing using directives
2017-01-20 14:16:09 +00:00
Dong Xie 5d03880079 Merge remote-tracking branch 'upstream/master' into dotnetcore 2017-01-19 16:13:03 +00:00
Eric Vergnaud f02d8c1a4b fix #1584 2017-01-19 21:44:56 +08:00
mshockwave d733016fd4 fix wrong antlr4cpp runtime include path 2017-01-18 15:09:10 +08:00
Mike Lischke 82d0e8f86a Merge branch 'master_upstream' 2017-01-16 13:15:54 +01:00
Mike Lischke 8b43f3f7e0 Some deployment changes because of license file changes. 2017-01-16 13:14:40 +01:00
Hanzhou Shi 7c24680e3c Reset fetchedEOF in BufferedTokenStream after setTokenSource is called. Fixes #1584. 2017-01-16 00:39:01 -08:00
Hanzhou Shi 893ed8449b Tweak xcodeproj 2017-01-16 00:23:26 -08:00
Hanzhou Shi 8fd99fe8d9 Adding Package.swift for SPM integration 2017-01-16 00:23:26 -08:00
Hanzhou Shi 139225f76c convert documentation to Swift style 2017-01-16 00:23:26 -08:00
Hanzhou Shi ee82046201 Reorg Swift runtime file structure. 2017-01-16 00:23:25 -08:00
Marcelo Rocha d53e4f248d fix incorrect std::map API 2017-01-13 14:42:34 -03:00
robert a053d908fb fix missing variable declarations 2017-01-11 15:39:04 +00:00
Will Faught 2dd7eb1164 Format 2017-01-11 01:48:55 -08:00
Terence Parr 58b7b71731 Merge pull request #1583 from willfaught/copyright
Use single-line comments for copyright
2017-01-08 07:02:05 -08:00
Terence Parr 01ff377d25 Merge pull request #1587 from sharwell/document-shift
Document the value shifting used in the serialized ATN
2017-01-07 09:49:00 -08:00
Sam Harwell 633a2df710 Mark BufferedTokenStream.reset as deprecated to avoid confusion
See #895
2017-01-07 10:45:08 -06:00
Sam Harwell ff2b2b8ba6 Document the value shifting used in the serialized ATN
Fixes #1270
2017-01-07 09:38:45 -06:00
Sam Harwell bcde6f923a Reset BufferedTokenStream.fetchedEOF when calling setTokenSource
Fixes #1584
2017-01-07 09:31:11 -06:00
Will Faught e093d410eb Use single-line comments for copyright 2017-01-06 23:49:34 -08:00
Terence Parr 040e40ec58 Merge pull request #1565 from ericvergnaud/fix-javascript-typo
fix typo in javascript visitor
2017-01-03 17:05:50 -08:00
Eric Vergnaud d5dcfc42c4 fix an issue where loading antlr from an IE web worker would fail 2017-01-04 01:56:02 +08:00
Eric Vergnaud 5bc40faebb fix typo 2016-12-29 23:24:09 +08:00
parrt 2629433830 bump version to 4.6.1 in all files. 2016-12-28 12:03:43 -08:00
Terence Parr b57843d983 Merge pull request #1546 from sharwell/fix-1545
Fix multiple problems with optional block bypass at end of rule
2016-12-27 21:47:12 -08:00
Sam Harwell 24b20e236f Remove redundant isExpectedToken check
We know by the time this check was reached that neither EPSILON nor the LL(1)
symbol are in the lookahead set from the current state. Since EPSILON is not
included, the state cannot see to the end of the rule and thus nextTokens
contains the complete set of valid LL(1) symbols from the current state. It is
therefore impossible for the LL(1) symbol to be "expected" when considering
lookahead with full context.
2016-12-27 17:21:25 -06:00
Terence Parr 644478a015 Merge pull request #1558 from mike-lischke/master
No static libs anymore for Windows C++ runtime.
2016-12-27 13:00:01 -08:00