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

[bug] ObjectDepthFirst implementation is not generated in the visitor subpackage #33

Open
chriskilding opened this issue Sep 23, 2022 · 3 comments

Comments

@chriskilding
Copy link

I need to extend the JTB ObjectDepthFirst class rather than DepthFirstVisitor in my parser code. Unfortunately, it appears ObjectDepthFirst is not generated in the .visitor subpackge alongside DepthFirstVisitor.

I'm not totally familiar with JavaCC, so not 100% sure of what the solution ought to look like. (E.g. has ObjectDepthFirst been totally deprecated in JTB, or is it just not generated by this plugin?)

If ObjectDepthFirst still exists in JTB, would it be possible to add an option to this Maven plugin to generate the ObjectDepthFirst class?

@chriskilding chriskilding changed the title Option to generate ObjectDepthFirst in the visitor subpackage [bug] ObjectDepthFirst implementation is not generated in the visitor subpackage Sep 26, 2022
@chriskilding
Copy link
Author

Update after more digging...

It looks like ObjectDepthFirst was replaced by GJDepthFirst in a JTB version update some time ago.

As a result, I am wondering if it would be possible to add a config option to jtb-javacc e.g. <jtbVersion> that lets the user override the JTB version?

@chriskilding
Copy link
Author

(This option would allow the user to take JTB 'back in time' to a version that is compatible with the given codebase, i.e. one that contains ObjectDepthFirst.)

@MarcMazas
Copy link

HI. I'm the developper of JTB since 1.4.0, may be 20 years ago. I never saw ObjectDepthFirst even in JTB 1.3.2...
However, generating a visitor or another, if not through a JTB option, is not the work of the maven plugin - and even less of JavaCC itself.
There is a JTB 1.5.1 version that allows to parameterize the generated visitors (https://github.com/jtb-javacc/JTB), but the maven plugin is not yet updated to this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants