Commit Graph

2351 Commits

Author SHA1 Message Date
parrt 70d9ddcd0a [maven-release-plugin] prepare for next development iteration 2018-12-18 10:35:34 -08:00
parrt be58ebffde [maven-release-plugin] prepare release 4.7.2 2018-12-18 10:35:24 -08:00
parrt 8fab6b98b3 [maven-release-plugin] rollback the release of 4.7.2 2018-12-18 10:33:52 -08:00
parrt 573cb86705 [maven-release-plugin] prepare release 4.7.2 2018-12-18 10:31:44 -08:00
parrt 38a95da397 manual edits of 4.7.1 -> 4.7.2 2018-12-17 14:32:39 -08:00
Ivan Kochurkin 70e3e5de70 ElementFrequenciesVisitor: override stringRef(TerminalAST ref) for correct processing of arrays of string literals 2018-11-18 15:54:20 +03:00
Ivan Kochurkin d3745c7b93 RuleFunction: process STRING_LITERAL along with RULE_REF and TOKEN_REF. Add getRuleTokens method 2018-11-18 15:54:20 +03:00
Ivan Kochurkin 0a6dbc37b7 Grammar.java: add getTokenName(String literal) method 2018-11-18 15:54:20 +03:00
Joseph Smith 6f057dbc59 Use STGroupFile filename constructor
- URL constructor unnecessary
2018-11-13 14:59:12 -06:00
Joe R. Smith 7fcadaa9f7
Use release version of st4 2018-11-13 11:23:39 -06:00
Joe R. Smith 61d8aea398
Merge branch 'master' into master 2018-11-13 10:57:42 -06:00
Joseph Smith 6899cc5c76 update st4 dep 2018-11-13 10:56:25 -06:00
parrt 8047283de7 use latest ST4 2018-11-10 14:54:42 -08:00
parrt f6c6217804 Force usage of previousContext in Cpp 2018-11-09 11:31:59 -08:00
parrt 5aa0df9c45 Fixes #2350 2018-11-09 11:28:30 -08:00
parrt 7591bf1705 updated ST version 2018-11-08 12:27:38 -08:00
Terence Parr 696f9b93df
Merge branch 'master' into master 2018-10-23 08:35:10 -07:00
Terence Parr 03a0a40835
Merge pull request #2373 from renatahodovan/parser-import
[Python3] Fix the import of parser superclasses.
2018-10-08 12:35:48 -07:00
Renata Hodovan 301ac82631 [Python] Add missing lexer super class imports.
Although, both lexer and parser grammars can have a custom super
class set, but only the generated parser sources were prepared to
import these classes. The patch makes custom lexer ancestor
classes imported, too.
2018-10-08 14:42:30 +02:00
Renata Hodovan b748545707 [Python3] Fix the import of parser superclasses.
Until now, the generated Python3 code imported the custom parser
superclasses relatively. However, this only worked in Python3 if
the module was inside a package, since relative imports rely on
__name__ to determine the current module's position in the package
hierarchy. In case of a standalone script, this was always __main__
and hence these relative imports failed.
The patch handles this issue them same way as it is handled by
listener imports.
2018-10-08 13:59:57 +02:00
Terence Parr 1375995edb
Merge pull request #2190 from ericvergnaud/fix-#2188
fixes #2188
2018-07-24 15:56:43 -07:00
Terence Parr 171ef99e04
Merge branch 'master' into master 2018-07-13 17:44:53 -07:00
Terence Parr 61acb35f0c
Merge pull request #2299 from dhalperi/streamline-java-statics
Java.stg: use static functions instead of inline arrays
2018-06-02 13:00:42 -07:00
Daniel Halperin 2a6a107b49 Java.stg: use static functions instead of inline arrays 2018-05-30 21:17:59 -07:00
Stephen Vance 2971f37323 Update icu4j version to address CVEs 2018-05-23 09:01:07 -04:00
Joseph Smith 2daa261772 Don't generate interpreter data files if gencode is false 2018-04-26 13:06:04 -05:00
Joseph Smith 7e89f26e9b Initialize STGroupFile with url, not file path
- absolute file paths not reliable way to find resources on classpath
- requires changes to ST4 in this PR:
https://github.com/antlr/stringtemplate4/pull/199
2018-04-24 17:43:00 -05:00
Joseph Smith 6469934441 revert groupId change 2018-04-24 07:27:26 -05:00
Joseph Smith 8ce79eec81 Ensure file paths passed to STGroup[File] are absolute
- gracefully handle grammars without source fileNames
2018-04-23 18:55:23 -05:00
Eric Vergnaud 8629d46bbe fixes #2188 2018-01-01 14:13:11 +08:00
parrt 17b6277502 [maven-release-plugin] prepare for next development iteration 2017-12-09 12:04:26 -08:00
parrt bdc05c87be [maven-release-plugin] prepare release 4.7.1 2017-12-09 12:04:17 -08:00
parrt 763a1242b7 update version number and tweak doc 2017-12-08 12:47:11 -08:00
Terence Parr 489a11b7a2
Merge pull request #2066 from KvanTTT/unreachable-tokens
New unreachable token value warning
2017-12-06 12:35:53 -08:00
Terence Parr dd4a1c8709
Merge branch 'master' into lexer-atn-prop 2017-12-06 12:10:14 -08:00
Oran Epelbaum e22fbbcce8 [JavaScript] Added atn property to generated lexers, similarly to generated parsers. 2017-12-03 12:42:33 +02:00
Terence Parr edcf275a3c
Merge branch 'master' into Issue160_import_lexer_grammars 2017-11-29 09:59:50 -08:00
Nicolas d02844c813 This is one implementation addressing issue 160.
Change to support import of lexer grammars containing modes into other
lexer grammars. The semantics for this are,
   * sets of channels from all grammars are merged
   * rules of modes found in an imported grammar which are in the root
     grammar are merged into the root grammar mode.
   * modes which are not in the root grammar are added to the root
     grammar, excluding modes which become empty due to a re-definition of
     rules in the root grammar.
