tunnelvisionlabs / antlrworks2

Tunnel Vision Labs' ANTLRWorks 2 IDE
http://tunnelvisionlabs.com/products/antlrworks
Other
48 stars 21 forks source link

This command is not valid in legacy (ANTLR 3) mode. #55

Closed Chris2011 closed 9 years ago

Chris2011 commented 9 years ago

I found grammar file for C# here: https://github.com/ChristianWulf/CSharpGrammar/blob/master/grammars/CSharp4.g after I downloaded your netbeans Application ANTLRWorks 2.1 I opened this file and choosed "Generate Recognizer...", after this I got this message: This command is not valid in legacy (ANTLR 3) mode. I tested the actions "Run in TestRig" and "Interpret Lexer" too. Nothing worked, always the same problems. I need this file and the lexer output to implement C# into netbeans.

Is there a new version of ANTLRWorks?

Regards

Chris

sharwell commented 9 years ago

Hi @Chris2011. Thanks for trying out ANTLRWorks 2 :+1:

ANTLRWorks 2 only offers a limited editing experience for ANTLR 3 grammars (basically syntax highlighting). You will need to update the grammar to ANTLR 4, or use a different editor if you want more advanced features.

Chris2011 commented 9 years ago

Ok I understand and for me it sounds like that the ANTLRWorks 2 IDE will not further developed? So what I see is we have 2 options. 1. and this is my preferred one, I would like to use this plugin for Netbeans: http://plugins.netbeans.org/plugin/53652/antlrworks-2

As it stands there, it will support 3 and 4. The problem with this plugin, I can't install it inside Netbeans 8.0.2 or 8.1 beta, as you can see there is a problem with the "Editor Settings Storage", it requires a higher version. I wrote an mail to sam@tunnelvisionlabs.com. You can see the screenshot: antlrworks2-netbeans

the 2. one is to update the grammar from ANTLR 3 to 4 and you mean in your IDE, right? But I don't know how.

Regards

Chris

sharwell commented 9 years ago

You can read more information about building the project from source and targeting a different version of NetBeans in #49. It's become very frustrating because (unlike working in Visual Studio) every release of NetBeans (including patches) completely breaks this extension.

There is no automated process for converting from ANTLR 3 to ANTLR 4, but you should be able to get some assistance in the mailing list indicated on http://antlr.org.

Chris2011 commented 9 years ago

I understand your point, but please understand my point. First, you can tell them netbeans by yourself that every update breaks your plugin. Maybe there is smth wrong or whatever. So second, I would really like to ONLY be a user of this plugin like some other developers. I have so many projects like to write own plugins for netbeans, and a fulltime working job and so on. So I think it shouldn't be the task for the develop to repair a 3rd party plugin when they wanted to use it. We can't repair each plugin or tool or script, what we need for our work, because it should work as the way they are. Otherwise we can write everything we need by our own and this is not acceptable because this is not possible. And if someone repaired it as in the other ticket, maybe you can provide the final nbm file to everyone and not to say please do it by your own. I hope it is clear what I mean and not frustrated what I said.

Cheers,

Chris

Chris2011 commented 9 years ago

And here is one more point. https://github.com/ChristianWulf/CSharpGrammar/issues/3 - Here he said, that his file was written in ANTLR-3 syntax. So when I understand you right, it should work with your IDE. Because your IDE uses version 3, right?

sharwell commented 9 years ago

@Chris2011 The IDE uses a modified build of ANTLR 4. It provides limited editing features for ANTLR 3 called "legacy mode" (basically syntax highlighting), and a more feature-rich experience for ANTLR 4.

Chris2011 commented 9 years ago

Ok I understand. So it should work, if thefile will be written in ANTLR4?

sharwell commented 9 years ago

That is correct in theory, but as you've seen the extension is particular about which version of NetBeans it gets installed in. I'm not sure what the correct answer to that is either.

Chris2011 commented 9 years ago

The problem is, we talk about 2 different things. I tried to use the Standalone IDE from your site. There I got the error what we discussed with ANTLR 3 or 4. And I tried to use the plugin for netbeans which should work, but I don't get it working because of a missing dependency or so. So if you have a newer nbm file or updated one from the other ticket please add it wherever or so. As you see this comment from me: https://github.com/tunnelvisionlabs/antlrworks2/issues/55#issuecomment-133702292

Thx :)