Commit Graph

6005 Commits

Author SHA1 Message Date
robert a053d908fb fix missing variable declarations 2017-01-11 15:39:04 +00:00
robert 2fe1d8333f sign contributors.txt 2017-01-11 15:39:04 +00:00
Johannes Kohnen 5e9ecae281 Change StringType to lower case for Go target.
*  See antlr/antlr4#1594
2017-01-11 22:36:17 +11:00
Gary Miller 7cbef5617c removed lower case formatting on types. Case has meaning in Go, needs preserving. 2017-01-11 22:33:35 +11:00
Gary Miller 810000c23e removed superClass import 2017-01-11 22:21:29 +11: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
Ivan Kochurkin d71c2157ce Fixed @sharwell note about comment. 2017-01-08 15:08:48 +03:00
Terence Parr 9446f5f4b1 Merge pull request #1589 from sharwell/missing-header
Add missing copyright header
2017-01-07 09:54:02 -08:00
Terence Parr b8e0d543e3 Merge pull request #1588 from sharwell/test-sources
Support using the Maven plugin to generate test sources
2017-01-07 09:53:41 -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
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