2017-11-28 21:57:57 +13:00
Ivan Kochurkin 07a0a80992 Yes another formatting fixes. 2017-11-25 16:29:03 +03:00
Ivan Kochurkin 5b11aed48d Restored formatting. 2017-11-25 16:24:13 +03:00
Ivan Kochurkin 64b2ced763 Added check for fragment rules. 2017-11-25 16:24:13 +03:00
Ivan Kochurkin f4c4e8b4a7 Added comments to checkForUnreachableTokens and getSingleTokenValues methods. 2017-11-25 16:24:13 +03:00
Ivan Kochurkin 58349e5ad3 } on line by themselves. 2017-11-25 16:24:13 +03:00
Ivan Kochurkin 328cdf3583 Fixed TOKEN_UNREACHABLE warning checks. 2017-11-25 16:24:13 +03:00
Ivan Kochurkin da57241c1d Added checkForUnreachableTokens method, added new TOKEN_UNREACHABLE error type.
tabs normalized.
2017-11-25 16:24:13 +03:00
Ewan Mellor ed52b5a053
Add an accessLevel parser option.
Add an accessLevel parser option.  Use this to specify the access level
(public, etc) used on the classes and protocols in the generated
parser / lexer / listeners.  This required adding the option to
tool.Grammar.parserOptions so that it was known as a valid option, and
to codegen.model.{Recognizer,ListenerFile,VisitorFile} so that it was
available to the template in all the necessary contexts.

The Swift template has been extended to recognize this option, and generate
classes and members using "open", "public" or "internal" as appropriate.

This is only fully implemented for Swift.  The option is generic, but
the language-specific templates will need to be updated for any language
that would like similar support.

Closes #1597.
2017-11-16 00:18:28 -08:00
Terence Parr 0e895afb04 don't generate interp data if there are errors (it needs to serialize ATN which can fail upon error). 2017-11-12 15:47:46 -08:00
Mike Lischke eaed562cb3 Merge branch 'master' into interpreter2 2017-11-11 11:06:53 +01:00
parrt b4c34da1f0 Merge branch 'master' of github.com:antlr/antlr4 2017-11-05 08:49:04 -08:00
Terence Parr c1b7bf94f6
Merge pull request #2098 from jasonmoo/rule_context_methods_fix
Add RuleContext interface methods to reserved words
2017-11-04 12:17:13 -07:00