Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

[BUG?] ANTLR4 IDE ignores -visitor, -no-listener settings #143

Open
xoxota99 opened this issue Apr 10, 2016 · 4 comments
Open

[BUG?] ANTLR4 IDE ignores -visitor, -no-listener settings #143

xoxota99 opened this issue Apr 10, 2016 · 4 comments

Comments

@xoxota99
Copy link

Using ANTLR4 SDK 0.3.5 w ANTLR Tool v4.4
Setting options (via Project > Properties > ANTLR4 > Tool > Options) for -listener or -visitor appears to be ignored, or at best sometimes will not generate a listener. There doesn't seem to be a way to generate a Visitor.

@xoxota99 xoxota99 reopened this Apr 10, 2016
@atefthab
Copy link

atefthab commented Jun 22, 2016

Hi xoxota99,

In fact I had the same problem once, I used to integrate two G4 files in the same project the first one generated Visitor but the second didn't.

Then I realized that each G4 file has its own configuration for code generation that you can change by:

  • Right click on the G4 file then "Run As"
  • Choose "External tool configuration"
  • Change the -no-visitor to -visitor, you can do the same for listener.

Now the Visitor file is generated.

@arifogel
Copy link
Member

arifogel commented Nov 6, 2016

I'm trying to clean up the issues page. If there is nothing outstanding, let me know so I can close this. Otherwise I will close as invalid in two weeks.

@anchakarov
Copy link

I ran into the same issue on version 0.3.6.201611052310.
The solution provided by @atefthab works fine. Why is this not resolved already? Seems like an easy fix to accept the project Antlr options and use those instead. Thanks!

@HSorensen
Copy link
Member

@anchakarov can you check if you have an external runtime config for the g4 file ?

@arifogel arifogel removed their assignment Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants