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

Add deep error recovery support to Velocity parser #3

Open
tjuerge opened this issue Jan 24, 2016 · 0 comments
Open

Add deep error recovery support to Velocity parser #3

tjuerge opened this issue Jan 24, 2016 · 0 comments
Assignees

Comments

@tjuerge
Copy link
Contributor

tjuerge commented Jan 24, 2016

The current JavaCC-generated Velocity parser doesn't support error recovery support - the parser stops after it founds the first error. For the Velocity editor it would be helpful to find only the first error but all potential errors in a template.

By adding deep error recovery to the Velocity parser JavaCC grammar (as explained here) the Velocity editor could annotate more than only the first error. And the editors outline could rendered partially despite of parser errors.

For generating the Java sources from the JavaCC grammar we can leverage the javacc-maven-plugin. Because we're only interested in the generated Parser class we we use the maven-clean-pluginto delete all generated classes but the Parser one.

To keep us from side-effects due to overloading the original Parser class with our own modified version we're deleting the original Parser class from the Velocity jar file which is shipped with the core plugin.

@tjuerge tjuerge self-assigned this Jan 24, 2016
@tjuerge tjuerge added this to the 1.0.6 milestone Jan 24, 2016
tjuerge added a commit that referenced this issue Jan 24, 2016
The javacc-maven-plugin is used to generated the Parser source code from the Velocity 1.7 JavaCC grammar file. From the generated code all but the Parser class is deleted with the maven-clean-plugin. The Velocity 1.7 jar file is replaced by a one which has no Parser class.
@tjuerge tjuerge modified the milestones: 1.0.6, 1.0.7 Jun 12, 2016
@tjuerge tjuerge removed this from the 1.0.7 milestone Sep 19, 2016
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

1 participant