Commit Graph

5905 Commits

Author SHA1 Message Date
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 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
Terence Parr 7f0c990645 Merge pull request #1616 from ericvergnaud/fix-#1584-other-targets
fix #1584 for C#, JavaScript and Python targets
2017-01-22 12:42:02 -08:00
Eric Vergnaud f02d8c1a4b fix #1584 2017-01-19 21:44:56 +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
Marcelo Rocha 23fd4a00f2 sign contributors.txt 2017-01-13 14:42:49 -03:00
Marcelo Rocha d53e4f248d fix incorrect std::map API 2017-01-13 14:42:34 -03: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 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
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 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