Commit Graph

2382 Commits

Author SHA1 Message Date
Nathan Burles 8b706e2427 Add default cases to AltBlock and OptionalBlock
All other switch statements have a default case (either "break" or
"<error>"), but these are missing.

Does not change functionality, simply fixes a warning - and allows a
project to build with -Werror.
2020-07-15 14:33:59 +01:00
Felix Nieuwenhuizen c134dac863 escape ? character in c++ codegen to prevent accidental trigraphs
(using an override of shouldUseUnicodeEscapeForCodePointInDoubleQuotedString in CppTarget)
2020-06-21 22:04:51 +02:00
David MARKEY 2191c38619
Prefer "DebuggerNonUserCode" 2020-05-31 23:27:42 +02:00
David MARKEY 4cfbe5bd78
Update CSharp.stg 2020-05-31 19:07:13 +02:00
Tristan Swadell f17b6b43e3 Remove extant variable 2020-05-01 02:19:58 -07:00
Tristan Swadell 69ba58ecbe Thread-safe ANTLR Go codegen 2020-05-01 01:57:54 -07:00
Camilo Roca 091976c497 fix: use prototype for lexer and method for parser 2020-03-20 15:21:57 +01:00
Camilo Roca 176f852bf1 refactored AltLabelStructDecl to use es6 class 2020-03-20 13:51:01 +01:00
Camilo Roca 8b7ac991bf refactored StructDel to use es6 class 2020-03-20 13:46:12 +01:00
Camilo Roca 42b9d8630c fix: no prototype use inside class definition
fix: no need to return this in constructor
2020-03-20 13:45:54 +01:00
Camilo Roca 297bde0926 refactored generated parser and lexer to be es6 classes 2020-03-20 12:42:48 +01:00
Terence Parr 38b1b9ac7f
Merge pull request #2749 from carocad/tree-classes
Javascript: migrate prototypical Tree objects to es6 classes
2020-02-23 10:12:14 -08:00
Camilo Roca a3d2ca7ef5 fix: removed unnecessary "interface" initialization on test suite 2020-02-23 13:09:36 +01:00
Daniel Pitts 0d73fc28e9 replace gramamr with grammar 2020-02-21 19:04:10 -08:00
parrt f1ffc01723 [maven-release-plugin] prepare for next development iteration 2020-01-18 13:37:08 -08:00
parrt 3f41f283d1 [maven-release-plugin] prepare release antlr4-master-4.8-1 2020-01-18 13:37:01 -08:00
parrt 6c4b491d1b set version to 4.8-1 to fix release 2020-01-18 09:39:46 -08:00
parrt 666131841c [maven-release-plugin] prepare for next development iteration 2020-01-16 12:24:30 -08:00
parrt d569f91795 [maven-release-plugin] prepare release 4.8 2020-01-16 12:24:22 -08:00
parrt 6ad9646382 update version in code to 4.8 2020-01-16 12:18:17 -08:00
parrt 441fea52b1 update to 4.3 version 2020-01-16 12:05:03 -08:00
Terence Parr 340b95bded
Merge branch 'master' into master 2019-12-15 09:01:48 -08:00
Ewan Mellor 10d182cf66
[Swift] Change the generation of the copyFrom method to work around SR-10260.
This bug in Swift 5's compiler causes a SIL verification error when calling
super.foo without overriding foo in the subclass.  In our case, we are
generating a copyFrom implementation in the subclass, and calling
super.copyFrom.  Crucially, the subclass implementation uses the context
subtype for the argument, which means that it doesn't actually override the
superclass's implementation.  This then tickles the SIL verification bug.

Work around this by changing our autogenerated copyFrom definition to use
ParserRuleContext as the argument type.  This means that it actually
overrides the implementation in ParserRuleContext, and so the super.copyFrom
call is generated correctly.
2019-11-18 13:24:28 -08:00
Tabari Alexander 1304e1b8d4 Fix placement of members in JS target.
The location of <namedActions.members> was moved be in the lexer 
constructor, like it is for the parser constructor.
2019-10-29 11:36:47 -04:00
Juliana Amorim 25fa9b0de8 Fix codestyle and bugs in PHP.stg 2019-10-05 17:03:26 -03:00
Marcos Passos 24870012f5 Remove redundant assignment, optimize autoloading and tweak code style 2019-09-18 16:36:57 -03:00
Marcos Passos 789d746636 PHP Target 2019-09-14 09:39:58 -03:00
Iman Hosseini d667b90bc9
Fixed TextIO compatibility with 3.6+
Fixing this issue: https://github.com/antlr/antlr4/issues/2611 (and probably https://github.com/antlr/antlr4/issues/2193)
TextIO has moved since Python 3.6 so it should be imported considering the change for new versions.
2019-07-28 02:25:42 +04:30
Akos Kiss acbd582678 Clean up namespace of generated Python3 listeners
Added `del <file.parserName>` to the end of the `ListenerFile`
template the same way it is used in `VisitorFile`.
2019-03-24 12:24:19 +01:00
Renata Hodovan 3c21a640cc Fix imports in the Python2 sources.
Contrary to Python3, the lexers and parser generated for Python2 target
support only relative imports which causes a failure in case of
standalone scripts. The patch adapts these imports to work in both
cases.
2019-03-21 15:06:40 +01:00
Eric Vergnaud 81f7aee6ea fix failing tests 2019-01-01 17:02:29 +01:00
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