Terence Parr
7f352618a0
Merge pull request #1586 from sharwell/reset-fetchedeof
...
Reset BufferedTokenStream.fetchedEOF when calling setTokenSource
2017-01-07 09:47:18 -08:00
Sam Harwell
73cfd0592f
Add missing copyright header
2017-01-07 11:20:10 -06:00
Sam Harwell
5d4efafe8e
Support using the Maven plugin to generate test sources
...
Fixes #1579
2017-01-07 10:58:43 -06:00
Sam Harwell
633a2df710
Mark BufferedTokenStream.reset as deprecated to avoid confusion
...
See #895
2017-01-07 10:45:08 -06:00
Ivan Kochurkin
c929469c5f
Restored old testLabelsForTokensWithMixedTypesLRWithLabels & testLabelsForTokensWithMixedTypesLRWithoutLabels tests.
2017-01-07 18:47:08 +03:00
Sam Harwell
ff2b2b8ba6
Document the value shifting used in the serialized ATN
...
Fixes #1270
2017-01-07 09:38:45 -06:00
Ivan Kochurkin
4a5717162e
Fixed indents for else statements.
...
Fixed correct token in checkForTypeMismatch.
2017-01-07 18:37:17 +03:00
Sam Harwell
bcde6f923a
Reset BufferedTokenStream.fetchedEOF when calling setTokenSource
...
Fixes #1584
2017-01-07 09:31:11 -06:00
Ivan Kochurkin
a558334a01
Code cleared, added comments.
2017-01-07 18:26:22 +03:00
Ivan Kochurkin
a46db4b0b7
Updated testLabelsForTokensWithMixedTypes.
...
Removed excess testLabelsForTokensWithMixedTypesLRWithLabels and testLabelsForTokensWithMixedTypesLRWithoutLabels.
2017-01-07 18:17:40 +03:00
Ivan Kochurkin
385e96784d
Initial fix for labels in left recursive rules: https://github.com/antlr/antlr4/pull/1570 & https://github.com/antlr/antlr4/issues/1543
2017-01-07 18:16:22 +03:00
Will Faught
e093d410eb
Use single-line comments for copyright
2017-01-06 23:49:34 -08:00
Terence Parr
33ac0c3611
Merge pull request #1582 from sharwell/optional-analysis
...
Fix multiple bugs with the new optional element analysis
2017-01-06 07:04:04 -08:00
Terence Parr
8adfb56d53
Merge pull request #1581 from sharwell/rm-shared-visitor-tests
...
Remove the "shared" visitor tests
2017-01-06 07:03:20 -08:00
Sam Harwell
587ea3646c
Don't use list labels for elements that appear twice in a block set
2017-01-06 00:21:42 -06:00
Sam Harwell
204c281772
Fix optional element analysis
...
* Properly handle elements that are optional in some alts but not others
* Properly handle block sets (a group of terminals producing a SetTransition)
* Properly handle OPTIONAL subrule
2017-01-06 00:19:43 -06:00
Sam Harwell
d0cd250634
Remove the shared visitor tests
...
These tests were modeled after the listener tests, but were not implemented
against the standard visitor API semantics. The tests only execute in the
Node.js target, and there is no straightforward way to implement these tests
across multiple targets. New tests which cover both the traversal behavior
and the runtime semantics are now available and should be implemented by
each target.
2017-01-05 21:48:44 -06:00
Terence Parr
c7a9fe364a
Merge pull request #1580 from sharwell/portable-hash
...
Use MurmurHash in TestPerformance so results are comparable across targets
2017-01-05 14:52:23 -08:00
Sam Harwell
8d7a9e19e2
Use MurmurHash in TestPerformance so results are comparable across targets
2017-01-05 13:52:10 -06:00
Terence Parr
722212acfd
Merge pull request #1578 from sharwell/java-visitor-tests
...
Add visitor tests for Java runtime API
2017-01-05 10:58:09 -08:00
Sam Harwell
8becb01b06
Add remaining visitor tests for the Java runtime API
2017-01-05 12:54:26 -06:00
Sam Harwell
4cd6156e6b
Add first visitor test for Java runtime API
2017-01-05 12:40:29 -06:00
Terence Parr
a17b299cd3
Merge pull request #1576 from sharwell/optional-getters
...
Implement support for optional getters
2017-01-04 09:50:36 -08:00
Sam Harwell
9009a1b989
Simplify logic leaving a subrule in ElementFrequenciesVisitor
2017-01-04 11:46:47 -06:00
Sam Harwell
eb53e70e39
Implement support for optional getters
...
This analysis is required for proper code generation in the TypeScript target
when strict null checks are enabled. It also applies to targets intending to
differentiate optional values from required values.
2017-01-04 09:43:20 -06: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
Terence Parr
0dfcc1822f
Merge pull request #1572 from ericvergnaud/fix-require-issue-in-IE-web-worker
...
fix an issue where loading antlr from an IE web worker would fail
2017-01-03 17:05:23 -08:00
Terence Parr
81f52adf82
Merge pull request #1570 from sharwell/fix-1543
...
Disable label checks for left recursive rules
2017-01-03 17:04:26 -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
Sam Harwell
6b007b445c
Disable label checks for left recursive rules
...
See #1543
2017-01-02 14:14:06 -06:00
Eric Vergnaud
5bc40faebb
fix typo
2016-12-29 23:24:09 +08:00
Terence Parr
aa909ddcb1
Merge pull request #1563 from parrt/bump-to-4.6.1
...
bump version to 4.6.1 in all files.
2016-12-28 14:09:33 -08:00
Terence Parr
c2a0ed7272
Merge pull request #1562 from parrt/fix-1556
...
Fixes #1556 .
2016-12-28 12:29:33 -08:00
parrt
2629433830
bump version to 4.6.1 in all files.
2016-12-28 12:03:43 -08:00
Terence Parr
75784e0b8f
update file list needed version bump
2016-12-28 12:02:55 -08:00
Terence Parr
64fd96d045
Update releasing-antlr.md
2016-12-28 11:54:27 -08:00
parrt
36ee17449f
Fixes #1556 .
...
```
beast:/tmp $ a4.6 T.g4
org/antlr/v4/parse/GrammarTreeVisitor.g: node from line 2:7 no viable alternative at input '..'
org/antlr/v4/parse/GrammarTreeVisitor.g: node from line 2:7 no viable alternative at input '..'
org/antlr/v4/parse/GrammarTreeVisitor.g: node from line 2:7 no viable alternative at input '..'
org/antlr/v4/parse/GrammarTreeVisitor.g: node from line 2:7 no viable alternative at input '..'
org/antlr/v4/parse/GrammarTreeVisitor.g: node from line 2:7 no viable alternative at input '..'
context [/report INTERNAL_ERROR] 1:17 attribute arg isn't defined
error(20): internal error:
beast:/tmp $ a4.6.1 T.g4
error(181): T.g4:2:4: token ranges not allowed in parser: 'A'..'Z'
```
2016-12-28 11:47:48 -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
Terence Parr
f79a34aa3a
Merge pull request #1557 from mike-lischke/LR-loop-fix
...
Lr loop fix
2016-12-27 12:57:26 -08:00
Mike Lischke
189d390481
Merge branch 'master_upstream'
2016-12-27 13:12:21 +01:00
Mike Lischke
ad31b44009
Removed static libraries from deployment script (Windows).
...
Static libs are huge, so they put quite some burden on download management. They are easy to create from source, however.
2016-12-27 13:11:54 +01:00
Sam Harwell
1d066e0a6b
Fix test cases affected by recent changes
...
See #1545
2016-12-26 17:03:51 -06:00
Terence Parr
1c987e77ea
Merge pull request #1548 from adrpo/FixMsys2MinGWBuild
...
adapt code to compile with msys2 mingw compiler
2016-12-25 09:03:04 -08:00
Terence Parr
0774117889
Merge pull request #1551 from KvanTTT/master
...
fix 'CommonToken' object has no attribute 'stopIndex' in Python{2|3}
2016-12-24 10:29:31 -08:00
Ivan Kochurkin
03a75a5ce6
fix error "'CommonToken' object has no attribute 'stopIndex' in Python{2|3}" #1529 .
2016-12-24 18:22:48 +03:00
Adrian Pop
8ab5f02f7d
adapt code to compile with msys2 mingw compiler
...
- add required extra flags to the C++ compiler in CMakeLists.txt
- guard some code with _MSC_VER instead of WIN32
2016-12-24 01:38:28 +01:00
Sam Harwell
8b21cc3dfb
Fix DefaultErrorStrategy.sync handling of end of rule
...
This change updates the default sync() strategy to match the strategy used
for selecting an alternative when prediction leaves the decision rule prior
to reaching a syntax error.
Closes #1545
2016-12-23 16:28:46 -06:00
Sam Harwell
7a83cd4910
Fix code generation for LL1OptionalBlock bypass alternative
...
See #1545
2016-12-23 16:12:43 -06:00