Commit Graph

126 Commits

Author SHA1 Message Date
Ivan Kochurkin 7dc17ace6e Distinct error codes, added unit-test. fixes #1865. 2017-05-14 13:23:53 +03:00
parrt f858cd5948 Fixes #1815 (for real this time!). Fix text set for erroneous escapes so tool doesn't fail later. Remove some duplicate error messages. Add test for #1815. 2017-04-06 14:34:37 -07:00
parrt 80aa7907a4 Fixes #1815. Add info on what the invalid escape is. Match \x for any x but give error. This prevents \x from appearing like a sequence of 2 char. Updated unit tests. 2017-04-06 10:26:03 -07:00
parrt 62baf4bd0a [maven-release-plugin] prepare for next development iteration 2017-03-30 14:11:59 -07:00
parrt d4d7e3d3bc [maven-release-plugin] prepare release 4.7 2017-03-30 14:11:49 -07:00
parrt b5648f405b tweak documentation about various targets 2017-03-30 10:44:28 -07:00
Ben Hamilton 8108b342ad Change UnbufferedCharStream to use 32-bit Unicode code points and 32-bit buffer 2017-03-29 13:14:18 -07:00
Terence Parr 1f6a329692 Merge pull request #1765 from bhamiltoncx/unicode-cleanup-and-doc
Tidy up CharStreams and add new doc/unicode.md
2017-03-16 17:03:06 -07:00
Ben Hamilton 4f2168600d Tidy up CharStreams API. Add new doc/unicode.md 2017-03-16 17:01:46 -06:00
Ben Hamilton c71b7d2f18 EmojiDefault and TextDefault 2017-03-14 13:27:01 -06:00
Ben Hamilton 3219f1c77d Extended Pictographic 2017-03-13 15:40:51 -06:00
Ben Hamilton 6007132e2e Also support Unicode enumerated properties via \p{East_Asian_Width=Ambiguous} escape 2017-03-08 09:43:50 -08:00
Ivan Kochurkin e3f85774a4 Reverted unterminated ranges: [+-], [-+]. 2017-03-03 21:35:31 +03:00
Ivan Kochurkin b3e667c619 Fixed escaped charactes in error messages. 2017-03-03 16:44:41 +03:00
Ivan Kochurkin d59d193252 CharSupport code improved and cleared.
Tests fixed.
2017-03-03 16:44:41 +03:00
Ivan Kochurkin e1ec6a4222 Fixed line break in test. 2017-03-03 13:44:44 +03:00
Ivan Kochurkin a1c50de31f Improved testInvalidCharSetsAndStringLiterals test with invalid char sets, fixed Java.g4 grammar: [+-] -> [+\-] 2017-03-03 13:41:36 +03:00
Ivan Kochurkin c5f9d5e2a1 More accurate escaping (different symbols for string literals (') and char sets(]-)).
Improved  testInvalidCharSetsAndStringLiterals test.
2017-03-02 18:16:05 +03:00
Ivan Kochurkin 77f7fd135d Fixed incorrect "used multiple times" warning.
Improved warning output in ATNOptimizer.
2017-03-02 14:56:50 +03:00
parrt d9ae13fc1a we left invalid escapes in string literals which was causing an error. This is related to #1537. All tool errors pass now. 2017-03-01 17:32:44 -08:00
Terence Parr 8d1df4c9e4 Merge pull request #1688 from bhamiltoncx/unicode-property-escape
New \p{Letter} Unicode property escape
2017-03-01 15:24:52 -08:00
parrt 070849698a error-> warnings. Fixes #1537 2017-03-01 15:10:44 -08:00
Ben Hamilton ca03e6ab5e New \p{Letter} Unicode property escape 2017-03-01 14:50:02 -08:00
Terence Parr d11968d993 Merge pull request #1693 from bhamiltoncx/escape-parsing
New class EscapeSequenceParsing with \p{UnicodeProperty} support
2017-03-01 14:47:44 -08:00
Ben Hamilton 3557f48386 EscapeSequenceParsing 2017-03-01 14:06:04 -08:00
Ben Hamilton e8bb58f7b9 Also support Unicode blocks 2017-02-23 16:21:55 -08:00
parrt 6215f18ec3 rename 4.6.1 to 4.7 everywhere 2017-02-23 14:48:58 -08:00
Ben Hamilton 4589ff56ea Add test for "binary" grammar 2017-02-23 09:39:44 -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
Ben Hamilton 5c5f52ab83 Use code generation in new tool-codegen build step instead of making tool depend on ICU at runtime 2017-02-22 11:09:02 -08:00
Ben Hamilton f384ef5fb4 New utility class Unicode 2017-02-21 12:40:31 -08:00
Terence Parr 6c878b0709 Merge pull request #1653 from bhamiltoncx/codegen-unicode-escapes
Emit language-specific Unicode escapes in codegen
2017-02-15 16:48:50 -08:00
Ben Hamilton 0049d6d9ae Emit language-specific Unicode escapes when generating code containing non-ASCII Unicode values 2017-02-10 14:31:56 -08:00
Ben Hamilton 11aa20c5e7 Ensure tests are run with file.encoding=UTF-8 2017-02-10 11:28:06 -08:00
Terence Parr 0901851719 Merge pull request #1585 from KvanTTT/left-recursive-rule-labels
The final fix (hopefully) for alternative labels check in left recursive rules
2017-01-29 13:34:32 -08:00
Ben Hamilton 3017de10bc Fix tool-testsuite 2017-01-25 16:42:28 -08: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
Ivan Kochurkin a46db4b0b7 Updated testLabelsForTokensWithMixedTypes.
Removed excess testLabelsForTokensWithMixedTypesLRWithLabels and testLabelsForTokensWithMixedTypesLRWithoutLabels.
2017-01-07 18:17:40 +03:00
Sam Harwell 8d7a9e19e2 Use MurmurHash in TestPerformance so results are comparable across targets 2017-01-05 13:52:10 -06:00
Sam Harwell 6b007b445c Disable label checks for left recursive rules
See #1543
2017-01-02 14:14:06 -06: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
parrt 23313ee44e [maven-release-plugin] prepare for next development iteration 2016-12-15 14:25:41 -08:00
parrt aacd2a2c95 [maven-release-plugin] prepare release 4.6 2016-12-15 14:25:36 -08:00
parrt 642d06ebb2 fix typo 2016-12-15 11:15:56 -08:00
Ivan Kochurkin 5d3b99b2ee Fixed error message for EMPTY_STRINGS_AND_SETS_NOT_ALLOWED. 2016-12-15 11:08:09 -08:00
Ivan Kochurkin 49cec3a610 Added and improved tests for INVALID_LITERAL_IN_LEXER_SET and EMPTY_STRINGS_AND_SETS_NOT_ALLOWED. 2016-12-15 11:08:09 -08:00
Ivan Kochurkin 1d53b416ee Added tests for CHARACTERS_COLLISION_IN_SET. 2016-12-15 11:08:09 -08:00
parrt 33bce0d8a8 oops. tool tests need actual tool jar 2016-12-10 16:21:40 -08:00
parrt 9b758cb668 update versions 2016-12-10 16:07:35 -08:00