Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement error recovery for antlr4-based Parrot Parser #1011

Open
eric-milles opened this issue Dec 30, 2019 · 4 comments
Open

Implement error recovery for antlr4-based Parrot Parser #1011

eric-milles opened this issue Dec 30, 2019 · 4 comments

Comments

@eric-milles
Copy link
Member

No description provided.

@eric-milles eric-milles added this to the v3.7.0 milestone Dec 30, 2019
@eric-milles eric-milles removed this from the v3.7.0 milestone Mar 12, 2020
@eric-milles eric-milles added this to the v3.10.0 milestone Sep 17, 2020
@eric-milles eric-milles self-assigned this Oct 8, 2020
eric-milles added a commit that referenced this issue Dec 16, 2020
@eric-milles eric-milles modified the milestones: v4.0.0, v4.1.0 Dec 30, 2020
@eric-milles eric-milles modified the milestones: v4.1.0, v4.2.0 Mar 17, 2021
@eric-milles eric-milles modified the milestones: v4.2.0, v4.3.0 Jun 28, 2021
@eric-milles eric-milles removed this from the v4.3.0 milestone Sep 30, 2021
@Spitfire1900
Copy link

Spitfire1900 commented Mar 5, 2022

Now that Groovy 4 is GA and has dropped antlr2 support this needs to be completed sooner rather than later.

@eric-milles
Copy link
Member Author

@Spitfire1900 This project still provides the antlr2 parser for Groovy 4. You may also use the antlr4 parser, it's just not enabled by default. If you have antlr4 knowledge that would help move this ticket along, I'm ready and available to review design proposals.

@efc-mw
Copy link

efc-mw commented May 23, 2022

My users also like to use new language features like Java-style Lambda syntax, but without error recovery, the use of the editor is very problematic for my users.

@Spitfire1900
Copy link

For those whom are on Groovy 3 and want to disable the parrot parser in builds this is how you can implement it in Gradle.

build.gradle

tasks.withType(GroovyCompile) {
    groovyOptions.configurationScript = file("$projectDir/antlr2.groovy")
}

antlr2.groovy

import static org.codehaus.groovy.control.customizers.builder.CompilerCustomizationBuilder.*
import static org.codehaus.groovy.control.ParserPluginFactory.antlr2

import org.codehaus.groovy.control.CompilerConfiguration

withConfig (configuration) { 
	(configuration as CompilerConfiguration).pluginFactory = antlr2()
}

@eric-milles eric-milles removed their assignment Jun 25, 2023
@eric-milles eric-milles removed this from the v5.0.0 milestone Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants